input
stringlengths 10
828
| output
stringlengths 5
107
|
|---|---|
private void add text component clear add text component set enabled this attributes is enabled set properties
|
refreshes the view so that it shows the current text component
|
public void pause stop
|
pauses the progress bar
|
public void restart super set progress 0 start
|
restarts the progress bar
|
public void add gwtevent handler gwtevent handler listener listeners add listener
|
adds a listener that will be notified when the progress bar reaches 100
|
public boolean is multiline if text component instanceof text area return true else return false
|
returns whether or not this text component adapter is in multiline mode
|
private void on progress half full event styles for the gwt progress bar text dom set style attribute element get element get first child get next sibling color white
|
then the progress bar is half full the text color
|
public string get color return dom get style attribute this get bar element background color
|
gets the color of the progress
|
public boolean is password mode if text component instanceof password text box return true else return false
|
returns whether or not this text component adapter is in password field
|
private element create sound element string factory id sound player factory factory sound player attributes attributes factory get attributes element sound element new element sound sound element set attribute id factory id element filename element new element filename filename element add content attributes get sound filename sound element add content filename element if attributes is loop sound element add content new element repeats if attributes is autostart sound element add content new element autostart sound element add content create transitions element factory get transitions return sound element
|
creates a dom element for the given sound player factory
|
private void set foreground color string color gwtcolor and font configurator cf comp gwtcolor and font configurator get instance cf comp set color this color color cf comp set color this color border top color cf comp set color this color border right color cf comp set color this color border bottom color cf comp set color this color border left color
|
the color of the progress is also the color of the border
|
public void set password mode boolean password mode only reconstruct the text component if the flag was changed if attributes is password password mode attributes set password password mode attributes set multiline password mode false attributes is multiline string text get text text component construct text component add text component set text text
|
changes whether or not this text component adapter is in password field
|
public void set left widget widget string left widget parent widget get parent string top widget get element get style get property top hack to ensure left and top to be a string gwt cast s digits to int and refuses to replace all on it left left length 0 0 left top top length 0 0 top int left zahl integer parse int left replace all d int top zahl integer parse int top replace all d widget remove from parent absolute panel parent add widget left zahl top zahl
|
there is no widget method for placing the widget
|
public void set top widget widget string top widget parent widget get parent string left widget get element get style get property left hack to ensure left and top to be a string gwt cast s digits to int and refuses to replace all on it left left length 0 0 left top top length 0 0 top int left zahl integer parse int left replace all d int top zahl integer parse int top replace all d widget remove from parent absolute panel parent add widget left zahl top zahl
|
there is no widget method for placing the widget
|
public void set loop boolean loop if loop get element set attribute preload get element set attribute loop else get element remove attribute preload get element remove attribute loop
|
doesnt work with firefox 3
|
public void set unachangeable properties set tab index 1 dom set style attribute get element background color transparent dom set style attribute get element background image none dom set style attribute get element border top style none dom set style attribute get element border right style none dom set style attribute get element border bottom style none dom set style attribute get element border left style none
|
note the cursor will be a pointern while the click area is enabled
|
public void set autoplay boolean autoplay if autoplay get element set attribute autoplay autoplay else get element remove attribute autoplay
|
can only be true with every value
|
private void set unachangeable properties for kids widget child dom set style attribute child get element clear left ie if browser instance get short name equals msie dom set style attribute child get element style float left all other browsers else dom set style attribute child get element css float left
|
these methode ensures that all radio buttons the entries
|
public void start schedule repeating get delay
|
starts the timer
|
public void stop cancel
|
stops the timer
|
public void restart start
|
restarts the timer
|
public void remove options while get widget count 0 remove 0
|
removes all radio buttons from the radio panel
|
public void set delay int delay this delay delay timer set delay delay 100
|
sets the time in milliseconds until the progress bar reaches 100
|
public void set selection string selection for widget child get children if child get element get inner text equals selection radio button child set value true else radio button child set value false
|
sets the selection of the radio buttons
|
public void pause timer stop
|
pauses the progress bar
|
public string get selection for widget child get children if radio button child get value true return child get element get inner text return null
|
gets the selected radio button
|
public void restart get model set value 0 timer restart
|
resets and starts the progress bar
|
public void set filename string filename this filename filename refresh image
|
changes the displayed image to the one with the given filename
|
public void refresh image hack see class component autosizer dimension scaled image size get minimum size image image image cache get filename scaled image size image icon image icon new image icon image super set icon image icon
|
is called when the code filename code attribute is changed
|
public timer mode get mode return mode
|
gets the timer mode in which this timer currently is
|
public void set mode timer mode mode if mode null throw new null pointer exception if mode this mode nothing has changed no need to re register at the awt event queue return if mode timer mode since last user activity register a listener so that the timer is notified of user activity toolkit get default toolkit add awtevent listener this awtevent key event mask awtevent mouse event mask else unregister the listener toolkit get default toolkit remove awtevent listener this this mode mode
|
changes the timer mode of this timer
|
private void set button group button group button group remove the old radio buttons the garbage collector will do the rest it will also remove the old button group this remove all this button group button group enumeration abstract button elements button group get elements while elements has more elements abstract button button elements next element button set foreground get foreground button set font get font button add action listener this add button arrange the radio buttons vertically set layout new grid layout button group get button count 1 ensure selection
|
changes the group of buttons that are being displayed
|
private void show text component remove all if text component instanceof jtext area scroll pane new jscroll pane text component add scroll pane else scroll pane null add text component revalidate repaint
|
refreshes the view so that it shows the current text component
|
private jtext component construct text component string text jtext component result if multiline result new jtext area text jtext area result set line wrap true jtext area result set wrap style word true else if password mode result new jpassword field text else result new jtext field text result set foreground get foreground result set background get background result set font get font result add key listener this return result
|
creates a new text component which holds the given text based on the
|
private void ensure selection abstract button first button null enumeration abstract button elements button group get elements while elements has more elements abstract button button elements next element if button get text equals selection button set selected true return else if first button null first button button if first button null first button null can only happen when there are no options first button set selected true
|
makes sure that one radio button is selected
|
public void set multiline boolean multiline if multiline password mode throw new illegal state exception multiline password fields are impossible only reconstruct the text component if the flag was changed if this multiline multiline this multiline multiline text component construct text component text component get text show text component
|
changes whether or not this text component adapter is in multiline mode
|
public boolean is password mode return password mode
|
returns whether or not this text component adapter is in password field
|
public void set password mode boolean password mode if multiline password mode throw new illegal state exception multiline password fields are impossible only reconstruct the text component if the flag was changed if this password mode password mode this password mode password mode text component construct text component text component get text show text component
|
changes whether or not this text component adapter is in password field
|
public string get text return text component get text
|
gets the text that the current text component contains
|
public int get length init sound play thread try return sound play thread get length catch exception exc return 0
|
gets the length of the sound file with the currently selected filename
|
public void set text string text text component set text text
|
changes the text that the current text component contains
|
public void start in case another sound is already being played at the moment stop that playback before starting the new sound stop if filename null init sound play thread sound play thread start
|
starts playback of the sound
|
public void stop if sound play thread null sound play thread is alive sound play thread stop thread
|
stops playback of the sound
|
public boolean is accepted return accepted
|
get the value of accepted
|
public void set accepted boolean accepted this accepted accepted
|
set the value of accepted
|
public string get player name return civ get name
|
get the value of name
|
public void set player name string name civ set name name
|
set the value of name
|
public string get civilisation name return civ get civ name
|
get the value of civilisation name
|
public void set civilisation name string civilisation name this civ set civ name civilisation name
|
set the value of civilisation name
|
public string get sovereign name return civ get sovereign name
|
get the value of sovereign name
|
public void set sovereign name string sovereign name this civ set sovereign name sovereign name
|
set the value of sovereign name
|
public string get flag file return flag file
|
get the value of flag file
|
public void set flag file string flag file this flag file flag file civ set flag flag file
|
set the value of flag file
|
public image icon get picture return civ get picture
|
get the value of picture
|
public void set picture image icon picture civ set picture picture
|
set the value of picture
|
public vector get content return products
|
gives all the products stored in the shopping cart
|
public void add int product id string img string name double price product order po for int i 0 i products size i po product order products element at i if po get id product id po set quantity po get quantity 1 return po new product order product id img name price products add element po
|
looks through the shopping cart if it has an entry of the product
|
public vector get customer address int id db new dbconnection vec new vector string query select entry street address entry postcode entry city entry state from address book where customers id id result set rs db execute query query if rs null customer c try while rs next c new customer c set street rs get string entry street address c set post code rs get string entry postcode c set city rs get string entry city c set state rs get string entry state vec add c rs close catch sqlexception e db close return vec
|
returns the customer shippping address
|
public string analyze astnode root if root null output append file did not parse correctly return output to string set header for each class for astnode node root list analyze class node return output to string
|
analyze the astree and return a formatted string
|
public void set identity string id identity id
|
set the data type identity
|
public string to string string return string type identity return return string
|
concat type and identity
|
public void display writer wtr try wtr write to string catch ioexception ie system err println ie get message int array size list size for int i 0 i array size i try wtr write n catch ioexception ie system err println ie get message list get i display wtr
|
display this node and all its children recursively
|
private boolean is operator string id if id null return false if id equals id equals id equals id equals id equals id equals id equals return true return false
|
helper function checks for delimiters in a equation where delimiters br
|
private int get lval int ctr array list astnode list do until the lval is found lval is an identity that does not have a as the next identity ie java util type in this instance type is the lval int node count list size string curr id null next id null while ctr node count curr id list get ctr get identity if ctr 1 node count next id list get ctr 1 get identity else return ctr if next id equals return ctr ctr 2 return ctr
|
gets the variable name for the l val of an expression
|
private void set header output append n file output append file name output append n
|
write the report header to output
|
public void add modifier statement element rval modifiers add rval
|
add a variable to the modifier list
|
public string buffer write to buffer element root element throws ioexception current element root element do start current element open tag this buffer append produced by producer n this buffer append author author n for int i 0 i current element get number of children i element current element get child i write children this do end current element close tag return this buffer
|
write to buffer
|
private boolean x1 1 return get energy percent constants k toborn
|
returns whether being should born new being
|
private boolean x1 2 return get corporate mind should eat being interface this colony location
|
returns whether or not being should eat
|
private boolean x1 3 return get corporate mind should give energy being interface this colony location
|
returns whether or not being should give energy
|
private boolean x2 1 return get corporate mind get unoccupied eating location being interface this null
|
returns whether or not being should start new eaters colony
|
private boolean x2 2 list location locations get corporate mind get search locations being interface this if locations size 0 return get corporate mind can search from location being interface this get location if locations size 1 location location locations get 0 return being interface get reachable locations this contains location get corporate mind can search from location being interface this location return false
|
returns whether or not being is making its last possible search step
|
private boolean x3 1 location location get corporate mind get attack location for defender being interface this colony location return location null location equals being interface get location this
|
returns whether or not being should attack enemy at the same location
|
private boolean x3 2 location location get corporate mind get attack location for defender being interface this colony location return location null location equals being interface get location this
|
returns whether or not being should attack enemy at another location location
|
private boolean x4 1 location location get corporate mind get closest location with energy being interface this return being interface get reachable locations this contains location location equals being interface get location this
|
returns whether or not being is making its last step to feeding location
|
private boolean x5 1 location location get corporate mind get gathering location being interface this return being interface get reachable locations this contains location
|
returns whether or not being is making its last step to gathering location
|
private void z4 get corporate mind stop searching this location location get corporate mind get unoccupied eating location being interface this join the colony location action for current turn new event event kind action move to location
|
start new eaters colony
|
public float get count ibeing me only known if close if u close enough me get location return 1f return u get resource control get count loc
|
amount of energy at this point
|
public float get growth rate ibeing me always known return u get resource control get growth rate loc
|
how fast energy increases here
|
public float get max count ibeing me always known return u get resource control get max count loc
|
the maximum amount of energy at the point
|
private void z5 make search step
|
make search step
|
synchronized public void add entity integer id constants check perms ids add id
|
engine only api
|
synchronized public void remove entity integer id constants check perms ids remove id
|
engine only api
|
synchronized public float total mass ibeing me if me null api only for the engine constants check perms else if u close enough me get location return 1f float rv 0f for integer i ids rv u get mass i return rv
|
total mass of beings at the point
|
public event kind kind return this kind
|
return kind of this event
|
private void z6 make search step get corporate mind stop searching this
|
make last search step
|
private void z7 location location get corporate mind get closest location with energy being interface this join the colony location action for current turn new event event kind action move to location
|
make last step to feeding location
|
private void z8 location location get corporate mind get closest location with energy being interface this location search util step toward being interface this location action for current turn new event event kind action move to location
|
make step to feeding location
|
private void z9 location location get corporate mind get gathering location being interface this join the colony location action for current turn new event event kind action move to location
|
make last step to gathering location
|
private void z10 location location get corporate mind get gathering location being interface this location search util step toward being interface this location action for current turn new event event kind action move to location
|
make step to gathering location
|
private void z11 leave of colony
|
leave eaters colony
|
private void z13 join the colony colony location action for current turn new event event kind action move to colony location
|
return to eaters colony
|
private void z14 action for current turn new event event kind action attack get corporate mind get target enemy id this get colony location
|
attack enemy at the same location
|
private void z15 action for current turn new event event kind action move attack get corporate mind get target enemy id this get colony location
|
attack enemy at another location
|
public void execute runnable command try if use invoke and wait swing utilities invoke and wait command else swing utilities invoke later command catch interrupted exception e ignore catch invocation target exception e throw new runtime exception e
|
execute command within awt dispatch thread
|
public void set use invoke and wait boolean use invoke and wait this use invoke and wait use invoke and wait
|
use invoke and wait instead of invoke later execution policy for
|
public void process message final object message final method method find corresponding method message if method null if executor null method get annotation asynchronous class null invoke listener method message else executor execute new runnable public void run invoke listener method message
|
dispatch message to appropriate message handler and execute it with your
|
public void process message final object message final method method find corresponding method message if method null if executor null method get annotation asynchronous class null edt executor execute new runnable public void run invoke listener method message else executor execute new runnable public void run invoke listener method message
|
dispatch and handle message in the awt dispatch thread
|
protected method find corresponding method object message for class a class message get class a class null a class a class get superclass method method dispatch table get a class if method null return method return null
|
process message and dispatch it to one of your custom written
|
public void on module load aggiungo i controller al dispatcher dispatcher dispatcher dispatcher get dispatcher add controller new app controller dispatcher dispatch app events init
|
this is the entry point method
|
public void on module load gxt set default theme theme blue true fanta best console constants constants fanta best console constants gwt create fanta best console constants class registry register console registry keys constants constants fanta best console messages messages fanta best console messages gwt create fanta best console messages class registry register console registry keys messages messages registro i servizi aggiungo i controller al dispatcher dispatcher dispatcher dispatcher get dispatcher add controller new console controller dispatcher dispatch console events init
|
this is the entry point method
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.