input
stringlengths
10
828
output
stringlengths
5
107
public list get script listener list return collections unmodifiable list script listener list
returns the script listeners of this component
public void set name raw string unchecked name reload if change this name unchecked name this name unchecked name
b direct setter for name
private void add listeners to parent frame sframe parent frame parent frame add script listener body onclick script
adds the necessary listeners to the parent frame
private string externalize image string class path string mime type class path resource res new class path resource class path mime type if res get resource stream null no resource found at class path return old string log debug could not find resource at classpath class path return sstring builder image url new sstring builder image url append ext manager externalize res externalize manager global image url append return image url to string
externalizes an image found
public int hash code return class loader null class loader hash code 0 resource file name hash code
resources using the same classloader and are denoting the same
public boolean equals object o if o instanceof class path resource class path resource other class path resource o return this other class loader other class loader class loader null class loader equals other class loader resource file name equals other resource file name return false
two classpath resouces are equal if both of them use the same
public collection get headers return null
get additional http headers
public collection get headers if get frame is no caching return default code header else return collections empty set
the http header parameteres attached to this dynamic code ressource
public void set title string t string old title title title t if title null old title null title null title equals old title reload
sets the title of the dialog
public void set width scale factor double width scale factor this width scale factor width scale factor
sets the scale factor for the width of the menu components
public void hide log debug hide dialog if owner null owner remove dialog this visible false
remove this dialog from its frame
public void show scomponent c log debug show dialog if c null c get session get root frame scontainer frame null if c instanceof scontainer frame scontainer c else frame c get parent find root container while frame null frame instanceof sroot container frame frame get parent if frame null frame get session get root frame if frame null throw new illegal argument exception component has no root container owner sroot container frame owner push dialog this visible true
shows this dialog in the given sroot container
public void set header renderer stable cell renderer header cell renderer header renderer header cell renderer
the renderer component responsible for rendering the tables header cell
public void clear headers if headers null headers clear
removes all headers
public void add dynamic style style style if dynamic styles null dynamic styles new hash map 4 dynamic styles put style get selector style reload
register a new css style on this component for a specfic css selector
public void set columns int c int old columns columns columns c if columns old columns reload
set the visible amount of columns in the textfield
public style get dynamic style selector selector if dynamic styles null return null return style dynamic styles get selector
returns the style defined for the passed css selector
public void expand row tree path p tree state set expanded state p true if get viewport size null rectangle area new rectangle get viewport size area y tree state get row for path p area height model get child count p get last path component 1 scroll rect to visible area fire tree expanded p reload
expand this tree row
public void set visible boolean visible if visible is visible if visible get session add frame this register else get session remove frame this unregister super set visible visible
shows or hide this frame
public void set dynamic styles collection dynamic styles if dynamic styles null return if this dynamic styles null this dynamic styles new hash map 4 for iterator iterator dynamic styles iterator iterator has next style style style iterator next this dynamic styles put style get selector style reload
adds the passed collection of
public string to string sstring builder str new sstring builder str append sgmltag append name append append get offset append if attrs null well formed iterator iter attributes true while iter has next string key string iter next str append append key append append value key null append else str append malformed tag str append return str to string
render this tag as a string
public void set attribute string css property name string value cssproperty property new cssproperty css property name if cssproperty border properties contains property throw new illegal argument exception border properties have to be applied to the border set attribute selector all property value
defines a free text css property value pair to this component
public void set editable boolean editable reload if change this editable editable this editable editable
if this table is editable clicks on table cells will be catched
public void set attribute selector selector cssproperty property string property value style style get dynamic style selector if style null add dynamic style new cssstyle selector property property value else string old style put property property value reload if change old property value
assign or overwrite a css property value pair at this component
public void set node indent depth int depth if depth 0 depth 0 node indent depth depth
set the indent depth in pixel between two nodes of a different level
private resource retrieve current root frame resource throws servlet exception log debug delivering default frame if session get frames size 0 throw new servlet exception no frame visible get the first frame from the set and walk up the hierarchy this should work in most cases if there are more than one toplevel frames the developer has to care about the resource ids anyway sframe default frame sframe session get frames iterator next while default frame get parent null default frame sframe default frame get parent return default frame get dynamic resource dynamic code resource class
searches the current session for the root html frame and returns the resource
public void register low level event listener gl if gl null final string key gl get low level event id final string name gl get name log debug dispatcher register id key type gl get class add low level event listener gl key if named events name null name equals key name length 0 log debug dispatcher register named name add low level event listener gl name
registers a low level event listeners for http request processing
public void init servlet config servlet config http servlet request request http servlet response response throws servlet exception servlet context request get session get servlet context set servlet request request set servlet response response set user agent from request request init props servlet config init max content length try look and feel look and feel look and feel factory get look and feel factory create cgmanager set look and feel look and feel catch exception ex log fatal could not load look and feel servlet context get init parameter wings lookandfeel factory ex throw new servlet exception ex
detect user agent user agent
public void set background color color set attribute selector all cssproperty background color cssstyle sheet get attribute color
set the components foreground color
public void set foreground color color set attribute selector all cssproperty color cssstyle sheet get attribute color
set the foreground color
public void set viewport size rectangle new viewport rectangle old viewport viewport viewport new viewport if is different old viewport new viewport if old viewport null new viewport null fire viewport changed true fire viewport changed false else if new viewport x old viewport x new viewport width old viewport width fire viewport changed true if new viewport y old viewport y new viewport height old viewport height fire viewport changed false reload
sets the actual visible part of a scrollable
public void set font sfont font cssattribute set attributes cssstyle sheet get attributes font style style get dynamic style selector all if style null add dynamic style new cssstyle selector all attributes else style remove cssproperty font style remove cssproperty font family style remove cssproperty font size style remove cssproperty font style style remove cssproperty font weight style put all attributes
set the font
public void set cell renderer slist cell renderer cell renderer slist cell renderer old value this cell renderer this cell renderer cell renderer reload if change old value cell renderer
sets the renderer thats used to write out each cell in the list
public void set url simple url r simple url old url url url r if url null old url null url null url equals old url reload
set the url this anchor points to
protected void set cell editor stable cell editor an editor cell editor an editor
set the cell editor variable
public void set selection background color color set attribute selector selection cssproperty background color cssstyle sheet get attribute color
set the foreground color
public void set visible boolean visible boolean old this visible this visible visible if visible old if fire component change events fire component change event new scomponent event this visible scomponent event component shown scomponent event component hidden reload
set the visibility
public void set editing column int a column int old editing column editing column editing column a column if editing column old editing column reload
set the editing column variable
public void set selection foreground color color set attribute selector selection cssproperty color cssstyle sheet get attribute color
set the foreground color
public void set editing row int a row int old editing row editing row editing row a row if editing row old editing row reload
set the editing row variable
public void set selection font sfont font set attributes selector selection cssstyle sheet get attributes font
set the font
public void set visible row count int visible row count if this visible row count visible row count this visible row count math max 0 visible row count reload fire property change visible row count old value visible row count
set the preferred number of rows in the list that can be displayed
public boolean is recursively visible return visible parent null parent is recursively visible
return the visibility
public void set model list model model if model null throw new illegal argument exception model must be non null if is different data model model clear selection data model model data model add list data listener this fire viewport changed false reload
sets the model
public void set enabled boolean enabled reload if change this enabled enabled this enabled enabled
set wether this component should be enabled
public string to string string encoding get request get character encoding null get request get character encoding locale char set default encoding try sstring builder buffer new sstring builder buffer append dir buffer append urlencoder encode get dir encoding if get file name null buffer append name buffer append urlencoder encode get file name encoding if get content type null buffer append type buffer append urlencoder encode get content type encoding buffer append id buffer append urlencoder encode get id encoding return buffer to string catch unsupported encoding exception e log error get class get name e return null
create a url encoded form of this uploaded file that contains
public void write device s throws ioexception try if visible cg write s this catch ioexception se typical double clicks not severe log debug not severe socket exception during code generation for get class get name se catch no class def found error e mostly happens when dwr jar is not in classpath log fatal error during code generation for get class get name e catch throwable t should we warn here or maybe throw an error log error exception during code generation for get class get name t
let the code generator delegate write the components code
public void editing stopped change event e take in the new value stable cell editor editor get cell editor if editor null object value editor get cell editor value set value at value editing row editing column remove editor reload
invoked when editing is finished
public scomponent get manager component if reload frame null reload frame new sreload frame return reload frame
the manager component is the invisible target frame
public void set parent scontainer p if p null p instanceof sframe set throw new illegal argument exception the sreload frame can only be added to sframe sets super set parent p
sets the parent frame set container
public void set layout slayout manager l
no layout manager allowed
public void editing canceled change event e remove editor reload
invoked when editing is canceled
public void remove scomponent c if c null return if get layout null get layout remove component c int index get component list index of c if get component list remove c get constraint list remove index fire container event org wings event scontainer event component removed c c set parent null reload
removes the given component from the container
public scomponent add component scomponent c object constraint int index if c null return null if c instanceof sframe throw new illegal argument exception only sframe sets or sframes are allowed if get layout null get layout add component c constraint index get component list add index c get constraint list add index constraint c set parent this return c return super add component c constraint
only sframe sets or sframes are allowed
public void remove component scomponent c if c null return if c instanceof sframe throw new illegal argument exception only sframe sets or sframes are allowed if get layout null get layout remove component c c set parent null int index get component list index of c if get component list remove c get constraint list remove index return super remove component c
only sframe sets or sframes are allowed
public void set parent scontainer p if p instanceof sframe set throw new illegal argument exception sframe sets can only be added to sframe sets super set parent p
sets the parent frameset container
public void set locale locale l throws illegal argument exception if l null locale equals l return if supported locales null supported locales length 0 arrays as list supported locales contains l final locale old locale locale locale l property change support fire property change locale property old locale locale log info setting session locale to l else throw new illegal argument exception locale l not supported
sets a new locale for this session
private string encode low level event id string low level event id if get parent frame null if this instanceof low level event listener low level event listener this is epoch check enabled return get parent frame get event epoch sconstants uid divider low level event id return low level event id
encodes a low level event id for using it in a request parameter
public void set event string e if is different event e event e reload
if this is set null this event is rendered as anchor
public void register drag source drag source drag source don t add a component more than once if drag sources contains drag source drag sources add drag source names to components map put scomponent drag source get name drag source
register a drag source with the manager
public void set event target low level event listener t if is different request target t request target t reload
sets the low level event listener for which to create a event
public void register drop target drop target drop target don t add a component more than once if drop targets contains drop target drop targets add drop target names to components map put scomponent drop target get name drop target
register a drop target with the manager
public list get drag sources return drag sources
getter for the list of drag sources
public list get drop targets return drop targets
getter for the list of drop targets
public void set selection model slist selection model selection model if selection model null throw new illegal argument exception selection model must be non null if selection handler null this selection model remove list selection listener selection handler selection model add list selection listener selection handler slist selection model old value this selection model this selection model selection model
set the selection model for the list
protected void set group sbutton group g if is different button group g do no longer react on events from old button group if button group null get session get dispatcher null get session get dispatcher remove low level event listener this button group get component id end of if button group g button group changed but button already registered via parent frame if button group null get parent frame null get session get dispatcher null get session get dispatcher add low level event listener this button group get component id end of if reload
add this button to a button group
public void set selection model slist selection model model if model null throw new illegal argument exception cannot set a null slist selection model if get selection model null remove selection listener reload on selection change listener selection model model add selection listener reload on selection change listener
sets the row selection model for this table to code model code
public void set type string t if is different type t type t reload
sets the button type
public void set message type int new type switch new type case error message image label set icon error image image label set tool tip text error break case information message image label set icon message image image label set tool tip text information break case warning message image label set icon warning image image label set tool tip text warning break case question message image label set icon question image image label set tool tip text question break case plain message default image label set icon null image label set tool tip text null message type new type
sets the option panes message type
public void set tool tip text string t reload if change this tooltip t tooltip t
set the tooltip text
public void set selection mode int s reload if change get selection model get selection mode s get selection model set selection mode s
sets the selection mode
public string put cssproperty name string value cached string representation null 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 cssattribute set attributes cached string representation null if map null map new hash map 8 boolean changed false for iterator iterator attributes properties entry set iterator iterator has next map entry entry map entry iterator next cssproperty property cssproperty entry get key changed changed put property string entry get value null return changed
adds a set of attributes to the list
public object clone if is empty return new cssattribute set else return new cssattribute set hash map map clone
clones a set of attributes
public void set focus traversal index int index reload if change this focus traversal index index focus traversal index index
the index in which the focus is traversed using tab
public string to string if cached string representation null final sstring builder builder new sstring builder if map null iterator names map entry set iterator while names has next map entry next map entry names next builder append next get key builder append builder append next get value builder append cached string representation builder to string return cached string representation
converts the attribute set to a string
public void write device out throws ioexception iterator iterator map entry set iterator while iterator has next map entry entry map entry iterator next style entry get value write out out flush
write each style in set to the device
public void set word wrap boolean word wrap if this word wrap word wrap this word wrap word wrap reload
defines if the label is allowed to wrap
public object clone try return super clone catch exception e log error unable to clone component e return null
clone this component
public void set horizontal alignment int alignment reload if change this horizontal alignment alignment horizontal alignment alignment
set the horizontal alignment
public request url add parameter string parameter if parameter null if parameters null parameters new sstring builder else parameters append amp parameters append recode parameter return this
add an additional parameter to be included in the get paramter
public void set vertical alignment int alignment reload if change this vertical alignment alignment vertical alignment alignment
set the vertical alignment
public void write device d throws ioexception super write d if resource null epoch null d print epoch d print sconstants uid divider 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 print has quest mark amp d print parameters to string
writes the context address to the output device
public string to string sstring builder erg new sstring builder if base url null erg append base url if resource null epoch null erg append epoch erg append sconstants uid divider 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
public void set editable boolean ed boolean old editable editable editable ed if editable old editable reload
defines if the textcomponent is editable or not
public void set text string text document set text text
sets the text of the component to the specified text
public void set cg component cg new cg we do not check that the cg instance is different before allowing the switch in order to enable the same cg instance with different default settings to be installed if cg null cg uninstall cg this component cg old cg cg cg new cg if cg null cg install cg this reload if change cg old cg
set the look and feel delegate for this component
protected limited buffer buffer resource throws ioexception if buffer null if max buffer size 1 buffer new limited buffer max buffer size else 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 log fatal resource returned empty stream this buffer set valid false return buffer
reads the resource into an limited buffer and returns it
public void write device out throws ioexception if the buffer is null then we are called the first time if buffer null buffer resource if buffer null no valid bufferable resource available return if buffer is valid buffered and small enough buffer out buffer write to out else too large to be buffered res out input stream resource get resource stream if resource null int deliver size 0 byte copy buffer new byte 1024 int read while read resource read copy buffer 0 out write copy buffer 0 read deliver size read resource close size deliver size out flush
writes the resource to the given stream
public void set selection background color color set attribute selector selected cssproperty background color cssstyle sheet get attribute color
set the foreground color
public void set icon sicon i reload if change icon i icon i
sets the icon for the compound
public void set edit icon sicon edit icon this edit icon edit icon
the icon to display if the cell value is code null code
public void set rollover icon sicon icon reload if change rollover icon icon rollover icon icon
sets the icon that is displayed as roll over effect meaning the icon
public void set rollover selected icon sicon icon reload if change rollover selected icon icon rollover selected icon icon
sets the icon that is displayed as rollover effect of a selected compound
public void set selection foreground color color set attribute selector selected cssproperty color cssstyle sheet get attribute color
set the foreground color
public void set selected icon sicon icon reload if change selected icon icon selected icon icon
sets the icon that is displayed when a compound is selected
public object get value wrapper value wrapper value wrapper session manager get session get property this property name null means that the property is being used for the first time this session initialize the value which may be null if value wrapper null object value initial value set value return value else return value wrapper value
return the current value of this variable from the session
public void set object value value wrapper value wrapper new value wrapper value wrapper value value session manager get session set property this property name value wrapper
set the value
public void set disabled selected icon sicon icon reload if change disabled selected icon icon disabled selected icon icon
sets the icon that is displayed when a selected compound is disabled
public void set disabled icon sicon icon reload if change disabled icon icon disabled icon icon
sets the icon that is displayed when a compound is disabled