input stringlengths 10 828 | output stringlengths 5 107 |
|---|---|
private void create help set string help set name class loader loader this get class get class loader url url try url help set find help set loader help set name help set help set new help set loader url help broker help set create help broker catch exception e e print stack trace return | create a help set to use as help information in this application |
private void initialize j label new jlabel j label set text html select the i look and feel i you want to use br you have to restart the program for the change to take effect html this set size 300 200 this set layout new box layout this box layout y axis this add j label null add look and fell chooses | this method initializes this |
private jpanel get jpanel if j panel null j panel new jpanel j panel set layout new box layout j panel box layout x axis j panel set border new titled border grid type j panel add get jcombo box null j panel add box create horizontal glue return j panel | this method initializes j panel |
private jpanel get jpanel2 if j panel2 null j panel2 new jpanel j panel2 set layout new box layout j panel2 box layout x axis j panel2 set border new titled border grid size double min 0 0 double max 100 0 double step 5 0 double init value 10 0 spinner model model new spinner number model init value min max step spinner new jspinner model j panel2 add spinner null j panel2 add box create horizontal glue return j panel2 | this method initializes j panel |
private jcombo box get jcombo box if j combo box null string grid types cross dot line j combo box new jcombo box grid types return j combo box | this method initializes j combo box |
private void initialize this set layout new border layout this add get jpanel border layout north this add get jpanel2 border layout center this add get graph default vertex shape properties border layout south | this method initializes this |
private jpanel get jpanel if j panel null j panel new jpanel j panel set layout new border layout j panel set border border factory create titled border null select default insert vertex shape titled border default justification titled border default position new font dialog font bold 12 new color 51 51 51 j panel add get jcombo box border layout center return j panel | this method initializes j panel |
private graph default vertex shape properties get graph default vertex shape properties if graph default vertex shape properties null graph default vertex shape properties new graph default vertex shape properties graph pane graph default vertex shape properties set visible false return graph default vertex shape properties | this method initializes graph default vertex shape properties |
private void initialize this add get jcolor chooser null | this method initializes this |
private jcolor chooser get jcolor chooser if j color chooser null j color chooser new jcolor chooser j color chooser set color graph pane get graph properties get background color return j color chooser | this method initializes j color chooser |
private jpanel get jpanel if j panel null j panel new jpanel j panel set layout new box layout get jpanel box layout y axis j panel add get jpanel1 null j panel add get jpanel11 null return j panel | this method initializes j panel |
private jmenu item get exit file menu item if exit file menu item null exit file menu item new jmenu item exit file menu item set text exit exit file menu item set icon new image icon get class get resource org grapheditor gui icons 16x16 fileclose png exit file menu item add action listener new action listener public void action performed action event e main window exit window return exit file menu item | this method initializes exit file menu item |
private jpanel get jpanel1 if j panel1 null j panel1 new jpanel j panel1 set layout new box layout get jpanel1 box layout y axis j panel1 set border border factory create titled border null vertex background titled border default justification titled border default position null null j panel1 add get jcheck box null j panel1 add get jpanel2 null j panel1 add get jbutton null return j panel1 | this method initializes j panel1 |
private jbutton get jbutton if j button null j button new jbutton j button set text select new default color j button add action listener new java awt event action listener public void action performed java awt event action event e color result get jcolor chooser show dialog get root pane choose default vertex background color graph pane get graph properties get default vertex background color if result null get jbutton1 set background result return j button | this method initializes j button |
private void initialize this set title graph properties this set content pane get jpanel this add window listener new java awt event window adapter public void window closing java awt event window event e parent set enabled true | this method initializes this |
private jpanel get jpanel2 if j panel2 null j label new jlabel j label set text current color j panel2 new jpanel j panel2 set layout new flow layout j panel2 add j label null j panel2 add get jbutton1 null return j panel2 | this method initializes j panel2 |
private jpanel get jpanel if j panel null j panel new jpanel j panel set layout new border layout j panel add get jsplit pane border layout center j panel add get jpanel1 border layout south return j panel | this method initializes j panel |
private jlist get jlist if j list null j list new jlist j list add list selection listener new javax swing event list selection listener public void value changed javax swing event list selection event e jlist selector jlist e get source properties module selected module properties module selector get selected value if selected module null j split pane set right component selected module get properties editor return j list | this method initializes j list |
private jpanel get jpanel11 if j panel11 null j panel11 new jpanel j panel11 set layout new box layout get jpanel11 box layout y axis j panel11 set border border factory create titled border null vertex foreground titled border default justification titled border default position new font dialog font bold 12 new color 51 51 51 j panel11 add get jpanel21 null j panel11 add get jbutton2 null return j panel11 | this method initializes j panel11 |
private jpanel get jpanel21 if j panel21 null j label1 new jlabel j label1 set text current color j panel21 new jpanel j panel21 set layout new flow layout j panel21 add j label1 null j panel21 add get jbutton11 null return j panel21 | this method initializes j panel21 |
private jbutton get jbutton if j button null j button new jbutton j button set text cancel j button add action listener new java awt event action listener public void action performed java awt event action event e set visible false parent set enabled true dispose return j button | this method initializes j button |
private jbutton get jbutton2 if j button2 null j button2 new jbutton j button2 set text select new default color j button2 add action listener new java awt event action listener public void action performed java awt event action event e color result get jcolor chooser show dialog get root pane choose default vertex foreground color graph pane get graph properties get default vertex foreground color if result null get jbutton11 set background result return j button2 | this method initializes j button2 |
private jbutton get jbutton1 if j button1 null j button1 new jbutton j button1 set text ok j button1 add action listener new java awt event action listener public void action performed java awt event action event e for properties module p properties modules p save set visible false parent set enabled true dispose return j button1 | this method initializes j button1 |
private void initialize this set layout new border layout this add get jpanel border layout north this add get jpanel2 border layout center | this method initializes this |
private jcolor chooser get jcolor chooser if j color chooser null j color chooser new jcolor chooser return j color chooser | this method initializes j color chooser |
private jpanel get jpanel if j panel null j panel new jpanel j panel set layout new border layout j panel set border border factory create titled border null select default vertex shape titled border default justification titled border default position null null j panel add get jcombo box border layout center return j panel | this method initializes j panel |
private jfile chooser get exporter file chooser if exporter file chooser null exporter file chooser new jfile chooser exporter file chooser set dialog title choose file to export to return exporter file chooser | this method initializes exporter file chooser |
private jfile chooser get save as file chooser if save as file chooser null save as file chooser new jfile chooser save as file chooser set dialog title save as save as file chooser set accept all file filter used true save as file chooser add choosable file filter new file filter override public boolean accept file f return f get name matches ged override public string get description return graph files ged return save as file chooser | this method initializes save as file chooser |
private jfile chooser get open file chooser if open file chooser null open file chooser new jfile chooser open file chooser set dialog title open file open file chooser add choosable file filter new file filter override public boolean accept file f return f get name matches ged override public string get description return graph files ged return open file chooser | this method initializes open file chooser |
private jfile chooser get jpeg export file chooser if jpeg export file chooser null jpeg export file chooser new jfile chooser jpeg export file chooser set dialog title export to jpeg image file jpeg export file chooser add choosable file filter new file filter override public boolean accept file f return f get name matches jpeg jpg jpeg jpg override public string get description return jpeg image files jpg jpg jpeg jpeg return jpeg export file chooser | this method initializes jpeg export file chooser |
private jfile chooser get png export file chooser if png export file chooser null png export file chooser new jfile chooser png export file chooser set dialog title export to jpeg image file png export file chooser add choosable file filter new file filter override public boolean accept file f return f get name matches png png override public string get description return png image files png png return png export file chooser | this method initializes png export file chooser |
public void graph properties changed final graph properties prop graph pane get graph properties prop add graph change listener new graph change listener public void graph changed get save file menu item set enabled true prop add save listener new graph save listener public void graph saved get save file menu item set enabled false | this shall happen when the properties of a graph is changed |
public void resolve throws parse exception ioexception if file null file new jnlpfile location logger info resolve file get information get title check for it being an extension descriptor if file is component file is installer throw new parse exception jnlpruntime get message jinvalid extension descriptor new object name location | resolves the extension by creating a jnlpfile from the file |
private void validate request download request dreq throws error response exception string path dreq get path if path ends with resource catalog version xml filename path index of 1 logger util add fine log invalid request dreq throw new error response exception download response err 10 no resource download response get no content response | make sure that it is a valid request |
public void add argument string arg array list string l new array list string arrays as list arguments l add arg arguments l to array arguments | add an argument to the end of the arguments |
public void launch error launch exception e logger log level severe launch error e | called when the application could not be launched due to a |
public boolean launch warning launch exception e logger log level warning launch warning e return true | called when launching the application can not be launched |
public boolean validation error launch exception e logger log level severe validation error e return true | called when a security validation error occurs while |
public boolean show document url url initialize if url to string ends with jnlp try new launcher launch external url return true catch exception ex return false string cmd str null if command null try this is bogus because the command may require options should use a stream tokenizer or similar to get tokens outside of quotes cmd str command url to string runtime get runtime exec cmd str runtime get runtime exec new string command url to string return true catch ioexception e logger log level severe failed executing cmd cmd str e return false | show a document |
public application instance launch jnlpfile file boolean download only throws launch exception logger fine begin launch tg thread tg new tg thread file download only tg start try tg join catch interrupted exception ex throw launch warning new launch exception file ex r lsminor r lcsystem r lthread interrupted r lthread interrupted info if tg get exception null throw tg get exception passed to handler when first created if handler null handler launch completed tg get application logger fine end launch return tg get application | launches a jnlp file by calling the launch method for the |
protected file to cache file url location version version throws malformed urlexception return cache util url to path location pcache version | converts a url into a file in the persistence store |
public application instance launch url location boolean download only throws launch exception return launch to file location download only | launches a jnlp file by calling the launch method for the |
public void launch background jnlpfile file boolean download only bg runner runner new bg runner file null download only new thread runner start | launches a jnlp file by calling the launch method for the |
public void launch background url location boolean download only bg runner runner new bg runner null location download only new thread runner start | launches the jnlp file at the specified location in the |
public jredesc get jre node node throws parse exception version version get version node version null url location get url node href base string initial heap get attribute node initial heap size null string max heap get attribute node max heap size null list resources desc resources get resources node true require version attribute get required attribute node version null return new jredesc version location initial heap max heap resources | returns the jre element at the specified node |
public void add resource url location version version update policy update policy if location null throw new illegal argument exception location null resource resource resource get resource location version boolean downloaded false synchronized resources if resources contains resource return resource add tracker this resources add resource check cache may take a while loads properties file this should really be synchronized on resources but the worst case should be that the resource will be updated once even if unnecessary downloaded check cache resource update policy | add a resource identified by the specified location and |
public boolean is current urlconnection connection boolean cached is cached if cached return false try long remote modified connection get last modified long cached modified long parse long properties get property last modified if remote modified 0 remote modified cached modified return true else return false catch exception ex logger log level severe failed is current ex return cached if can t connect return whether already in cache | returns whether there is a version of the url contents in |
public boolean is cached file local file cache util get cache file location version if local file exists return false try long cached length local file length long remote length long parse long properties get property content length 1 if remote length 0 cached length remote length return false return true catch exception ex logger log level severe failed is cached ex return false should throw | returns true if the cache has a local copy of the contents |
protected object get item object key list extends object items get items key if items size 0 return null else return items get items size 1 | returns the last item matching the specified key |
protected void add item string key object value if info null info new array list object info add key info add value | add an information item description icon etc under a |
protected void fire download event resource resource download listener l null synchronized listeners l download listener listeners to array new download listener 0 int status resource get status download event event new download event this resource for int i 0 i l length i if 0 error downloaded status l i download completed event else if 0 downloading status l i download started event else if 0 connecting status l i update started event | fires the download event corresponding to the resources |
public void load loaded true logger fine read properties from file try if file exists logger fine file file does not exist return input stream s new file input stream file load s catch ioexception e logger log level warning exception opening file file e eat | ensures that the file backing these properties has been |
public void store logger fine save properties to file if loaded logger fine ignore store request return nothing could have changed so save unnecessary load save try output stream s new file output stream file store s header catch ioexception e logger log level warning exception storing file file e eat | saves the properties to the file |
public url get cache url url location try file f get cache file location if f null return f to url catch malformed urlexception ex logger log level severe failed get cache url for url location ex return location | returns a url pointing to the cached location of the |
public map get parameters return new hash map string string parameters | returns the applet parameters |
public file get cache file url location try resource resource get resource location if resource is set downloaded error wait for resource location 0 if resource is set error return null if resource get local file null return resource get local file if location get protocol equals ignore case file file file new file location get file if file exists return file return null catch interrupted exception ex logger log level severe ex return null need an error exception to throw | returns a file containing the downloaded resource |
public input stream get input stream url location throws ioexception try resource resource get resource location if resource is set downloaded error wait for resource location 0 if resource get local file null logger info open local file resource get local file get absolute path return new file input stream resource get local file logger info open remote location resource get location return resource get location open stream catch interrupted exception ex throw new ioexception wait was interrupted | returns an input stream that reads the contents of the |
public boolean wait for resources url urls long timeout throws interrupted exception logger info begin wait for resources try resource resources new resource urls length synchronized resources keep the lock so get resource doesn t have to aquire it each time for int i 0 i urls length i resources i get resource urls i if resources length 0 return wait resources timeout return true finally logger info end wait for resources | wait for a group of resources to be downloaded and made |
public boolean wait for resource url location long timeout throws interrupted exception logger info begin wait for resource location to external form try return wait new resource get resource location timeout finally logger info end wait for resource location to external form | wait for a particular resource to be downloaded and made |
protected application instance create application jnlpfile file throws launch exception logger fine begin create application try jnlpclass loader loader jnlpclass loader get instance file update policy app thread group group app thread group thread current thread get thread group application instance app new application instance file group loader group set application app loader set application app return app catch exception ex throw launch error new launch exception file ex r lsfatal r clinit r linit applet r linit applet info finally logger fine end create application | creates an application |
public long get amount read url location not atomic b c transferred is a long but so what each byte atomic so probably won t affect anything return get resource location get transferred | returns the number of bytes downloaded for a resource |
public void check permission permission perm string name perm get name if set policy equals name set security manager equals name throw new security exception r rcant replace sm try deny all permissions to stopped applications if get class loader equals name application instance app get application if app null app is running throw new security exception r rdeny stopped super check permission perm catch security exception ex logger log level severe denying permission perm ex throw ex | throws a security exception if the permission is denied |
private boolean start resource resource resource boolean enqueue false if resource is set error return true enqueue resource is set started if resource is set connected connecting resource change status 0 connect started if resource is set downloaded downloading resource change status 0 download started if resource is set download connect enqueue false if enqueue queue resource resource return enqueue | sets the resource status to connect and download and |
public long get total size url location return get resource location get size atomic | returns the number of total size in bytes of a resource or |
private void queue resource resource resource synchronized lock if resource is set connect download throw new illegal argument exception invalid resource state resource resource synchronized queue queue add resource future future download executor submit new downloader resource set future future | add a resource to the queue and start a thread to download or |
public void destroy if applet stopped return applet stopped true try applet stop applet destroy catch exception e logger log level severe failed destoy e environment destroy super destroy | stop the application and destroy its resources |
private void process resource resource resource throws exception logger info begin processing resource resource if resource is set downloaded downloading logger info resource already downloaded or downloading resource return initialize resource resource return to queue if we just initalized but it still needs to download not cached locally out of date if resource is set downloaded downloading would be downloading if connected before this method resource disconnect return download resource resource | process the resource by either downloading it or initializing |
public object run jnlpruntime set base dir get base dir jnlpruntime set max versions get max versions jnlpruntime set security enabled null get option nosecurity jnlpruntime initialize boolean download only null get option download only try new launcher launch get file download only catch exception e logger log level severe failed launch e fatal error e get message finally resource tracker shutdown return null | the privileged part jdk1 |
public void set application application instance app if this app null exception ex new illegal state exception application can only be set once logger log level severe ex return this app app | sets the jnlp app this group is for can only be called once |
public resource get resource url location synchronized resources for int i 0 i resources size i resource resource resource resources get i if cache util url equals resource get location location return resource throw new illegal argument exception location does not specify a resource being tracked | return the resource matching the specified url |
public string tidy verse verse string verse text verse text check verse text verse verse text verse text add verse tag verse verse text n return verse text | add verse number and do basic validation fix of verse text |
private string add verse tag key verse string plain string ret plain if plain contains osisutil osis element verse string buffer buff new string buffer buff append verse tag start append verse get osis id append verse tag end append plain ret buff to string return ret | ensure each verse has the appropriate osis verse tag |
private string osis id to verse num string s you have to use the first backslash is interpreted as an escape by the java compiler so you have to use two to get a string that contains one backslash and a dot which is what you want the regexp engine to see string parts s split if parts length 1 return parts parts length 1 return | return verse from osos id of format book |
private void display files array adapter file file adapter collections sort m file list string case insensitive order if m radio get list view set items can focus false get list view set choice mode list view choice mode single file adapter new array adapter file this android r layout simple list item single choice m file list else file adapter new array adapter file this android r layout simple list item 1 m file list set list adapter file adapter | opens the directory puts valid files in array adapter for display |
public void save state shared preferences out state shared preferences editor editor out state edit editor put string document current passage get instance get current document get initials editor put int bible book current passage get instance get current bible book no editor put int chapter current passage get instance get current chapter editor put int verse current passage get instance get current verse editor commit | called during app close down to save state |
public void set compiler class path final string classpath for int i 0 i compilers length i compilers i set classpath classpath | set the classpath for the internal java compiler |
public short get short object key return stand util to short key | fetch a short value |
public int get int object key return stand util to int key | fetch a integer value |
public long get long object key return stand util to long key | fetch a long value |
public float get float object key return stand util to float key | fetch a float value |
public date get date object key return stand util to date key | fetch a date value |
public boolean get boolean object key return stand util to boolean key | fetch a boolean value |
public double get double object key return stand util to double key | fetch a double value |
public string get string object key return stand util to string key | fetch a string |
public collection keys return map key set | fetch the key collection |
public boolean contains value object obj return map contains value obj | check the map contain the value or not |
public void remove object obj map remove obj | remove an element of the map |
public object load serializable id return entry load bean name id | fetch a record by id |
public list list string sql return entry find sql | fetch a record by sql |
public list list all return entry list all bean name | list all records |
public long count return entry count bean name | count table by bean name |
public long execute string hql return entry execute hql | execute update by hql |
public object save pn object param map pin map param dorado context context dorado context get context context set attribute dorado context session project no pin get project no return null | put the project no into session |
public boolean is wrong type return wrong type | the file is wrong type |
public boolean check content string type for int i 0 i file type length i if type trim equals ignore case file type i return true set wrong type true return false | check type of the file |
public void save file file item item long size item get size if size file size stand util print file size is too big return try string file name stand util file item get name string file path path stand util prefix file name nowtime stand util suffix file name file file new file file path file create new file item write file catch exception e stand util debug e stand util print file writing exception | save the file to disk |
public jbpm configuration get configuration return configuration | fetch the jbpm configuration |
public void set configuration jbpm configuration configuration this configuration configuration | set the jbpm configuration by spring |
public jbpm context get context return configuration create jbpm context | fetch the jbpm context |
public process definition get definition string process name jbpm context context get context process definition instance context get graph session find latest process definition process name context close return instance | fetch the process definition |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.