input stringlengths 10 828 | output stringlengths 5 107 |
|---|---|
public float get min view width return this min view width | returns the minimum viewable width |
public shapefile view model add arc shapefile url datafile color c shapefile view model view model null shapefile shapefile create shapefile datafile if shapefile null shapefile get shape type shapefile arc shapefile get shape type shapefile polygon string name datafile get file name name substring name last index of 1 name index of view model new shape arc view model shapefile name c shapefiles add element view model update dependents view model return view model | adds a shapefile containing arcs creating a view model with the |
public boolean transformation ready return transform ready | returns whether the transformation function has been intialized |
public shapefile view model add point shapefile url datafile string icon url shapefile view model view model null shapefile shapefile create shapefile datafile if shapefile null shapefile get shape type shapefile point string name datafile get file name name substring name last index of 1 name index of view model new shape point view model shapefile name icon url shapefiles add element view model update dependents view model return view model | adds a shapefile containing points creating a view model with the |
public void set color color color this color color update dependents color | sets color to render shape data |
public shapefile create shapefile url datafile shapefile shapefile null if datafile null try gzipinput stream s new gzipinput stream datafile open stream shapefile new shapefile s catch exception e system err println caught exception reading data e return shapefile | creates a shapefile object from a url containing a gzipped file |
public void mouse moved mouse event evt super mouse moved evt update dependents evt | method that learns of mouse moving and updates our dependents |
public void set radar view jradar view radar view this radar view radar view split pane set left component radar view | method to set the radar view component to be something different |
public void mouse exited mouse event evt super mouse exited evt update dependents evt | method that learns of a mouse exiting and updates our dependents |
public void adjust display double width map bounds 2 map bounds 0 double height map bounds 3 map bounds 1 map focus new coordinate width 2 0 map bounds 0 height 2 0 map bounds 1 unlike basic map view model constraining dimension is the smaller one want to draw the map such that it fills the available space if width height zoomed out 1 0 height 2 0 else zoomed out 1 0 width 2 0 zoomed in zoomed out zoom factor zoom zoomed out this ratio float width height update dependents new float ratio update dependents map focus | method to adjust map center zoom levels and map size based on |
public void draw point shape point point graphics graphics int arc index if draw point graphics point shapes drawn shapes drawn count arc index shapes drawn count | iterate through all of the points drawing them if they intersect |
public void paint component graphics graphics if enhanced map view model view model transformation ready shapes drawn count 0 shapes drawn new int shapefile get record count graphics set color shape arc model get color for int i 0 i shapefile get record count i shape arc arc shape arc shapefile get shape i draw arc arc graphics i | method to draw shapes |
public void mouse pressed mouse event evt if evt get click count 2 evt is popup trigger click map view model transform p m evt get point viewpoint pass up click click continuous update viewpoint set view bounds center click | method to handle a mouse down event on the map |
public void mouse entered mouse event evt super mouse exited evt update dependents evt | method that learns of mouse entering and updates our dependents |
public void determine tip mouse event evt integer tool tip index null point p evt get point coordinate mouse transform point p u p transform point u m mouse if roads view null if roads view tool tip test mouse threshold null tool tip index roads view tool tip test mouse threshold shapefile view model sfvm sfvm shapefile view model shapefile data get roads view tool tip sfvm get attribute string tool tip index update dependents tool tip | method that determines tool tip string from mouse location |
public coordinate transform p m point p coordinate c new coordinate transform point p u p transform point u m c return c | simplifies transformation from map to pixel coordinates in one step |
public integer tool tip test coordinate p double threshold integer tool tip index null for int i 0 i shapes drawn count i shape arc arc shape arc shapefile get shape shapes drawn i if intersection p arc threshold tool tip index new integer shapes drawn i i shapes drawn count return tool tip index | test to see if a tool tip goes with this data set |
public point transform m p coordinate c coordinate temp new coordinate c transform point m u temp return transform point u p temp | simplifies transformation from pixel to map coordinates in one step |
public local viewpoint get local viewpoint return viewpoint | method to return this local users viewport |
public void set min view height float min view height this min view height min view height | sets the minimum viewable height |
public rectangle transform m p decimal view bounds dvb coordinate top left new coordinate dvb get top left corner coordinate bottom right new coordinate dvb get bottom right corner point tl transform m p top left point br transform m p bottom right return new rectangle tl x tl y br x tl x br y tl y | simplifies transformation from map to pixel coordinates in one step |
public shape points transform part shape point points int count coordinate c point p shape points new points new shape points count for int i 0 i count i c new coordinate points i get x points i get y p transform m p c new points add p i return new points | transforms a part of an arc specified by set of points |
public void mouse dragged mouse event evt click map view model transform p m evt get point viewpoint pass up click click continuous update viewpoint set view bounds center click | method to hand a mouse dragged in the map area |
public basic map view model get basic map view model return map view model | method to return the view model for the map on the right |
private viewpoint get inside viewpoint from spot spot spot viewpoint new vp if the spot is empty then return the default world viewpoint if spot null return new viewpoint world world map size zoomable renderer floor image get floor spot spot get level if floor image null if we didn t get anything then something s wrong usually this occurs with the first time something is loaded so repeat until we finally get a viewpoint watch out though because this could return a stack overflow return get inside viewpoint from spot spot return null else return floor image get viewpoint | calculates an inside building viewpoint centered around a given spot and returns it |
public jpanel get entire display return entire display | method to return the entire display |
public void component resized component event evt map view model set size get size repaint | invoked when component has been resized |
public float get min view height return this min view height | returns the minimum viewable height |
public coordinate get map coords point p coordinate c map view model transform p m p return c | transforms a point in basic map view coordinate system to a map |
public point get pixel coords coordinate c coordinate map coords new coordinate c point p map view model transform m p map coords return p | reverse transforms a map coordinate into a point in basic map views |
private viewpoint get starting viewpoint viewpoint map vp replicated object client client initalize the viewpoint to be the basic world view viewpoint vp new viewpoint map vp get world bounds new float rectangle map vp get world bounds map vp get rendered dimension if we re at a spot then set the viewpoint to that spot spot spot get user spot client if spot null spot get level 0 vp get viewpoint from spot spot else if spot null vp get inside viewpoint from spot spot return vp | retrieves a starting viewpoint |
public void set zoom float zoom this zoom math min 100 0f math max 0 1f zoom update viewpoint | sets the current zoom |
public bubble jradar view local viewpoint viewpoint super viewpoint map view model add dependent local view | constructs a jradar view drawing a rectangle for the local users |
public void set shared data shared viewpoint list shared data this shared data shared data this table new hashtable viewpoint remove viewpoint listener local view viewpoint remove viewpoint listener bubble map view model map view model layered pane remove local view local view null bubble map view model map view model set shared data table for enumeration e shared data get users e has more elements shared viewpoint v shared viewpoint e next element added v | displays a set of shared data rather than just the local users |
public int transform coordinate original coordinate transformed coordinate temp new coordinate original temp x temp x center x temp y temp y center y return transform relative temp transformed | transforms the orginal in map coordinates to transformed in unit |
public shape points transform shape points shape point pts int orig count shape points new points new shape points orig count for int i 0 i orig count i q2 x pts i get x q2 y pts i get y transform q2 q2 transform p2 translate point q2 transform new points add p2 i return new points | transforms orig count instances of shape point and stores them in |
public point translate point coordinate c point p new point point map center view model get map center point display center view model get display center p x display center x int c x map center x p y display center y int c y map center y return p | method to define the transformation for a point from |
public shape points transform part shape point points int count if single transform null return single transform transform shape points points count else return multiple transform transform shape points points count | transforms a part of an arc specified by set of points |
public coordinate reverse translate point point p coordinate c new coordinate point map center view model get map center point display center view model get display center c x double p x display center x map center x c y double display center y p y map center y return c | method to reverse tranform a point to a coordinate |
public void set adjusting boolean adjusting this adjusting adjusting if adjusting repaint this may be unwise | tells the renderer that the zoom and pan are currently adjusting |
private void output map settings print writer out properties source props boolean use hidden input type quit out if there is no map settings property if props get property map settings equals return if use hidden input type out println input type hidden name map settings value props get property map settings else out print map settings urlencoder encode props get property map settings | outputs the map settings property if it exists |
public void set property object key object value if value null properties remove key else properties put key value | sets an application specific property |
private viewpoint get viewpoint from query http servlet request request string viewpoint string request get parameter viewpoints return viewpoint from string viewpoint string | returns the viewpoint stored in the http request parameters |
public void set horizontal scroll mode int mode this h scroll mode mode other viewpoints remove all elements set viewpoint vp reset | sets the horizontal scroll mode |
public int get horizontal scroll mode return h scroll mode | returns the horizontal scroll mode on of scroll mode free |
public void set symbols string icon files string labels int count jlabel label null url url null for int i 0 i count i try url new url icon files i catch exception e system out println malformed url label new jlabel labels i new image icon url jlabel center add label set border new titled border new line border color black legend repaint | sets and lays out the symbols for the panel |
public void set line colors color colors string labels int count jlabel label null for int i 0 i count i label new jlabel labels i new line symbol colors i jlabel center add label repaint | sets and layouts out the colored lines for the panel |
public shared cursor replicated object client client object id id this client client try data shared map client get object id catch exception e e print stack trace start sharing the data in the map if data null replication manager get instance start sharing data client data add map listener this dependent support new dependent support double d get shared cursor if d 0 null d 1 null this cursor new coordinate d 0 double value d 1 double value | construtor to handle the case where shared map already exists and |
public void set vertical scroll mode int mode this v scroll mode mode other viewpoints remove all elements set viewpoint vp reset | sets the vertical scroll mode |
protected void output header html print writer out string style sheet string title out println html out println head out println link rel stylesheet type text css href style sheet out print title out print title out println title out println head | outputs the header for the page |
public void element added map event evt double d get shared cursor if d 0 null d 1 null this cursor new coordinate d 0 double value d 1 double value else cursor null update dependents cursor | if someone changes any of the cursor variables update the display |
public int get vertical scroll mode return v scroll mode | returns the vertical scroll mode on of scroll mode free |
protected boolean check outside building click viewpoint vp http servlet request request point p new point integer parse int request get parameter map x integer parse int request get parameter map y map set viewpoint vp float point fp map get translated coordinates p check to see if the building selection handler finds a building if bldg handler building selected fp vp return true else return false | checks to see if a building was clicked on in the outside map |
public void remove try delete the shared viewbounds and shared cursor objects shared view bounds remove shared cursor remove delete the viewpoint itself replication manager get instance stop sharing data client client delete object client get object id data catch exception e e print stack trace | method for removing the shared data when the map is removed |
public void set comments object id id if this comments id id comments null object old comments id this comments id id fire property change comments old id | sets the object id of our comments map |
public void set artifacts object id id if this artifacts id id artifacts null object old artifacts id this artifacts id id fire property change artifacts old id | sets the object id of our artifacts map |
public object id get comments return comments id | returns the object id of our comments map |
public object id get artifacts return artifacts id | returns the object id of our artifact map |
public int get first start return this first start | get the line number on which the difference starts in the first file |
protected void show outside map viewpoint vp http servlet response response throws ioexception map set viewpoint vp encode component map response | outputs the image of the outside map |
public int get first end return this first end | get the line number on which the difference ends in the first file |
public int get second start return this second start | get the line number on which the difference starts in the second file |
public int get second end return this second end | get the line number on which the difference ends in the second file |
public string get first text return first text | get the text content of the difference in the first file |
public string get second text return second text | get the text content of the difference in the second file |
public string get servlet url object id id embedded object path path replicated object client client string mime type properties source props return query servlet class get name id id | returns a url without protocol or host for viewing the given |
public void set case study object id id if this case study id id case study null object old case study id this case study id id fire property change case study old id | sets the object id of our case study map |
public void set scenarios object id id if this scenarios id id scenarios null object old scenarios id this scenarios id id fire property change scenarios old id | sets the object id of our scenario map |
public void set claims object id id if this claims id id claims null object old claims id this claims id id fire property change claims old id | sets the object id of our claims map |
public int get start position return this pos1 | get the position on which the difference starts on this line |
public object id get case study return case study id | returns the object id of our case study map |
public int get end position return this pos2 | get the position on which the difference ends on this line |
public object id get scenarios return scenarios id | returns the object id of our scenario map |
public void init view listener new listener connection panel create vertical box panel db connection create box connection panel add db connection connect button new jbutton connect button set text connect connect button add action listener listener connection panel add connect button set layout new border layout add connection panel border layout center | method called to initalize view of connect interface once connection |
public object id get claims return claims id | returns the object id of our claim map |
public void set connection sqlconnection set con sql connect set con | method to set the connection for the connection manager |
public connection get connection sql connect connect return sql connect con | method to return the connection |
public editor query list get queries replicated object client client throws ioexception if queries null queries id null queries editor query list client get object queries id replication manager get instance start sharing queries client else if queries null queries id null queries create list client object id id client get object id queries queries id id fire property change queries id null id return queries | returns the list of queries |
public object id get queries id return queries id | returns the object id of the queries editor query list |
public void set queries id object id queries id if queries id equals this queries id queries null object old this queries id this queries id queries id fire property change queries id old queries id | sets the object id of the list of queries |
public read only editor query list get read only queries replicated object client client throws ioexception if read only queries null read only queries id null read only queries read only editor query list client get object read only queries id replication manager get instance start sharing read only queries client else if read only queries null read only queries id null read only queries create read only list client object id id client get object id read only queries read only queries id id fire property change read only queries id null id return read only queries | returns the list of queries |
public void connection error joption pane show message dialog this no connection could be established check your database information and try again connection error joption pane error message | method to show a connection error |
public object id get read only queries id return read only queries id | returns the object id of the queries editor query list |
public void set read only queries id object id read only queries id if read only queries id equals this read only queries id read only queries null object old this read only queries id this read only queries id read only queries id fire property change read only queries id old read only queries id | sets the object id of the list of queries |
public object id get editor map id return editor map id | returns the object id of the data style mapping |
public void connection success joption pane show message dialog this connection to map get cmserver to string successful connection success joption pane plain message | method to show a connection success |
public void set editor map id object id editor map id if editor map id equals this editor map id editor map null object old this editor map id this editor map id editor map id fire property change editor map id old editor map id | sets the object id of the list of queries |
public void connection error joption pane show message dialog this no connection to case library database connection error joption pane error message | method to show a connection error |
public shared map get editor map replicated object client client throws ioexception if editor map null editor map id null editor map shared map client get object editor map id replication manager get instance start sharing editor map client else if editor map null editor map id null editor map create map client object id id client get object id editor map editor map id id fire property change editor map id null id return editor map | returns the data set style mapping |
private shared map create map replicated object client client throws ioexception dbpermissions dbperms new dbpermissions client get object id this client get user get name dbperms set read mode dbpermissions delegated plus dbperms set write mode dbpermissions delegated plus shared map map shared map client get new object shared map class dbperms replication manager get instance start sharing map client return map | creates a new shared map |
public form query list get queries replicated object client client throws ioexception if queries null queries id null queries form query list client get object queries id replication manager get instance start sharing queries client else if queries null queries id null queries create list client object id id client get object id queries queries id id fire property change queries id null id return queries | returns the list of queries |
private editor query list create list replicated object client client throws ioexception dbpermissions dbperms new dbpermissions client get object id this client get user get name dbperms set read mode dbpermissions delegated plus dbperms set write mode dbpermissions delegated plus editor query list list editor query list client get new object editor query list class dbperms replication manager get instance start sharing list client return list | creates a new editor query list |
private read only editor query list create read only list replicated object client client throws ioexception dbpermissions dbperms new dbpermissions client get object id this client get user get name dbperms set read mode dbpermissions all dbperms set write mode dbpermissions all read only editor query list list read only editor query list client get new object read only editor query list class dbperms replication manager get instance start sharing list client return list | creates a new read only editor query list |
public read only form query list get read only queries replicated object client client throws ioexception if read only queries null read only queries id null read only queries read only form query list client get object read only queries id replication manager get instance start sharing read only queries client else if read only queries null read only queries id null read only queries create read only list client object id id client get object id read only queries read only queries id id fire property change read only queries id null id return read only queries | returns the list of queries |
public object id get form map id return form map id | returns the object id of the data style mapping |
public void set form map id object id form map id if form map id equals this form map id form map null object old this form map id this form map id form map id fire property change form map id old form map id | sets the object id of the list of queries |
public shared map get form map replicated object client client throws ioexception if form map null form map id null form map shared map client get object form map id replication manager get instance start sharing form map client else if form map null form map id null form map create map client object id id client get object id form map form map id id fire property change form map id null id return form map | returns the data set style mapping |
public void disable all driver set enabled false server set enabled false database set enabled false user set enabled false password set enabled false test connection button set enabled false | method to disable all interface items if users does not have write permissions |
private form query list create list replicated object client client throws ioexception dbpermissions dbperms new dbpermissions client get object id this client get user get name dbperms set read mode dbpermissions delegated plus dbperms set write mode dbpermissions delegated plus form query list list form query list client get new object form query list class dbperms replication manager get instance start sharing list client return list | creates a new form query list |
private read only form query list create read only list replicated object client client throws ioexception dbpermissions dbperms new dbpermissions client get object id this client get user get name dbperms set read mode dbpermissions all dbperms set write mode dbpermissions all read only form query list list read only form query list client get new object read only form query list class dbperms replication manager get instance start sharing list client return list | creates a new read only form query list |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.