input
stringlengths
10
828
output
stringlengths
5
107
private jtext field get web app db password text field if web app db password text field null web app db password text field new jtext field web app db password text field set bounds new rectangle 120 167 250 21 return web app db password text field
this method initializes web app db password text field
private jbutton get web app dbinfo okbutton if web app dbinfo okbutton null web app dbinfo okbutton new jbutton web app dbinfo okbutton set bounds new rectangle 157 210 80 25 web app dbinfo okbutton set text ok web app dbinfo okbutton add action listener new java awt event action listener public void action performed java awt event action event e setup web app dbinfo commit info web app dbinfo dialog set visible false return web app dbinfo okbutton
this method initializes web app dbinfo okbutton
private jmenu item get upload term stats menu item if upload term stats menu item null upload term stats menu item new jmenu item upload term stats menu item set text term statistics upload term stats menu item set mnemonic key event vk t upload term stats menu item add action listener new java awt event action listener public void action performed java awt event action event e upload term stats return upload term stats menu item
this method initializes upload term stats menu item
private jframe get jframe if j frame null j frame new jframe j frame set default close operation jframe exit on close j frame set jmenu bar get jjmenu bar j frame set size 700 450 j frame set content pane get jcontent pane j frame set title delphi j frame add window listener new java awt event window adapter public void window closing java awt event window event e check on exit system out println window closing todo auto generated event stub window closing return j frame
this method initializes j frame
private jpanel get jcontent pane if j content pane null j content pane new jpanel j content pane set layout new border layout j content pane add get logo panel border layout center return j content pane
this method initializes j content pane
private jmenu get file menu if file menu null file menu new jmenu file menu set text file file menu set mnemonic f file menu add get new menu item file menu add get open menu item file menu add get copy proj menu item file menu add get save menu item file menu add get save as menu item file menu add get exit menu item return file menu
this method initializes j menu
private jmenu item get new menu item if new menu item null new menu item new jmenu item new menu item set text new project new menu item set mnemonic n new menu item set accelerator key stroke get key stroke key event vk n event ctrl mask true new menu item add action listener new java awt event action listener public void action performed java awt event action event e create new project file null return new menu item
this method initializes the file new j menu item
private jmenu item get open menu item if open menu item null open menu item new jmenu item open menu item set text open project open menu item set mnemonic o open menu item set accelerator key stroke get key stroke key event vk o event ctrl mask true open menu item add action listener new java awt event action listener public void action performed java awt event action event e open project file return open menu item
this method initializes the file open j menu item
private jmenu item get copy proj menu item if copy proj menu item null copy proj menu item new jmenu item copy proj menu item set text copy current project copy proj menu item set mnemonic c copy proj menu item set accelerator key stroke get key stroke key event vk n event ctrl mask true copy proj menu item add action listener new java awt event action listener public void action performed java awt event action event e create new project file user proj info return copy proj menu item
this method initializes the file copy j menu item
private jmenu item get save menu item if save menu item null save menu item new jmenu item save menu item set text save project save menu item set mnemonic s save menu item set accelerator key stroke get key stroke key event vk s event ctrl mask true save menu item add action listener new java awt event action listener public void action performed java awt event action event e if app settings get last user project path null save project file as else save project file return save menu item
this method initializes the file save j menu item
private jmenu item get save as menu item if save as menu item null save as menu item new jmenu item save as menu item set text save project as save as menu item set mnemonic a save as menu item set accelerator key stroke get key stroke key event vk a event ctrl mask true save as menu item add action listener new java awt event action listener public void action performed java awt event action event e save project file as return save as menu item
this method initializes the file save as j menu item
private jmenu get analyze menu if analyze menu null analyze menu new jmenu analyze menu set text analyze analyze menu set mnemonic a analyze menu add get obj info term usage menu item analyze menu add get obj concept assoc menu item analyze menu add get obj concept assoc by facet menu item return analyze menu
this method initializes the analyze j menu
private jmenu item get obj concept assoc menu item if obj concept assoc menu item null obj concept assoc menu item new jmenu item obj concept assoc menu item set text object concept association obj concept assoc menu item set mnemonic a obj concept assoc menu item add action listener new java awt event action listener public void action performed java awt event action event e categorize objects true return obj concept assoc menu item
this method initializes analyze object concept association j menu item
private jmenu item get obj concept assoc by facet menu item if obj concept assoc by facet menu item null obj concept assoc by facet menu item new jmenu item obj concept assoc by facet menu item set text object concept association by facet obj concept assoc by facet menu item set mnemonic f obj concept assoc by facet menu item add action listener new java awt event action listener public void action performed java awt event action event e categorize objects false return obj concept assoc by facet menu item
this method initializes analyze object concept association j menu item
private jmenu get images menu if images menu null images menu new jmenu images menu set text images images menu set mnemonic m images menu add get compute image orientations menu item images menu add get import menu return images menu
this method initializes j menu
private jmenu item get compute image orientations menu item if compute image orientations menu item null compute image orientations menu item new jmenu item compute image orientations menu item set text compute image orientations compute image orientations menu item set mnemonic o compute image orientations menu item add action listener new action listener public void action performed action event e compute image orientations save image path sql compute image orientations menu item set enabled false proj rework return compute image orientations menu item
this method initializes the images compute orientations j menu item
private jmenu item get build object sqlmenu item if build object sqlmenu item null build object sqlmenu item new jmenu item build object sqlmenu item set text object info build object sqlmenu item set mnemonic o build object sqlmenu item add action listener new action listener public void action performed action event e save object sql return build object sqlmenu item
this method initializes export object info j menu item
private jmenu get concept ontology menu if concept ontology menu null concept ontology menu new jmenu concept ontology menu set text concept ontology concept ontology menu set mnemonic c concept ontology menu add get save ontology as sqlmenu item concept ontology menu add get save hooks as sqlmenu item concept ontology menu add get save exclusions as sqlmenu item concept ontology menu add get save vocab as xmlmenu item return concept ontology menu
this method initializes the export concept ontology j menu
private jmenu get image paths menu if image paths menu null image paths menu new jmenu image paths menu set text image paths image paths menu set mnemonic i image paths menu add get save sqlmedia load file menu item image paths menu add get save sqlmedia insert file menu item return image paths menu
this method initializes the export image paths j menu
private jmenu item get save vocab as xmlmenu item if save vocab as xmlmenu item null save vocab as xmlmenu item new jmenu item save vocab as xmlmenu item set text save vocabulary as xml save vocab as xmlmenu item set mnemonic v save vocab as xmlmenu item add action listener new action listener public void action performed action event e save vocab as xml return save vocab as xmlmenu item
this method initializes j menu item
private jmenu item get save ontology as sqlmenu item if save ontology as sqlmenu item null save ontology as sqlmenu item new jmenu item save ontology as sqlmenu item set text save ontology as sql load save ontology as sqlmenu item set mnemonic o save ontology as sqlmenu item add action listener new action listener public void action performed action event e save ontology as sql return save ontology as sqlmenu item
this method initializes j menu item
private jmenu item get save hooks as sqlmenu item if save hooks as sqlmenu item null save hooks as sqlmenu item new jmenu item save hooks as sqlmenu item set text save hooks as sql load save hooks as sqlmenu item set mnemonic h save hooks as sqlmenu item add action listener new action listener public void action performed action event e save hooks or exclusions as sql true return save hooks as sqlmenu item
this method initializes j menu item
private jmenu item get save exclusions as sqlmenu item if save exclusions as sqlmenu item null save exclusions as sqlmenu item new jmenu item save exclusions as sqlmenu item set text save exclusions as sql load save exclusions as sqlmenu item set mnemonic e save exclusions as sqlmenu item add action listener new action listener public void action performed action event e save hooks or exclusions as sql false return save exclusions as sqlmenu item
this method initializes j menu item
private void save project file try user project info save to path user proj info app settings get last user project path set status saved project info catch runtime exception e joption pane show message dialog get jframe error encountered n e to string save project file error joption pane error message
saves the current project file
private jmenu item get exit menu item if exit menu item null exit menu item new jmenu item exit menu item set text exit exit menu item set mnemonic x exit menu item add action listener new action listener public void action performed action event e check on exit system exit 0 return exit menu item
this method initializes j menu item
private jdialog get about dialog if about dialog null about dialog new jdialog get jframe about delphi true about dialog set size new dimension 526 460 about dialog set content pane get about content pane return about dialog
this method initializes about dialog
private jlabel get about version label if about version label null about version label new jlabel about version label set text delphi import manager version 0 2 about version label set horizontal text position swing constants center about version label set horizontal alignment swing constants center return about version label
this method initializes about version label
private jdialog get build usage report dialog if build usage report dialog null build usage report dialog new jdialog get jframe true build usage report dialog set title build usage report build usage report dialog set size new dimension 418 338 build usage report dialog set content pane get build usage report pane return build usage report dialog
this method initializes build usage report dialog
private jscroll pane get burcolumn list scroll pane if bur col list scroll pane null bur col list scroll pane new jscroll pane get burcolumn list scroll pane constants vertical scrollbar as needed scroll pane constants horizontal scrollbar never return bur col list scroll pane
this method initializes bur col list scroll pane
private jlist get burcolumn list if bur column list null string show column names user proj info meta data reader get column names clone show column names 0 all bur column list new jlist show column names bur column list set selection mode list selection model single selection if show column names length 6 bur column list set visible row count 6 return bur column list
initialize the list of columns for which user can request to
private jlabel get build usage report label if build usage report label null build usage report label new jlabel build usage report label set text choose a column for which to build a usage report build usage report label set horizontal text position swing constants center build usage report label set horizontal alignment swing constants left java awt font font build usage report label get font build usage report label set font font derive font font get size2 d float 1 2 return build usage report label
this method initializes build usage report label
protected boolean browse to ontology file boolean opened false chooser set file filter xml filter set chooser start for user proj info get ontology path xml wildcard chooser set dialog title open ontology file int return val chooser show open dialog get jframe if return val jfile chooser approve option if opened set ontology file chooser get selected file get path j text field ontology file set text user proj info get ontology path return opened
opens an xml ontology file in delphi format
protected boolean browse to vocab file boolean opened false chooser set file filter txt filter set chooser start for user proj info get vocab terms path txt wildcard chooser set dialog title open vocabulary export file int return val chooser show open dialog get jframe if return val jfile chooser approve option if opened set vocab file chooser get selected file get path j text field vocab file set text user proj info get vocab terms path return opened
lets the user choose a vocabulary file to open and then calls
public object visit compilation unit n object argu object ret null n f0 accept this argu n f1 accept this argu n f2 accept this argu n f3 accept this argu return ret
f0 package declaration
public object visit type declaration n object argu object ret null n f0 accept this argu return ret
f0 class declaration
public object visit class declaration n object argu object ret null n f0 accept this argu n f1 accept this argu return ret
f0 abstract final public
public object visit nested class declaration n object argu object ret null n f0 accept this argu n f1 accept this argu return ret
f0 static abstract final public protected private
public object visit method declaration lookahead n object argu object ret null n f0 accept this argu n f1 accept this argu n f2 accept this argu n f3 accept this argu return ret
f0 public protected private static abstract final native synchronized
public object visit interface declaration n object argu object ret null n f0 accept this argu n f1 accept this argu return ret
f0 abstract public
public object visit nested interface declaration n object argu object ret null n f0 accept this argu n f1 accept this argu return ret
f0 static abstract final public protected private
public object visit interface member declaration n object argu object ret null n f0 accept this argu return ret
f0 nested class declaration
public object visit field declaration n object argu object ret null n f0 accept this argu n f1 accept this argu n f2 accept this argu n f3 accept this argu n f4 accept this argu return ret
f0 public protected private static final transient volatile
public object visit variable declarator n object argu object ret null n f0 accept this argu n f1 accept this argu return ret
f0 variable declarator id
public object visit variable initializer n object argu object ret null n f0 accept this argu return ret
f0 array initializer
public object visit method declaration n object argu object ret null n f0 accept this argu n f1 accept this argu n f2 accept this argu n f3 accept this argu n f4 accept this argu return ret
f0 public protected private static abstract final native synchronized
public object visit constructor declaration n object argu object ret null n f0 accept this argu n f1 accept this argu n f2 accept this argu n f3 accept this argu n f4 accept this argu n f5 accept this argu n f6 accept this argu n f7 accept this argu return ret
f0 public protected private
public object visit explicit constructor invocation n object argu object ret null n f0 accept this argu return ret
f0 this arguments
public object visit type n object argu object ret null n f0 accept this argu n f1 accept this argu return ret
f0 primitive type name
public object visit expression n object argu object ret null n f0 accept this argu n f1 accept this argu return ret
f0 conditional expression
public object visit conditional expression n object argu object ret null n f0 accept this argu n f1 accept this argu return ret
f0 conditional or expression
public object visit conditional or expression n object argu object ret null n f0 accept this argu n f1 accept this argu return ret
f0 conditional and expression
public object visit conditional and expression n object argu object ret null n f0 accept this argu n f1 accept this argu return ret
f0 inclusive or expression
public object visit exclusive or expression n object argu object ret null n f0 accept this argu n f1 accept this argu return ret
f0 and expression
public object visit and expression n object argu object ret null n f0 accept this argu n f1 accept this argu return ret
f0 equality expression
public object visit equality expression n object argu object ret null n f0 accept this argu n f1 accept this argu return ret
f0 instance of expression
public object visit instance of expression n object argu object ret null n f0 accept this argu n f1 accept this argu return ret
f0 relational expression
public object visit relational expression n object argu object ret null n f0 accept this argu n f1 accept this argu return ret
f0 shift expression
public object visit shift expression n object argu object ret null n f0 accept this argu n f1 accept this argu return ret
f0 additive expression
public object visit additive expression n object argu object ret null n f0 accept this argu n f1 accept this argu return ret
f0 multiplicative expression
public object visit multiplicative expression n object argu object ret null n f0 accept this argu n f1 accept this argu return ret
f0 unary expression
public object visit unary expression n object argu object ret null n f0 accept this argu return ret
f0 unary expression
public object visit unary expression not plus minus n object argu object ret null n f0 accept this argu return ret
f0 unary expression
public object visit cast lookahead n object argu object ret null n f0 accept this argu return ret
f0 primitive type
public object visit postfix expression n object argu object ret null n f0 accept this argu n f1 accept this argu return ret
f0 primary expression
public object visit cast expression n object argu object ret null n f0 accept this argu return ret
f0 type unary expression
public object visit primary expression n object argu object ret null n f0 accept this argu n f1 accept this argu return ret
f0 primary prefix
public object visit literal n object argu object ret null n f0 accept this argu return ret
f0 integer literal
public object visit allocation expression n object argu object ret null n f0 accept this argu return ret
f0 new primitive type array dims and inits
public object visit statement n object argu object ret null n f0 accept this argu return ret
f0 labeled statement
public object visit block statement n object argu object ret null n f0 accept this argu return ret
f0 local variable declaration
public object visit statement expression n object argu object ret null n f0 accept this argu return ret
f0 pre increment expression
public object visit for init n object argu object ret null n f0 accept this argu return ret
f0 local variable declaration
public object visit statement expression list n object argu object ret null n f0 accept this argu n f1 accept this argu return ret
f0 statement expression
private void create new log file this log file melitta log try this logbw new buffered writer new file writer this log file true catch exception e joption pane show message dialog null createlogerror logger error joption pane error message
creates a new logfile
public void add log type type string log text string formatted line try formatted line get formatted line type log text this logbw write formatted line this logbw flush catch ioexception e e print stack trace joption pane show message dialog null ioerror logging error i o joption pane error message
add a line to a logfile
public void add row weather data entity data data list add data int size data list size 1 fire table rows inserted size size
adds a list to the itemlist
public void clear int size data list size if size 0 data list clear fire table rows deleted 0 size 1
clears the item list
public weather data entity get weather object int row index return data list get row index
gets a weather object for a spcific row
public void value changed list selection event e list selection model lsm list selection model e get source if e get value is adjusting get the selected row int selected row table get selected row weather data entity weather data if selected row 0 no selection weather data null else weather table model model weather table model table get model weather data model get weather object table convert row index to model selected row set the panel detail information frame selected city changed weather data
handles the event when a value of the target list has changed
public void set image image icon image this image image repaint
sets the image of this jimage panel instance
public city entity get city return this city
gets the city entity this weather data entity belongs to
public void set city list city entity cities this provider runner set cities cities
sets the cities on the provider
public object get value at int row index int column index if column index city column return data list get row index get city get city name if column index temp column return data list get row index if column index cond column return utilities condition to string data list get row index get condition if column index img column return data list get row index get condition if column index hum column return data list get row index if column index wind column return data list get row index return
gets the value of a specific row in a specific column
public weather condition get condition return this condition
gets the current weather condition
private void initialize from settings load icon set if app settings get instance get icon set icon set icon set1 j radio button icon1 set selected true else j radio button icon2 set selected true load cities city list model default list model j list cities get model city list model clear for string city app settings get instance get city list city list model add element city
display the settings provided by the app settings class
public void set data collector idata collector data collector synchronized this thread syncer this data collector data collector this thread syncer notify log get log add log type info assigned new data collector and forced re calculation of data
sets an idata collector on this instance for retreiving weather data
public icon set get icon set return this icon set
gets the icon set currently used to visualize the weather conditions
public void set storage manager istorage manager storage manager synchronized this thread syncer this storage manager storage manager this thread syncer notify log get log add log type info assigned new storage manager and forced re calculation of data
sets the istorage manager for saving loading weather data
public void set icon set icon set icon set this prefs put icon set key icon set to string this icon set icon set log get log add log type info icon set set by user
sets the icon set to be used to visualize the weather conditions
public void set city list string city list prefs put city list key utilities join list city list this city list city list this refresh cities log get log add log type info city list set by user
sets the list of cities to be used for generating random weather
public void dispose if this keep running synchronized thread syncer keep running false thread syncer notify try this generation thread join log get log add log type info data provider has shut down catch interrupted exception ex log get log add log type error error shutting down data provider ex get message
releases resources used by the current data provider instance
private void save settings save icon set if j radio button icon1 is selected app settings get instance set icon set icon set icon set1 else app settings get instance set icon set icon set icon set2 save cities string string array arrays copy of city list model to array city list model get size string class app settings get instance set city list string array
saves the settings back to the app settings class
public string get temperature string return string format d c temperature
gets a formatted string representing the current temperature
public void set cities city entity cities synchronized thread syncer this cities cities thread syncer notify log get log add log type info assigned new city list and forced re calculation of data
sets the list of cities used to generate weather
public string get humidity string return string format d humidity
gets a formatted string representing the current humidity
private void check cities this fixes a bug with the handler if every city is being removed the default value for a city blank this way if no value is present z rich will be added by default severin if this city list length 0 this city list length 1 this city list 0 trim equals this city list new string z rich
ensures that the user never sees an empty list
public string get wind string return string format d km h d wind speed wind direction
gets a formatted string representing the current wind speed and direction
public void run while keep running synchronized thread syncer try thread syncer wait 10000 if this cities null data collector null weather data entity weather data data collector get weather data this cities storage manager save object list weather data weather file catch interrupted exception ex log get log add log type error ex get message finally thread syncer notify
runs this runnable
public int compare weather data entity v1 weather data entity v2 return new integer v1 get temperature compare to new integer v2 get temperature
enables the jtable with the weather data to sort by temperature
public int compare weather data entity v1 weather data entity v2 return new integer v1 get humidity compare to new integer v2 get humidity
enables the jtable with the weather data to sort by humidity