input
stringlengths 10
828
| output
stringlengths 5
107
|
|---|---|
public void state changed change event evt val label set text label slider get value if slider get value is adjusting change event event new change event this for change listener listen listeners listen state changed event
|
handle a state change on the slider
|
public void set value int value slider set value value val label set text label slider get value
|
set the value of the slider
|
public void action performed action event evt if evt get source equals button the user has clicked the cell so bring up the dialog button set background current color color chooser set color current color dialog set visible true fire editing stopped make the renderer reappear else user pressed dialog s ok button current color color chooser get color
|
handle clicking on the button
|
public void add time display time display display displays add display display set fade time fade millis display set purge time purge millis
|
adds the time display to this controller
|
protected void fire state changed change event evt new change event this for change listener listener listeners listener state changed evt
|
send a change event whose source is this slider to each listener
|
public date get time return cur time
|
gets the current time displayed by this time text field
|
public boolean is real time return real time
|
return whether this display is in real time mode
|
public date get display time return disp date
|
get the current time displayed
|
public void set time date new time cur time new time set text format format cur time
|
set the time currently displayed
|
protected void show entry error joption pane show message dialog this format error cannot parse get text format error joption pane error message
|
display an error indicating the time entered is invalid
|
public long get fade time return fade millis
|
get the fade time for the temporal display
|
public long get purge time return purge millis
|
gets the purge time which is used to remove stale temporal components
|
public date get time for coord int x coord date date null if viewed span null long millis x coord viewed span get duration get width viewed span get start date get time date new date millis return date
|
return the time for the specified x coordinate
|
public date get time return disp date
|
gets the current time represented by this time display control
|
public sequential get time sequence return sequence
|
returns the sequence of events for this timebar
|
public time span get time span return viewed span
|
returns the time span represented by this timebar
|
protected int get xcoord date date if viewed span null throw new illegal state exception time span for this time bar has not been properly set int x coord int date get time viewed span get start date get time get width viewed span get duration return x coord
|
returns the x coordinate for a particular date for this timebar
|
public void purge data
|
purge any data which has exceeded the purge time
|
protected void paint span graphics g time span span color color time span bar span span intersect viewed span color preset g get color if bar span null if color null g set color color int x start get xcoord bar span get start date int x stop get xcoord bar span get stop date if x stop x start x stop g fill rect x start 0 x stop x start get height g set color preset
|
paint an individual span on this time bar in the provided color
|
public void set time sequence sequential time sequence sequence time sequence invalidate
|
sets the sequence of events for this timebar
|
public void set time span date start time date stop time viewed span new time span start time stop time invalidate
|
sets the time span of this timebar
|
public void set time span time span span viewed span new time span span get start date span get stop date invalidate
|
sets the time span of this timebar
|
public void purge data if purge time 1 long cur millis cur time get time synchronized shape times for iterator geo shape iter shape times key set iterator iter has next geo shape shape iter next sequential seq shape times get shape date latest seq get latest time long last time latest get time if cur millis last time purge time iter remove
|
purge any data which has exceeded the purge time
|
public void remove time display time display display displays remove display
|
removes the time display
|
public object get cell editor value return new float curr val
|
get the current value of the cell being edited
|
public void set display time date time disp date time update display time
|
set the time currently displayed
|
public void state changed change event evt int slider val slider get value curr val float slider val 100 if slider get value is adjusting fire editing stopped
|
handle the event when the slider value changes
|
public void set fade time long millis string new fade long to string math round millis 1000 fade field set text new fade if millis purge millis set purge time millis
|
set the fade time
|
public void set display time date time if time cur time cur time time repaint
|
set the time currently displayed
|
public void set purge time long millis string new purge long to string math round millis 1000 purge field set text new purge if fade millis millis set fade time millis
|
set the purge time
|
public void set real time boolean is real time real time is real time boolean chk rt toggle is selected if chk real time rt toggle set selected real time card layout layout card layout time pane get layout if real time start timer update pane real time pane layout show time pane real time else stop timer update pane play back pane layout show time pane play back
|
sets the real time flag
|
private jbutton create button string name jbutton butn new jbutton name butn add action listener this return butn
|
creates a button with the given name and adds this object as an
|
public void set fade time long millis fade time millis if purge time 1 purge time millis purge time millis
|
set the fade time
|
public void set time date new time disp date new time update display time
|
sets the current time for this time display control
|
private void setup ctrl pane rt toggle add action listener new action listener public void action performed action event evt jcheck box chk jcheck box evt get source real time chk is selected set real time chk is selected ctrl pane add time label ctrl pane add rt toggle
|
setup the control pane
|
private void update label set comparable sel set sel dialog get selected set comparable all set sel dialog get all values if all set equals sel set select label set text all else if sel set size 0 select label set text none else string buffer buf new string buffer for comparable comp sel set buf append comp to string buf append if buf length 24 buf set length 24 buf append select label set text buf to string
|
update the selected objects label
|
public void set timer interval long millis interval millis
|
set the interval between time signals
|
private void setup play back pane time slider set time interval null play back pane add time slider time slider add change listener new change listener public void state changed change event arg0 if time slider is visible disp date time slider get time update display time
|
setup play back pane
|
private color blend color color c1 color c2 float interp int red int c1 get red 1 interp c2 get red interp int grn int c1 get green 1 interp c2 get green interp int blu int c1 get blue 1 interp c2 get blue interp return new color red grn blu
|
interpolate between two colors
|
private void build main pane if start widget null start widget remove change listener listener if stop widget null stop widget remove change listener listener main pane remove all main pane add new jlabel start main pane add start widget get component main pane add new jlabel stop main pane add stop widget get component start widget set time cur span get start date stop widget set time cur span get stop date start widget add change listener listener stop widget add change listener listener
|
build the main pane for this component
|
public time span get time span return cur span
|
get the current time window
|
public void set widgets time widget start time widget stop start widget start stop widget stop build main pane
|
set the widgets used to enter start and stop time
|
private void show entry error joption pane show message dialog pane error cannot understand the entered time time entry error joption pane error message
|
pop up an error dialog indicating an error on the text entry
|
public void set purge time long millis purge time millis if millis 1 fade time millis purge time fade time
|
set the purge time
|
public void set text loc int x int y x loc x y loc y
|
set the location of the text
|
public void set real time boolean real time flag real time real time flag if real time start timer else dereference so it can be recreated restarted again timer thread null
|
set the real time flag
|
private void update display time time label set text format format disp date for time display display displays display set display time disp date if real time display purge data fire state changed
|
update display time
|
public void click int button click button 1
|
click the appropriate mouse button
|
private void update fade time long millis for time display display displays display set fade time millis
|
update fade time
|
public void set render style render style style render style style
|
get the render style which is used to display the temporal components
|
public void click int button int count int mods 0 if button 1 mods input event button1 mask else if button 2 mods input event button2 mask else if button 3 mods input event button3 mask for int i 0 i count i mouse press mods delay 10 mouse release mods
|
click the appropriate mouse button
|
private void update pane jpanel pane if pane equals real time pane called when the real time pane is made visible else if pane equals play back pane called when the play back pane is made visible long cur millis disp date get time date start date new date cur millis purge millis time slider set time span new time span start date disp date time slider set time interval null time slider set time disp date else ctrl pane time label set text format format disp date
|
update the pane to show current status
|
private void update purge time long millis for time display display displays display set purge time millis
|
update purge time
|
public void drag to int x coord int y coord drag to 1 x coord y coord 10
|
click and drag the cursor to the specified location
|
public boolean is hovering return hovering
|
return whether the mouse is currently hovering over the item
|
public void add value span time span span double value time vals put span value if max val null value max val max val value if min val null value min val min val value sequential seq get time sequence seq add time span span
|
add a time span with a particular associated value
|
protected int get ycoord double value double frac max val value max val min val return int frac get height
|
get the y coordinate for a particular value
|
public void set zero significance boolean flag if flag if min val null min val 0 min val 0 0 if max val null max val 0 max val 0 0 else min val null max val null for double value time vals values if max val null value max val max val value if min val null value min val min val value
|
set the significance of the zero value
|
public void set extension string extensions extension list clear string tokenizer tok new string tokenizer extensions t n r f while tok has more tokens extension list add tok next token to lower case
|
sets the extensions handled by this filter
|
public void set overlay color color color overlay color color
|
set the color used for the overlay timebar
|
public void set overlay sequence sequential overlay sequence overlay overlay sequence invalidate
|
sets the sequence of overlay events for this dual time bar
|
public void set content url url try editor pane set page url catch ioexception exc throw new illegal argument exception cannot access url exc
|
set the content of this html viewer
|
public date get completion date return completed
|
get the completion date for this progress time bar
|
public date get now date return now
|
get the current time for this time bar
|
private void start timer if timer thread null timer thread new thread override public void run while real time set display time new date purge data try sleep 1000 catch interrupted exception exc ignore if timer thread is alive timer thread set daemon true timer thread start
|
start the timer thread
|
public float get progress return fraction
|
get the progress represented by this time bar
|
public void enter text string text for int i 0 i text length i char ch text char at i if character is upper case ch key press key event vk shift key press ch key release ch if character is upper case ch key release key event vk shift key press key event vk enter key release key event vk enter
|
enters text from the keyboard
|
public color get ramp color return ramp color
|
get the color used for the time ramp
|
public void set completion date date complete completed complete
|
the projected or actual completion date
|
public void set now date date now date now now date
|
sets the time corresponding to the current time as represented by this
|
public void set ramp color color color ramp color color
|
sets the color used for the ramp on this progress bar
|
public void set status date now date float progress now now date fraction progress completed null
|
sets the time corresponding to the current time as represented by this
|
public void action performed action event evt advance button
|
when the button is pressed call the advance button method
|
private void advance button index if index num settings index 0 if strings size 1 set text strings get index if icons size 1 set icon icons get index fire state changed
|
advance the string and icon indexes as appropriate
|
public void add layer geo layer layer geo layers add layer
|
add a layer to the geographic display
|
public geo bounds get geo bounds return bounds
|
get the geographic bounds
|
private void render graphics2 d g2 graphics2 d get graphics projection set view bounds view bounds projection set geo bounds bounds if world color null color col g2 get color g2 set color world color shape world shape projection get world shape g2 fill world shape g2 set color col paint the geographic layers for geo layer layer geo layers layer project projection layer draw layer g2
|
paints the image
|
public void set geo bounds geo bounds geo bounds bounds geo bounds render
|
set the geographic bounds
|
public void set layers collection geo layer layers geo layers clear geo layers add all layers render
|
set the geographic layers
|
public void set projection projection proj projection proj render
|
set the current projection
|
public void set world color color color world color color render
|
set the world color
|
public geo coord get center return center
|
get the center of the geo polygon
|
public void add shape geo shape new shape default layer add new shape
|
add a shape to the geographic display
|
public data record get data return data
|
gets the data record associated with this geo polygon
|
public void add shapes collection geo shape new shapes default layer add all new shapes
|
add a collection of shapes to the geographic display
|
public void project projection proj reset point pts proj project coords for point point pts if point null add point point x point y
|
projects the geographic coordinates into the given projection
|
public void clear shapes default layer clear
|
remove all shapes directly added to this canvas
|
public void set data data record rec data rec
|
sets the data record of this geo polygon
|
public geo layer find layer string name geo layer found null for geo layer layer geo layers if layer get name equals ignore case name found layer return found
|
find the geographic layer with the given name
|
protected void add shape geo shape shape shapes add shape
|
add a shape to the readers internal shape list
|
public geo layer create layer geo layer layer new geo layer get name layer add all shapes return layer
|
creates a geographic layer
|
public geo shape find shape string shape name geo shape shape null geo multi shape multi new geo multi shape for geo shape geo shape shapes data record data geo shape get data if data null string name data get name if name equals ignore case shape name if shape null shape geo shape multi add shape return multi size 1 multi shape
|
find a shape which matches the specified shape name
|
public geo shape find shape string field name string field value geo shape shape null geo multi shape multi new geo multi shape for geo shape geo shape shapes data record data geo shape get data if data null string value data get text field field name if value equals ignore case field value if shape null shape geo shape multi add shape return multi size 1 multi shape
|
find a shape which matches a particular value for a text field
|
public double get angular radius return ang rad
|
return the angular radius of this geographic bounds
|
public geo shape get shape at point2 d pick point geo shape shape null for geo layer layer geo layers geo shape pick layer pick geo pick point if pick null shape pick return shape
|
return the geographic shape at the picked point
|
public void move to int x coord int y coord int steps point top left top frame get location on screen x coord top left x y coord top left y int x diff x coord loc x int y diff y coord loc y point orig new point loc for int cnt 1 cnt steps cnt mouse move orig x cnt x diff steps orig y cnt y diff steps repaint delay 100 loc new point x coord y coord
|
move to the specified point in the appropriate number of steps
|
public color get world color return world color
|
get the world color
|
public geo bounds get geo bounds return this
|
get the geographic bounds for this shape
|
public double get max latitude return max lat
|
return the maximum latitude in degrees
|
public double get max longitude return max lon
|
return the maximum longitude in degrees
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.