input
stringlengths 10
828
| output
stringlengths 5
107
|
|---|---|
private void send feedback string feedback string if this gui feedback null return if this run flag is running return this gui feedback receive feedback feedback string
|
send a feedback string the gui
|
public string find string file string reg expession throws exception this logger finest reading the file file string found string null string file content this get file content new file file this logger finest compiling the regular expression reg expession java util regex pattern pattern java util regex pattern compile reg expession this logger finest matching the expression reg expession in file file java util regex matcher matcher pattern matcher file content if matcher find found string matcher group this logger finest found found string in file file else this logger finest nothing found in file file return found string
|
finds the first match of a search in a file
|
public void add matrix int m for int i 0 i m length i for int j 0 j m 0 length j m i j this matrix i j
|
adds this matrix to the matrix m by the operation
|
public void sub matrix int m for int i 0 i m length i for int j 0 j m 0 length j m i j this matrix i j
|
subtracts this matrix from the matrix m by the operation
|
public void sub matrix int m if m length this matrix length m 0 length this matrix 0 length for int i 0 i m length i for int j 0 j m 0 length j m i j this matrix i j else system out println cannot subtract matrices of different sizes
|
subtracts this matrix from the matrix m by the operation
|
public void update attribute names filter flux attributes attribute statistics update attribute statistics
|
calculates the val attributes based on the current node attributes
|
public void init string line system out println line line string items line split t todo test the simulation file and raise errors name items 0 val target items 1 constraints items 2 evaluation items 3 if items length 4 comment items 4
|
initialises the flux info object from the given simulation line
|
public create subdirectory string fname string parent new file fname get parent if parent null return else suppress warnings unused create subdirectory tmp new create subdirectory parent file dir new file parent if dir exists boolean success dir mkdir if success true system out println created dir dir get path else system out println not created dir get path
|
creates all nesessary subdirectories for the file
|
public void print system out println extract jar file dest dir
|
print the extraction information
|
public string to html string out b min b min br out b max b max br out b abs min b abs min br out b abs max b abs max br out b abs mean b abs mean br out b flux fraction b reactions zero reactions reactions flux fraction br return out
|
create html output of the statistics
|
public void print string out min min n out max max n out abs min abs min n out abs max abs max n out abs mean abs mean n out flux fraction reactions zero reactions reactions flux fraction n system out println out
|
print the statistics
|
public void init init empty structure statistics map new hash map string flux statistics get all attribute names and generate the statistics data flux statistics flux stat for string name flux viz get flux attributes get attribute names flux stat new flux statistics cytoscape get node attributes cytoscape get edge attributes name statistics map put name flux stat
|
calculate the flux statistics based on the current flux distributions
|
public flux statistics get string name return statistics map get name
|
get single statistics based on attribute name
|
public void hyperlink update hyperlink event evt url url evt get url if url null if evt get event type hyperlink event event type entered cytoscape wrapper set status bar msg url to string else if evt get event type hyperlink event event type exited cytoscape wrapper clear status bar else if evt get event type hyperlink event event type activated open browser open url url to string
|
user has clicked on a hyper link
|
public void uninstall throws ioexception file dir new file file util get flux viz data directory get canonical path delete dir delete directory dir
|
removes the flux viz directory from home
|
public string describe string buffer sb new string buffer sb append flux viz visualisation of flux distributions in networks return sb to string
|
gives a description of the plugin
|
public void init table object list objects set table model table model new default table model column names 0 flux table set model table model add sorter to the table todo create table sorter flux table set auto create row sorter true define the size of the columns table column column flux table get column model get column 0 column set preferred width 220 column flux table get column model get column 1 column set preferred width 40 column flux table get column model get column 2 column set preferred width 40 update table list objects
|
initialises the table in the panel with given objects
|
public void clear table if table model get row count 0 table model set row count 0
|
clears the table model
|
public void update text javax swing jeditor pane pane string html text string info head base href file home mkoenig workspace fluxviz base style type text css body font family sans serif font size 11pt style head body info html text info body html pane set text info
|
updates the displayed information in the information pane
|
public void value changed list selection event e if e get value is adjusting false int selected flux table get selected row if selected 1 string attribute string table model get value at selected 0 network view apply flux viz view attribute
|
handles the selections in the flux distribution table
|
public void add contact contact contact contacts add contact
|
adds a jsms
|
public void add interaction interaction interaction interactions add interaction
|
adds an jsms
|
public void clear nbsi cleared new nbsi 63 new counter this an empty initial nbsi while cas nbsi nbsi cleared spin until clear works
|
empty the bitvector
|
public void set long x cat newcat new cat null 4 x spin until cas works while cas cat cat newcat
|
atomically set the sum of the striped counters to specified value
|
public boolean replace long key type v old value type v new value return replace long key long value old value new value
|
auto boxing version of
|
public flight get current flight logger debug get current flight clalled return current flight
|
gets the current flight attribute of the flight panel object
|
public boolean plausi logger debug plausi clalled return this txt id get text equals
|
checks if entered data makes sense
|
public void init nos frame logger debug init nos frame called try super init nos frame catch exception err logger error init nos frame failed err
|
initializes the frame
|
public void do default close action logger debug do default close action clalled super do default close action
|
closes the frame after saving the log book
|
public void fill up logger debug fill up clalled try flight log book stats table model model new flight log book stats table model this current log book stats table set model model stats table set column model model get column model stats table update ui catch exception err logger error fill up failed err
|
fills up the frame creates grid
|
private void jb init throws exception logger debug jb init clalled this set closable true set resizable true set size new dimension 750 514 get content pane set layout border layout1 about pane set editable false about pane set text j editor pane1 this get content pane add scroll pane border layout center scroll pane get viewport add about pane null
|
description of the method
|
private void jb init throws exception logger debug jb init clalled this set closable true set size new dimension 498 514 get content pane set layout border layout1 about pane set editable false about pane set text j editor pane1 this get content pane add scroll pane border layout center scroll pane get viewport add about pane null
|
description of the method
|
public void init nos frame logger debug init nos frame called try super init nos frame set title manual controller get translation application title ch nostromo jflightlog jflight log version url url controller get gui resource shortmanual html about pane set page url catch exception err logger error init nos frame failed err
|
loads the about
|
public void do default close action logger debug do default close action clalled this flight screen shot panel stop cig super do default close action
|
closes the frame and stops possible running clipboard image grabber threads
|
public void init nos frame logger debug init nos frame called try super init nos frame set title about controller get translation application title ch nostromo jflightlog jflight log version url url controller get gui resource about html about pane set page url catch exception err logger error init nos frame failed err
|
loads the about
|
public flight get flight int row logger debug get flight called return flights row
|
gets the flight attribute of the flight table model object
|
public void delete file string dir logger debug delete file called try file to delete new file dir file name to delete delete catch exception ignore ignore screenshots may be scaned again
|
deletes a screenshot file
|
public int get total screen shots count return screen shots size
|
gets the total screen shots count attribute of the flight object
|
public int compare to object o flight screen shot tmp flight screen shot o return this get file name compare to tmp get file name
|
implements the comparable interface for sorting screenshots
|
public void stop cig logger debug stop cig clalled if this cig null cig stop running cig null
|
stops a running clipboard image grabber
|
public void scan for screen shots logger debug scan for screen shots called for int i 0 i flights size i flight tmp flight flights get i tmp scan for screen shots this screenshot folder
|
scans the screenshot folder for new screenshots to attach to flights
|
public double get total distance logger debug get total distance called double result 0 for int i 0 i flights size i flight tmp flight flights get i result tmp get distance result math round result 100 100 return result
|
returns the total distance of all flights
|
public void fill up logger debug fill up clalled try txt scale set text controller get app setting flight log settings key application image scale catch exception ignored txt scale set text 50 load image this txt description set text current flight screen shot get comments
|
fills up the form
|
public void save data to record logger debug save data to record clalled if current flight screen shot null this current flight screen shot set comments txt description get text
|
saves the form fields to the current screenshot
|
public properties get default settings properties defaults new properties system get properties defaults set property key application skin jflightlog defaults set property key application language en defaults set property key application image scale 50 return defaults
|
gets the default settings attribute of the flight log settings object
|
public void data changed logger debug data changed called this changed true java util collections sort flights this fire data changed new flight log book data changed event this
|
sets a data changed flag to true and sorts all flights new before
|
public void resume running running true
|
description of the method
|
public void data saved logger debug data saved called this changed false
|
sets a data changed flag to false
|
public void run while running try this sleep sleep transferable t toolkit get default toolkit get system clipboard get contents null if t null t is data flavor supported data flavor image flavor image img image t get transfer data data flavor image flavor string to clipboard picture grabbed by clipboard image grabber string selection ss new string selection to clipboard toolkit get default toolkit get system clipboard set contents ss ss clipboard image found event event new clipboard image found event this img fire image found event catch exception todo system out println todo
|
main processing method for the clipboard image grabber object
|
public void close desktop window event e logger debug close desktop called super close desktop e controller exit
|
close the desktop application
|
protected void fire image found clipboard image found event e if clipboard image found listeners null vector listeners clipboard image found listeners int count listeners size for int i 0 i count i clipboard image found listener listeners element at i image found e
|
description of the method
|
public void calc distance logger debug calc distance clalled this set distance geo tools distance to this from latitude this from longitude this to latitude this to longitude
|
calculates the distance between from and to location in nautic miles
|
public void show flight flight flight logger debug show flight by id called flight frame doc new flight frame flight flight frame mode edit synchronized this get desktop add doc get desktop get component count center frame doc doc init nos frame
|
show flight frame
|
public boolean has changed logger debug has changed called return changed
|
returns the data changed flag
|
public void do default close action logger debug do default close action clalled this save data super do default close action
|
closes the frame after saving the log book
|
public string get value string section string key throws exception for int i 0 i ini elements length i if ini elements i section equals section ini elements i key equals key return ini elements i value throw new exception section or key not found
|
gets the value attribute of the ini file reader object
|
public void new flight frame logger debug new flight frame called flight frame doc new flight frame null flight frame mode insert synchronized this get desktop add doc get desktop get component count center frame doc doc init nos frame
|
show empty flight frame
|
public document get as document throws exception logger debug get as document called document document tools xml create xml document element root document create element flightlogbook root set attribute title title root set attribute pilot pilot root set attribute screenshotfolder screenshot folder root set attribute fssavefolder fs save folder root set attribute indexhtml index html root set attribute flighthtml flight html for int i 0 i flights size i flight flight flight flights get i flight add to parent root document append child root return document
|
returns the whole flight log book as xml incl
|
public file get save file name logger debug get save file name called string filename file separator xml jfile chooser fc new jfile chooser new file filename fc show save dialog this return fc get selected file
|
show save as dialog
|
public double parse latitude string position id throws exception logger debug parse latitude clalled return parse coordinate position id n s
|
parses the latitude fs 2004 string format
|
public boolean accept file dir string name string up name name to upper case return up name ends with pattern
|
description of the method
|
public void set language string language throws exception try this language language load translations catch exception e throw e
|
sets the language attribute of the resources object
|
public void add flight flight flight logger debug add flight called this flights add flight
|
adds a feature to the flight attribute of the flight log book object
|
public void load translations throws exception try load translations from fs catch exception err try load translations from jar catch exception err2 throw new exception file err to string jar err2 to string
|
loads all translations
|
public void save data logger debug save data clalled controller get flight log book set title txt title get text controller get flight log book set pilot txt pilot get text controller get flight log book set screenshot folder txt screenshot folder get text controller get flight log book set fs save folder txt fs save folder get text controller get flight log book set index html txt index html get text controller get flight log book setflight html txt flight html get text controller set flight log book data changed
|
saves the data to the current log book
|
public void load translations from jar throws exception string file name jar translations dir translation prefix language translations extension input stream is get class get class loader get resource as stream file name if is null file name jar translations dir translation prefix translations extension is get class get class loader get resource as stream file name if is null throw new exception translations file not found with classloader file name translations new properties translations load is
|
loads the translations from within a typical application jar file
|
public void load translations from fs throws exception translations by language file res directory new file this res directory file translation file new file res directory get absolute path translations dir translation prefix language translations extension then the standard translations if translation file exists translation file new file res directory get absolute path translations dir translation prefix translations extension if translation file exists throw new exception translations file not found translation file get absolute path translations new properties translations load new file input stream translation file
|
loads translations from the file system
|
private void load settings boolean use defaults throws exception try if use defaults properties new properties get default settings else properties new properties properties load new file input stream settings file catch exception err if use defaults throw new exception load settings failed err
|
loads the settings including default settings
|
public boolean accept file dir string name string up name name to upper case return up name starts with pattern
|
description of the method
|
public void delete flight flight flight logger debug delete flight called this flights remove flight
|
deletes a flight
|
public properties get translations properties return translations
|
gets the translations properties attribute of the resources object
|
public void save settings throws exception try file output stream fos new file output stream settings file properties store fos properties written by settings handler fos close catch exception err throw new exception save settings failed err
|
saves the settings
|
public string get translation key if translation key null return return translation key
|
gets the translation key attribute of the nos label object
|
public void set translation key string translation key this translation key translation key
|
sets the translation key attribute of the nos label object
|
public url get gui resource string file throws exception url ret value null try ret value get gui resource from fs file catch exception err try ret value get gui resource from jar file catch exception err2 throw new exception file err to string jar err2 to string return ret value
|
returns a gui resouce as url
|
public int get int setting string key int default value try return get int setting key catch exception err return default value
|
returns a application setting as int value by key
|
public double parse longitude string position id throws exception logger debug parse longitude clalled return parse coordinate position id e w
|
parses the longtitude fs 2004 string format
|
public int get int setting string key throws exception try return integer value of properties get property key int value catch exception err throw new exception get int setting failed err
|
returns a application setting as int value by key
|
public boolean accept file file if file null if file is directory return true string extension tools get extension file if extension null for int i 0 i extensions length i if extensions i equals ignore case extension return true return false
|
implementation of the abstract accept function
|
public string get setting string key string default value return properties get property key default value
|
returns a application setting as string value by key
|
public flight table model get flights table model logger debug get flights table model called try return new flight table model get flights catch exception ignore return null
|
gets the flights table model attribute of the flight log book object
|
public url get gui resource from fs string file throws exception string complete gui dir gui dir skin file res directory new file this res directory file gui file new file res directory get absolute path complete gui dir file if gui file exists throw new exception gui file not found gui file get absolute path return gui file to url
|
returns a gui resouce as url ie an image from the file system
|
public string get setting string key return properties get property key
|
returns a application setting as string value by key
|
public void set text string text super set text text this set caret position 0
|
sets the text attribute of the nos text field object
|
public void set state boolean open if open this set enabled true this set editable true else this set enabled false this set editable false
|
sets the state attribute of the nos text field object
|
private void jb init throws exception this get content pane set layout border layout
|
description of the method
|
public void set setting string key string value properties set property key value
|
sets an application setting by key
|
private void init text field filter new nos text field filter this set document text field filter
|
description of the method
|
public void init nos frame set visible true
|
description of the method
|
public void set accepted chars string accepted chars this text field filter set accepted characters accepted chars
|
sets the accepted chars attribute of the nos text field object
|
public void set int setting string key int value properties set property key string value of value
|
sets an aplication setting int by key
|
public void close nos frame this do default close action
|
description of the method
|
public string get accepted chars return text field filter get accepted characters
|
gets the accepted chars attribute of the nos text field object
|
public string get pilot return pilot
|
gets the pilot attribute of the flight log book object
|
private void jb init throws exception panel1 set layout border layout1 get content pane add panel1
|
description of the method
|
public void show message string message joption pane show message dialog this message
|
description of the method
|
public void set max length int max length this text field filter set max length max length
|
sets the max length attribute of the nos text field object
|
public int get max length return text field filter get max length
|
gets the max length attribute of the nos text field object
|
public boolean show question dialog string title string message int answer joption pane show confirm dialog null message title joption pane yes no option return answer joption pane yes option
|
description of the method
|
private void jb init throws exception this get content pane set layout border layout desktop new nos desktop pane desktop set debug graphics options 0 this get content pane add desktop border layout center
|
description of the method
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.