input
stringlengths
10
828
output
stringlengths
5
107
public void internal frame closed sinternal frame event e
invoked when an internal frame has been closed
public scomponent get component at int i return get component i
returns the component at the given position
public scontainer get container return scontainer source
returns the source container this event origins from
public scomponent get child return child
returns the child component whose new status in the container
public scomponent get component int i return scomponent get component list get i
returns the component at the given position
public void process request srequest event e srequest listener request listener srequest listener get if request listener null org wings session session manager get session remove request listener this else request listener process request e end of if
invokes the process request method of the proxied request listener
public void component hidden scomponent event e
invoked when the component has been made invisible
public object get constraint at int i return get constraint list get i
returns the constraint for the given component position
public void component moved scomponent event e
invoked when the components position changes
public void component resized scomponent event e
invoked when the components size changes
public void component shown scomponent event e
invoked when the component has been made visible
public string param string string type str switch id case internal frame opened type str internal frame opened break case internal frame closed type str internal frame closed break case internal frame iconified type str internal frame iconified break case internal frame deiconified type str internal frame deiconified break case internal frame maximized type str internal frame maximized break case internal frame unmaximized type str internal frame unmaximized break default type str unknown type return type str
returns a parameter string identifying this event
public sinternal frame get internal frame return source instanceof sinternal frame sinternal frame source null
returns the originator of the event
public void remove component scomponent c remove c
removes the given component from the container
public color get header background return cssstyle sheet get background header attributes
return the background color
public string param string if get source null return no source string type str switch get id case dispatch start type str dispatch start break case dispatch done type str dispatch done break case deliver start type str deliver start break case deliver done type str deliver done break default type str unknown type return type str
returns a string representing the state of this event
public scomponent remove component at int i scomponent c get component i remove c return c
removes the component at the given position from the container
public void remove scomponent c if c null return if layout null layout remove component c int index get component list index of c if get component list remove c get constraint list remove index c remove notify fire container event scontainer event component removed c c set parent null reload reload manager reload code
removes the given component from the container
public simple url get url return url
returns the url the icon can be fetched from
public void remove int index scomponent c get component index remove c
removes the component at the given position from the container
public void set header foreground color color boolean changed header attributes put all cssstyle sheet get attributes color color if changed reload reload manager reload style
set the foreground color
public void remove all components remove all
removes all components from the container
public void remove all while get component count 0 remove 0
removes all components from the container
public void set event string e if is different event e event e reload reload manager reload code
if this is set null this event is rendered as anchor
public void set event target low level event listener t if is different request target t request target t reload reload manager reload code
sets the low level event listener for which to create a event
public scomponent add scomponent c return add component c null
adds a component to the container with null constraint at the end
protected void set group sbutton group g if is different button group g if button group null get dispatcher null get dispatcher remove low level event listener this button group get component id end of if button group g if button group null get dispatcher null get dispatcher remove low level event listener this button group get component id end of if reload reload manager reload code
add this button to a button group
public color get header foreground return cssstyle sheet get foreground header attributes
return the foreground color
public void add scomponent c object constraint add component c constraint
adds a component to the container with the given constraint at the end
public scomponent add scomponent c int index return add component c null index
adds a component to the container with null constraint at the given
public void add action listener action listener listener add event listener action listener class listener
adds an action listener to the button
public void add scomponent c object constraint int index add component c constraint index
adds a component to the container with the given constraint at
public void remove action listener action listener listener remove event listener action listener class listener
removes the supplied listener from teh listener list
public scomponent add component scomponent c return add component c null
adds a component to the container with null constraint at the end
protected void fire action performed action event event guaranteed to return a non null array object listeners get listener list action event e null process the listeners last to first notifying those that are interested in this event for int i listeners length 2 i 0 i 2 if listeners i action listener class if e null string action command event get action command if action command null action command get action command e new action event sabstract button this action event action performed action command event get when event get modifiers action listener listeners i 1 action performed e
fire an action event at each registered listener
public scomponent add component scomponent c object constraint return add component c constraint get component list size
adds a component to the container with the given constraint at the end
public void set type string t if is different type t type t reload reload manager reload code
sets the button type
public void write device out throws ioexception iterator iterator map entry set iterator while iterator has next map entry entry map entry iterator next out print string entry get key out print out print entry get value to string out print n style entry get value write out out flush
write each style in set to the device
public scomponent add component scomponent c int index return add component c null index
adds a component to the container with the given constraint at
public void do click set selected is selected fire action performed new action event this action event action performed get action command
simulates an click on the button
public scomponent add component scomponent c object constraint int index if c null if layout null layout add component c constraint index get component list add index c get constraint list add index constraint c set parent this fire container event scontainer event component added c reload reload manager reload code if new child contains some autogenerated css class we must reload the style class if c attributes null c attributes size 0 reload reload manager reload style return c
adds a component to the container with the given constraint at
public void set selected boolean b if is selected b if button group null button group set selected this b super set selected b
sets the state of the button
protected void set parent frame sframe f if f parent frame super set parent frame f for int i 0 i get component count i get component i set parent frame get parent frame
sets the parent frame
public object clone try scontainer erg scontainer super clone uiuiui layout manager must be cloned as well component list and constraint list contain references to the original components constraints erg get component list clear erg get constraint list clear for int i 0 i get component count i erg add component scomponent get component i clone return erg catch exception e e print stack trace return null
caveat this did not work yet
public void set selected index int index get selection model set selection interval index index
select a single cell
public void set selected indices int indices list selection model sm get selection model sm clear selection for int i 0 i indices length i sm add selection interval indices i indices i
select some cells
public attribute set parse declaration reader r throws ioexception parse base r true false return new simple attribute set declaration
parses the passed in css declaration into an attribute set
public void handle import string import string url url cssstyle sheet get url base import string if url null import style sheet url
invoked when a valid
public void handle selector string selector selector selector to lower case int length selector length if selector ends with if length 1 selector selector substring 0 length 1 selector tokens add selector add selector else if length 0 selector tokens add selector
a selector has been encountered
public void set selected value object an object if an object null set selected index 1 else if an object equals get selected value int i c list model dm get model for i 0 c dm get size i c i if an object equals dm get element at i set selected index i return set selected index 1
selects the specified object
public void handle value string value if property name null declaration put property name value property name null
invoked when a property value is encountered
public void end rule int n selectors size for int i 0 i n i string selector string selectors get i for int j selector length 1 j 0 j cssstyle sheet this put style new style selector j declaration declaration clear selectors clear
invoked when the end of a rule is encountered
public string put string name string value if map null map new hash map 8 if value null return remove name return string map put name value
adds an attribute to the list
public boolean put all attribute set attributes if map null map new hash map 8 boolean changed false iterator names attributes names iterator while names has next string name string names next changed changed put name attributes get name null return changed
adds a set of attributes to the list
public string remove string name return map null null string map remove name
removes an attribute from the list
public object clone simple attribute set attr try attr simple attribute set super clone attr put all this catch clone not supported exception cnse attr null if is empty return new simple attribute set else return new simple attribute set hash map hash map map clone
clones a set of attributes
public int hash code return map null 0 map hash code
returns a hashcode for this set of attributes
public boolean equals object object if object instanceof attribute set return false attribute set other attribute set object if size other size return false iterator names other names iterator while names has next string name string names next if other get name equals get name return false return true
compares two attribute sets
public string to string string buffer b new string buffer if map null iterator names map entry set iterator while names has next map entry next map entry names next b append next get key b append b append next get value b append return b to string
converts the attribute set to a string
public request url add parameter string parameter if parameter null if parameters null parameters new string buffer else parameters append amp parameters append parameter return this
add an additional parameter to be included in the get paramter
public request url add parameter string name string value add parameter name parameters append append value return this
add an additional name value pair to be included in the get paramter
public boolean is enabled return action null super is enabled action is enabled
returns whether this button or its action is enabled
public request url add parameter low level event listener comp string value add parameter comp get encoded low level event id value return this
add an additional name value pair to be included in the get paramter
public request url add parameter string name int value add parameter name parameters append append value return this
add an additional name value pair to be included in the get paramter
public void clear if parameters null parameters set length 0 set epoch null set resource null
clear all additional paramters given in the
public void write device d throws ioexception super write d if resource null epoch null d print epoch d write delimiter if resource null d print resource else the default resource name work around a bug in some browsers that fail to assemble urls todo verify and give better explanation here d print default resource name if base parameters null d print base parameters if parameters null parameters length 0 d write has quest mark amp str quest mark d print parameters to string
writes the context address to the output device
public string to string string buffer erg new string buffer if base url null erg append base url if resource null epoch null erg append epoch erg append if resource null erg append resource else erg append default resource name if base parameters null erg append base parameters if parameters null parameters length 0 erg append has quest mark erg append parameters to string return erg to string
returns the string representation of the context url plus
protected void init buttons ok add action listener fire event listener ok set icon ok button icon ok set tool tip text ok cancel add action listener fire event listener cancel set icon cancel button icon cancel set tool tip text cancel editor form add action listener fire event listener editor form add ok editor form add cancel
intializes the buttons with default icons tooltip text and listener
public void append string text try document insert document get length text catch bad location exception e
appends the given text to the end of the document
protected void check fire events something is to be done if the editor form has fired an action event so the fire stopped event flag is true if fire stopped event process cancel and undo events before stopped event because the form fires a stopped event in any case if fire canceled event cancel cell editing else stop cell editing end of if reset the flags fire stopped event false fire canceled event false
checks if a change event should be fired
protected void fire text value changed text event event null guaranteed to return a non null array object listeners get listener list process the listeners last to first notifying those that are interested in this event for int i listeners length 2 i 0 i 2 if listeners i text listener class if event null event new text event this text event text value changed end of if text listener listeners i 1 text value changed event
fire a text event at each registered listener
public void set template file template file throws java io ioexception set template new cached file template source template file
set the template to the template stored in the given file
public void set template url template url throws java io ioexception if file equals template url get protocol set template new file template url get file else set template new cached file template source template url
set the template to the template which can be retrieved from the
public void set template template source source template source source
sets the template from the data source
public rectangle get scrollable viewport size return new rectangle 0 0 1 data model get size
return the scrollable viewport size
public void add component scomponent c object constraint int index if constraint null throw new illegal argument exception null constraint not allowed here components put constraint to string c
add a component with the given constraint
public void remove component scomponent comp iterator it components entry set iterator while it has next map entry e map entry it next if e get value comp it remove
removes the given component
public void set viewport size rectangle d if is different viewport d viewport d reload reload manager reload code
set the visible viewport size
public scomponent get component string name return scomponent components get name
returns a map of the constraint component
public void write byte b int off int len if within limit return within limit count len max size to buffer if within limit super write b off len else reset discard all input so far it would become too large
write to the stream
public boolean is valid return within limit
returns whether the filled buffer is within the limits
public void set valid boolean valid within limit valid
sets whether this resource is valid
public void write to device out throws ioexception out write buf 0 size
write to some output device
public void fire delayed intermediate events if fire adjusting events fire delayed events true
fire event with is value is adjusting true
public page parser get page parser return page parser
retrieve the page parser of this instance
public string get id if id null externalize manager ext session manager get session get externalize manager id ext get id ext externalize this externalizer flags logger debug new get class get name with id id return id
get the id that identifies this resource as an externalized object
public void set page parser page parser page parser this page parser page parser
set the page parser for this instance
protected limited buffer buffer resource throws ioexception if buffer null buffer new limited buffer input stream resource get resource stream if resource null byte copy buffer new byte 1024 int read while buffer is valid read resource read copy buffer 0 buffer write copy buffer 0 read resource close if buffer is valid size buffer size else logger fatal resource returned empty stream this buffer set valid false return buffer
reads the resource into an limited buffer and returns it
public void add item listener item listener il add event listener item listener class il
adds a item listener to the button
public void set externalizer flags int flags externalizer flags flags
set the externalizer flags as defined in
public void set row selection column int column row selection column column
set the column after which the selection control should be
public void remove item listener item listener il remove event listener item listener class il
remove the given item listener from list of
public collection get headers return http headers
get additional http headers
public set get cookies return null
get additional http headers
public int get row selection column return row selection column
returns the selection control position
public string get action command if equals action command return get text return action command
returns the action commnand that is included in the event sent to
protected void fire action performed action event event guaranteed to return a non null array object listeners get listener list action event e null process the listeners last to first notifying those that are interested in this event for int i listeners length 2 i 0 i 2 if listeners i action listener class if e null string action command event get action command if action command null action command get action command e new action event this action event action performed action command event get when event get modifiers action listener listeners i 1 action performed e
fire an action event at each registered listener
protected void fire action event if firing action event set flag to ensure that an infinite loop is not created firing action event true action event e null guaranteed to return a non null array object listeners get listener list process the listeners last to first notifying those that are interested in this event for int i listeners length 2 i 0 i 2 if listeners i action listener class if e null e new action event this action event action performed get action command action listener listeners i 1 action performed e firing action event false
notify all listeners that have registered as action listeners if the
public void set selection style string new style selection style new style
sets the style the cell is drawn with when the cell is selected
public string get selection style return selection style
returns the style the cell is drawn with when the cell is selected