input
stringlengths 10
828
| output
stringlengths 5
107
|
|---|---|
public void clear top clear
|
clear the tree
|
public object get float lat float lon return top get lat lon
|
get an object closest to a lat lon
|
public object get float lat float lon double within distance return top get lat lon within distance
|
get an object closest to a lat lon within a maximum distance
|
public vector get float north float west float south float east return get north west south east new vector
|
get all the objects within a bounding box
|
protected quad tree node get child float lat float lon if bounds point within bounds lat lon if children null for int i 0 i children length i if children i bounds point within bounds lat lon return children i get child lat lon else return this no children lat lon here return null
|
get the node that covers a certain lat lon pair
|
public boolean put float lat float lon object obj return put new quad tree leaf lat lon obj
|
add a object into the tree at a location
|
public boolean put quad tree leaf leaf if children null this items add element leaf if this items size 1 this all the same point true this first lat leaf latitude this first lon leaf longitude else if this first lat leaf latitude this first lon leaf longitude this all the same point false if this items size max items this all the same point split return true else quad tree node node get child leaf latitude leaf longitude if node null return node put leaf return false
|
add a quad tree leaf into the tree at a location
|
public object remove float lat float lon object obj return remove new quad tree leaf lat lon obj
|
remove a object out of the tree at a location
|
public object remove quad tree leaf leaf if children null this must be the node that has it for int i 0 i items size i quad tree leaf qtl quad tree leaf items element at i if leaf object qtl object items remove element at i return qtl object else quad tree node node get child leaf latitude leaf longitude if node null return node remove leaf return null
|
remove a quad tree leaf out of the tree at a location
|
public void clear this items remove all elements if children null for int i 0 i children length i children i clear children null
|
clear the tree below this node
|
public object get float lat float lon return get lat lon double positive infinity
|
get an object closest to a lat lon
|
public object get float lat float lon double within distance return get lat lon new mutable distance within distance
|
get an object closest to a lat lon
|
public vector get float north float west float south float east return get new quad tree rect north west south east new vector
|
get all the objects within a bounding box
|
public vector get quad tree rect rect vector vector if children null enumeration things this items elements while things has more elements quad tree leaf qtl quad tree leaf things next element if rect point within bounds qtl latitude qtl longitude vector add element qtl object else for int i 0 i children length i if children i bounds within rect children i get rect vector return vector
|
get all the objects within a bounding box
|
public int get accounting int v accounting accounting v accounting 3 5 return accounting
|
this method retuns the efficency of the calculated accounting
|
public int get production int v production do calc production v production accounting return production
|
this method retuns the efficency of the calculated production
|
public void init this set size 310 232 generate the main window of the sme appliaction new main window new test
|
initialisation of the applet
|
private void initialize this set location 50 50 this set title sme de04 orange this set modal true this set maximum size new java awt dimension 300 200 this set minimum size new java awt dimension 300 200 this set default close operation javax swing window constants dispose on close this set size 400 300 this set content pane get jcontent pane this set resizable false this set preferred size new java awt dimension 300 200 this set visible true
|
this method initializes this
|
private void initialize get data if mode this set content pane get jpanel this set location 50 50 this set title simulation file details of sel fname this set modal true this set default close operation javax swing window constants dispose on close this set size 505 404 this set resizable false load values this set visible true
|
this method initializes this
|
private jscroll pane get jscroll pane1 if j scroll pane1 null j scroll pane1 new jscroll pane j scroll pane1 set preferred size new java awt dimension 400 400 j scroll pane1 set size new java awt dimension 400 400 j scroll pane1 set vertical scroll bar policy javax swing jscroll pane vertical scrollbar always return j scroll pane1
|
this method initializes j scroll pane1
|
private jprogress bar get jprogress bar sim if j progress bar sim null j progress bar sim new jprogress bar j progress bar sim set preferred size new java awt dimension 150 20 j progress bar sim add change listener new javax swing event change listener public void state changed javax swing event change event e system out println state changed todo auto generated event stub state changed run sim return j progress bar sim
|
this method initializes j progress bar
|
private jmenu bar get jjmenu bar if j jmenu bar null j jmenu bar new jmenu bar j jmenu bar add get jmenu j jmenu bar add get jmenu1 j jmenu bar add get jmenu item1 j jmenu bar add get jmenu item3 return j jmenu bar
|
this method initializes j jmenu bar
|
private jpanel get jpanel1 if j panel1 null j panel1 new jpanel j panel1 add new jlabel customer java awt border layout center j panel1 add get jcombo box1 null j panel1 add new jlabel value null j panel1 add get jtext field1 null return j panel1
|
this method initializes j panel
|
private jmenu get jmenu if j menu null j menu new jmenu j menu set text file j menu set mnemonic java awt event key event vk alt j menu set name f j menu set preferred size new java awt dimension 40 21 j menu set rollover enabled true j menu add get jmenu item j menu add get jmenu item4 j menu add get jmenu item1 return j menu
|
this method initializes j menu
|
private jcombo box get jcombo box1 if j combo box1 null j combo box1 new jcombo box j combo box1 add item yes j combo box1 add item no return j combo box1
|
this method initializes j combo box
|
private jmenu item get jmenu item1 if j menu item1 null j menu item1 new jmenu item j menu item1 set text close j menu item1 set enabled true j menu item1 set mnemonic java awt event key event vk alt j menu item1 set name c j menu item1 add action listener new java awt event action listener public void action performed java awt event action event e system out println action performed system exit 0 hide todo auto generated event stub action performed return j menu item1
|
this method initializes j menu item1
|
private jmenu get jmenu1 if j menu1 null j menu1 new jmenu j menu1 set text help j menu1 set preferred size new java awt dimension 40 21 j menu1 add get jmenu item2 j menu1 add get jmenu item3 return j menu1
|
this method initializes j menu1
|
private jmenu item get jmenu item2 if j menu item2 null j menu item2 new jmenu item j menu item2 set text help contents j menu item2 set enabled false return j menu item2
|
this method initializes j menu item2
|
private jmenu item get jmenu item3 if j menu item3 null j menu item3 new jmenu item j menu item3 set text about sme j menu item3 add action listener new java awt event action listener public void action performed java awt event action event e system out println action performed todo auto generated event stub action performed new copyright return j menu item3
|
this method initializes j menu item3
|
private jfile chooser get jfile chooser if j file chooser null j file chooser new jfile chooser j file chooser set name j file chooser set cursor new java awt cursor java awt cursor default cursor j file chooser add choosable file filter new file filter public boolean accept file f if f is directory return true return f get name to lower case ends with sme public string get description return smes sme j file chooser set file hiding enabled true return j file chooser
|
this method initializes j file chooser
|
private jtabbed pane get jtabbed pane if j tabbed pane null j tabbed pane new jtabbed pane j tabbed pane set size 300 200 tabs new settings tab 3 tabs 0 new main tab tabs 1 new minimal tab tabs 2 new advanced tab for settings tab t tabs j tabbed pane add tab t get tab name null t t get tab name t load return j tabbed pane
|
this method initializes j tabbed pane
|
private jpanel get jpanel if j panel null j panel new jpanel j panel set layout null j panel add get jtabbed pane null j panel add get jbutton ok null j panel add get jbutton aply null j panel add get jbutton cancel null return j panel
|
this method initializes j panel
|
private jbutton get jbutton ok if j button ok null j button ok new jbutton j button ok set bounds new rectangle 210 210 76 16 j button ok set text ok j button ok add action listener new java awt event action listener public void action performed java awt event action event e save set visible false return j button ok
|
this method initializes j button ok
|
private jbutton get jbutton aply if j button aply null j button aply new jbutton j button aply set bounds new rectangle 120 210 76 16 j button aply set text apply j button aply add action listener new java awt event action listener public void action performed java awt event action event e save return j button aply
|
this method initializes j button aply
|
private jtoggle button get jtoggle button minimal shifted if j toggle button minimal shifted null j toggle button minimal shifted new jtoggle button j toggle button minimal shifted set bounds new rectangle 75 30 151 16 j toggle button minimal shifted set text shifted view return j toggle button minimal shifted
|
this method initializes j toggle button minimal shifted
|
private jbutton get jbutton cancel if j button cancel null j button cancel new jbutton j button cancel set bounds new rectangle 30 210 76 16 j button cancel set text cancel j button cancel add action listener new java awt event action listener public void action performed java awt event action event e set visible false return j button cancel
|
this method initializes j button cancel
|
private jslider get jslider row count if j slider row count null j slider row count new jslider j slider row count set bounds new rectangle 75 75 151 31 j slider row count set minimum 1 j slider row count set maximum 20 j slider row count add change listener new javax swing event change listener public void state changed javax swing event change event e j label set text number of rows j slider row count get value return j slider row count
|
this method initializes j slider row count
|
private jtext field get jtext field icon path if j text field icon path null j text field icon path new jtext field j text field icon path set bounds new rectangle 75 30 151 16 return j text field icon path
|
this method initializes j text field icon path
|
private jslider get jslider size if j slider size null j slider size new jslider j slider size set bounds new rectangle 75 135 151 31 j slider size set minimum 65 j slider size set maximum 145 j slider size add change listener new javax swing event change listener public void state changed javax swing event change event e j label1 set text set size of a row j slider size get value return j slider size
|
this method initializes j slider size
|
private jtext field get jtext field notification interval if j text field notification interval null j text field notification interval new jtext field j text field notification interval set bounds new rectangle 75 120 60 16 j text field notification interval set horizontal alignment jtext field trailing j text field notification interval set text 30 j text field notification interval set tool tip text 0 to deactivate return j text field notification interval
|
this method initializes j text field notification interval
|
private jtoggle button get jtoggle button system start if j toggle button system start null j toggle button system start new jtoggle button j toggle button system start set bounds new rectangle 75 150 151 16 j toggle button system start set text start with system j toggle button system start set selected settings reader get instance is autostart j toggle button system start set enabled utils get os utils os windows utils get os os linux return j toggle button system start
|
this method initializes j toggle button system start
|
private jcheck box get jcheck box dev if j check box dev null j check box dev new jcheck box j check box dev set bounds new rectangle 165 120 31 16 return j check box dev
|
this method initializes j check box dev
|
private jtext field get jtext field host if j text field host null j text field host new jtext field j text field host set bounds new rectangle 75 75 151 16 return j text field host
|
this method initializes j text field host
|
private jcombo box get jcombo box broswer if j combo box broswer null browser launcher b list string l new array list string l add no browser found try b new browser launcher l b get browser list catch browser launching initializing exception e catch unsupported operating system exception e j combo box broswer new jcombo box l to array j combo box broswer set bounds new rectangle 75 75 151 16 return j combo box broswer
|
this method initializes j combo box broswer
|
private void initialize j label1 new jlabel j label1 set bounds new rectangle 150 90 631 31 j label1 set font new font dialog font bold 18 j label1 set text loading stations j label new jlabel j label set bounds new rectangle 45 15 391 31 j label set font new font dialog font bold 24 j label set text starting settings reader name this set size 817 448 this set layout null this add get image box null this add j label null this add j label1 null
|
this method initializes this
|
private image box get image box if image box null image box new image box image box set bounds new rectangle 60 75 76 76 image box set image utils image lodaer other bigrotation2 gif return image box
|
this method initializes image box
|
private void initialize j label humidity new jlabel j label precipitation new jlabel j label wind new jlabel j label temp new jlabel j label temp set tool tip text teprature j label text new jlabel j label day new jlabel this set size 100 100 this set layout new box layout this box layout y axis this add j label day null this add j label text null this add j label temp null this add j label precipitation null this add j label wind null this add j label humidity null
|
this method initializes this
|
public image box get image box if image box null image box new image box image box set bounds new rectangle 15 45 76 76 image box set tool tip text visit accu weather forecast image box add mouse listener new java awt event mouse adapter public void mouse clicked java awt event mouse event e utils visit url url return image box
|
this method initializes image box
|
private void initialize j label title new jlabel j label title set bounds new rectangle 0 0 241 16 this set size 420 92 this set layout null for int i 0 i 6 i this add get image box i null this add get data 0 null this add j label title null
|
this method initializes this
|
private jscroll bar get jscroll bar if j scroll bar null j scroll bar new jscroll bar j scroll bar set maximum 0 j scroll bar set bounds new rectangle 315 165 16 136 j scroll bar add adjustment listener new java awt event adjustment listener public void adjustment value changed java awt event adjustment event e update j scroll bar get value return j scroll bar
|
this method initializes j scroll bar
|
private data get data int i if data null data new data size data set location new point 60 30 data set size new dimension 50 46 return data
|
this method initializes data
|
private void initialize try system tray get system tray add get tray icon catch awtexception e1 todo auto generated catch block e1 print stack trace this set resizable false this set size new dimension 817 448 this set content pane get splash this set default close operation jframe hide on close this set title settings reader name this set icon image utils image lodaer settings reader get instance get iconp path 01 png this add window listener new java awt event window adapter public void window iconified java awt event window event e set visible false
|
this method initializes this
|
private jtext field get jtext field serch if j text field serch null j text field serch new jtext field j text field serch set bounds new rectangle 15 15 226 16 j text field serch add key listener new java awt event key adapter public void key typed java awt event key event e if e get key char n search return j text field serch
|
this method initializes j text field serch
|
private splash get splash if splash null splash new splash return splash
|
this method initializes splash
|
private jbutton get jbutton search if j button search null j button search new jbutton j button search set text search j button search set bounds new rectangle 255 15 76 16 j button search add action listener new java awt event action listener public void action performed java awt event action event e search return j button search
|
this method initializes j button search
|
private jcombo box get jcombo box results if j combo box results null j combo box results new jcombo box j combo box results set bounds new rectangle 15 45 226 16 location list loc accuweather fetcher search new york for location l loc j combo box results add item l return j combo box results
|
this method initializes j combo box results
|
private jbutton get jbutton add if j button add null j button add new jbutton j button add set text add j button add set bounds new rectangle 255 45 76 16 j button add add action listener new java awt event action listener public void action performed java awt event action event e if j combo box results get selected item null new thread public void run location l location j combo box results get selected item add location l displayed 1 update l get nr start return j button add
|
this method initializes j button add
|
private weather panel get weather panel if weather panel null weather panel new weather panel weather panel set bounds new rectangle 15 165 300 136 return weather panel
|
this method initializes weather panel
|
private weather panel get weather panel day1 if weather panel day1 null weather panel day1 new weather panel weather panel day1 set location new point 15 15 weather panel day1 set size new dimension 300 136 return weather panel day1
|
this method initializes weather panel day1
|
private weather panel get weather panel day2 if weather panel day2 null weather panel day2 new weather panel weather panel day2 set bounds new rectangle 15 165 300 136 return weather panel day2
|
this method initializes weather panel day2
|
private jscroll bar get jscroll bar1 forecast if j scroll bar1 forecast null j scroll bar1 forecast new jscroll bar j scroll bar1 forecast set bounds new rectangle 315 15 16 286 j scroll bar1 forecast set values 1 1 1 5 j scroll bar1 forecast add adjustment listener new java awt event adjustment listener public void adjustment value changed java awt event adjustment event e adjust forecast return j scroll bar1 forecast
|
this method initializes j scroll bar1 forecast
|
private image box get image box logo if image box logo null image box logo new image box image box logo set bounds new rectangle 540 390 241 16 image box logo set image utils image lodaer logo accuweather logotype color png image box logo set tool tip text visit accu weather image box logo add mouse listener new java awt event mouse adapter public void mouse clicked java awt event mouse event e utils visit url http www accuweather com return image box logo
|
this method initializes image box logo
|
private jpanel get jpanel units if j panel units null j panel units new jpanel j panel units set layout null j panel units set bounds new rectangle 15 90 196 46 j panel units set border border factory create etched border etched border lowered j panel units add j label2 null j panel units add j label3 null j panel units add get jradio button english null j panel units add get jradio button metric null button group bg new button group bg add j radio button english bg add j radio button metric return j panel units
|
this method initializes j panel units
|
private jradio button get jradio button metric if j radio button metric null j radio button metric new jradio button j radio button metric set bounds new rectangle 165 15 16 16 return j radio button metric
|
this method initializes j radio button metric
|
private jcombo box get jcombo box quick switch if j combo box quick switch null j combo box quick switch new jcombo box j combo box quick switch set bounds new rectangle 120 150 211 16 j combo box quick switch add item listener new java awt event item listener public void item state changed java awt event item event e if j combo box quick switch get selected item null return update j combo box quick switch get selected index j scroll bar set value j combo box quick switch get selected index return j combo box quick switch
|
this method initializes j combo box quick switch
|
private jtoggle button get jtoggle button day if j toggle button day null j toggle button day new jtoggle button j toggle button day set bounds new rectangle 75 315 106 16 j toggle button day set text day j toggle button day set selected true j toggle button day add change listener new javax swing event change listener public void state changed javax swing event change event e if parent get locations size 0 adjust forecast return j toggle button day
|
this method initializes j toggle button day
|
private jtoggle button get jtoggle button night if j toggle button night null j toggle button night new jtoggle button j toggle button night set bounds new rectangle 180 315 91 16 j toggle button night set text night j toggle button night add change listener new javax swing event change listener public void state changed javax swing event change event e if parent get locations size 0 adjust forecast return j toggle button night
|
this method initializes j toggle button night
|
private image box get image box loading if image box loading null image box loading new image box image box loading set bounds new rectangle 240 87 61 54 image box loading set image utils image lodaer other bigrotation2 gif image box loading set visible false return image box loading
|
this method initializes image box loading
|
private void kickoff shotclock timeout position setr 0 velocity setr 0 kick off req false
|
kick off it puts the ball in the middle of the field
|
private void special kickoff shotclock timeout random rand gen new random position setr rand gen next float if rand gen next boolean position sett vec2 pi 2 else position sett vec2 pi 2 velocity setr 0 kick off req false
|
special kickoff it puts the ball in a random position in the
|
public void request kickoff kick off req true
|
request the kickoff
|
public void create package contents if is created return is created true create classes and their features movement eclass create eclass movement operation eclass create eclass operation create eattribute operation eclass operation start date create eattribute operation eclass operation duration
|
creates the meta model objects for the package
|
public adapter create movement adapter return null
|
creates a new adapter for an object of class
|
public adapter create acquired measure adapter return null
|
creates a new adapter for an object of class
|
public adapter create calibration adapter return null
|
creates a new adapter for an object of class
|
public adapter create calculated measure adapter return null
|
creates a new adapter for an object of class
|
public adapter create calculated measure parameter adapter return null
|
creates a new adapter for an object of class
|
public adapter create noise event adapter return null
|
creates a new adapter for an object of class
|
public adapter create noise event parameter adapter return null
|
creates a new adapter for an object of class
|
public adapter create level history adapter return null
|
creates a new adapter for an object of class
|
public adapter create spectrum history adapter return null
|
creates a new adapter for an object of class
|
public adapter create time history adapter return null
|
creates a new adapter for an object of class
|
public adapter create time history parameter adapter return null
|
creates a new adapter for an object of class
|
public adapter create time history sample adapter return null
|
creates a new adapter for an object of class
|
public void create package contents if is created return is created true create classes and their features certification eclass create eclass certification create eattribute certification eclass certification number create ereference certification eclass certification device create ereference certification eclass certification validity create ereference certification eclass certification authority
|
creates the meta model objects for the package
|
public adapter create airport adapter return null
|
creates a new adapter for an object of class
|
public adapter create linear infrastructure adapter return null
|
creates a new adapter for an object of class
|
public adapter create point set infrastructure adapter return null
|
creates a new adapter for an object of class
|
public adapter create polygonal infrastructure adapter return null
|
creates a new adapter for an object of class
|
public adapter create receptor adapter return null
|
creates a new adapter for an object of class
|
public adapter create sub network adapter return null
|
creates a new adapter for an object of class
|
public adapter create iso level curve adapter return null
|
creates a new adapter for an object of class
|
public adapter create authority adapter return null
|
creates a new adapter for an object of class
|
public adapter create noise owner adapter return null
|
creates a new adapter for an object of class
|
public adapter create subject adapter return null
|
creates a new adapter for an object of class
|
public void create package contents if is created return is created true create classes and their features authority eclass create eclass authority executor eclass create eclass executor noise owner eclass create eclass noise owner create ereference noise owner eclass noise owner networks subject eclass create eclass subject create eattribute subject eclass subject name create ereference subject eclass subject address
|
creates the meta model objects for the package
|
public adapter create coordinate reference system adapter return null
|
creates a new adapter for an object of class
|
public adapter create coordinate system adapter return null
|
creates a new adapter for an object of class
|
public adapter create datum adapter return null
|
creates a new adapter for an object of class
|
public void create package contents if is created return is created true create classes and their features validity eclass create eclass validity create eattribute validity eclass validity valid create ereference validity eclass validity certification create ereference validity eclass validity measure
|
creates the meta model objects for the package
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.