input
stringlengths
10
828
output
stringlengths
5
107
public void set model table model tm if tm null throw new illegal argument exception cannot set a null table model table model old val this model if this model tm if model null model remove table model listener this model tm model add table model listener this table changed new table model event tm table model event header row property change support fire property change model old val this model
p sets the model of the table
public void set progress bar dimension sdimension dimension sdimension old val this progress bar dimension progress bar dimension dimension property change support fire property change progress bar dimension old val this progress bar dimension
sets the size of the graphically rendered progress bar element
public sformatted text field get text field return ftf
returns the sformatted text field of this editor
public sspinner get spinner return this spinner
returns the spinner of this editor
public int row at point spoint point return get row for location point
returns the table row for the passed code spoint code
public spinner date model get model return spinner date model get spinner get model
returns the spinner date model of this editor
public int get row for location spoint point return integer parse int point get coordinates
returns the tree row for the passed code spoint code
public spinner list model get model return spinner list model get spinner get model
returns the spinner list model of this editor
private void fire parent frame event sparent frame event a event are listeners registered if fire parent frame change events maybe the better way to do this is to user the get listener list and iterate through all listeners this saves the creation of an array but it must cast to the apropriate listener object listeners get listener list for int i listeners length 2 i 0 i 2 if listeners i sparent frame listener class lazily create the event process parent frame event sparent frame listener listeners i 1 a event
reports a parent frame change
public void uninstall cg component type component
uninstall the cg from code component code
private void process parent frame event sparent frame listener listener sparent frame event event int id event get id switch id case sparent frame event parentframe added listener parent frame added event break case sparent frame event parentframe removed listener parent frame removed event break
processes parent frame events occurring on this component by
public void set name string unique name if unique name null char ch unique name char at 0 if unique name length 0 character is letter ch ch ch throw new illegal argument exception unique name is not a valid identifier for int i 1 i unique name length i ch unique name char at i if character is letter ch character is digit ch ch ch throw new illegal argument exception unique name is not a valid identifier set name raw unique name
sets the name property of a component which must be b unique b
protected void open layouter body device d slayout manager layout throws ioexception utils print debug newline d layout get container utils print debug d start layout name layout d print tbody
print html table element declaration of a typical invisible layouter table
public void set name raw string unchecked name string old val this name reload if change this name unchecked name this name unchecked name unregister register property change support fire property change name old val this name
b direct setter for name
public void add style string additional css class name if this style null this style length 0 set style additional css class name trivial case else if this style index of additional css class name 0 set style this style additional css class name
append a style class name to the style string
public void remove style string css style class name if this style null css style class name null this style index of css style class name 0 if this style length css style class name length set style null trivial case else set style this style replace all b css style class name b replace all trim
remove a style class definiton from this component
public int convert column index to view int model column index if model column index 0 return model column index stable column model cm get column model int count cm get column count for int column 0 column count column if cm get column column get model index model column index return column return 1
maps the index of the column in the table model at
public void set selection model stree selection model selection model stree selection model old val this selection model if this selection model null this selection model remove tree selection listener fwd selection events if selection model null selection model sdefault tree selection model no selection model selection model add tree selection listener fwd selection events if selection model null this selection model sdefault tree selection model no selection model else this selection model selection model property change support fire property change selection model old val this selection model
sets the trees selection model
public void uninstall cg final scomponent comp final sframe component sframe comp component remove dynamic resource reload resource class component remove dynamic resource update resource class session headers get instance deregister headers headers
uninstall renderer i
public void set parent scontainer p super set parent p if get cell renderer pane null get cell renderer pane set parent p if editor comp null editor comp set parent p
sets the container this component resides in
public void set selection path tree path path tree path old val get selection model get selection path get selection model set selection path path property change support fire property change selection path old val get selection model get selection path
selects the node identified by the specified path
public void set selection paths tree path paths tree path old val get selection model get selection paths get selection model set selection paths paths property change support fire property change selection paths old val get selection model get selection paths
selects the nodes identified by the specified array of paths
protected void set parent frame sframe f super set parent frame f if get cell renderer pane null get cell renderer pane set parent frame f
sets the frame in which this component resides
public void add dynamic style style style if dynamic styles null dynamic styles new hash map selector style 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 selection rows int rows if rows null return tree path paths new tree path rows length for int i 0 i rows length i paths i get path for row rows i set selection paths paths
selects the nodes corresponding to each of the specified rows
public void remove dynamic style selector selector if dynamic styles null return dynamic styles remove selector reload
remove all css style definitions defined for the passed css selector
public void write device d slayout manager l throws ioexception final sflow down layout layout sflow down layout l open layouter body d layout print layouter table body d layout get container 1 layout get components new table cell style close layouter body d layout
render flow down layout as table based layout
public boolean is word wrap default return word wrap default
default word wrap behaviour
public void set word wrap default boolean word wrap default this word wrap default word wrap default
default word wrap behaviour
public style get dynamic style selector selector if dynamic styles null return null return dynamic styles get selector
returns the style defined for the passed css selector
public void set dynamic styles collection dynamic styles map old val this dynamic styles if dynamic styles null return if this dynamic styles null this dynamic styles new hash map selector style 4 for object dynamic style dynamic styles style style style dynamic style this dynamic styles put style get selector style reload property change support fire property change dynamic styles old val this dynamic styles
adds the passed collection of
protected void print spacer final device device throws ioexception device print div class spacer div
prints a spacer if necessary depending on browser compatibility
public void set render xml declaration boolean render xml declaration this render xml declaration render xml declaration
sets should the returned html page start with the lt xml version 1
public collection get dynamic styles if dynamic styles null dynamic styles size 0 return null return collections unmodifiable collection dynamic styles values
returns the collection of currently defined css styles on this component
public component cg get cg scomponent target return component cg get defaults get target get class component cg class
get a component cg from the defaults table
public component cg get cg class target class return component cg get defaults get target class component cg class
get a component cg from the defaults table
public layout cg get cg slayout manager target return layout cg get defaults get target get class layout cg class
get a layout manager cg from the defaults table
public void set attribute string css property name string value final cssproperty property cssproperty value of 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 string get string string key session session session manager get session return session get localizer get string key
get a string from the locale specific defaults table
public void set defaults resource defaults defaults this defaults defaults
set the defaults table
public resource defaults get defaults if defaults null log warn defaults null return defaults
return the defaults table
public void set face string f face f if face null face trim length 0 face null
note face is essentially what is set after the css font family
public void set attribute cssproperty property string property value 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 property value
assign or overwrite a css property value pair on this component
public void set header renderer stable cell renderer header cell renderer stable cell renderer old val this header renderer header renderer header cell renderer property change support fire property change header renderer old val this header renderer
the renderer component responsible for rendering the tables header cell
public boolean equals object o if o instanceof class path stylesheet resource if super equals o return true return false
two class path stylesheet resource are equal if both of them are instances
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 map cssproperty string old style style properties string old val old style get property string old style put property property value reload if change old property value property change support fire property change attribute old val property value
assign or overwrite a css property value pair at this component
public stable cell renderer get header renderer return header renderer
the renderer component responsible for rendering the tables header cell
private string externalize image string class path string mime type class path resource res new class path resource class path mime type try 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 catch resource not found exception e log debug could not find resource e get message return string builder image url new string builder image url append ext manager externalize res externalize manager global image url append return image url to string
externalizes an image found
private int read from url buffer int result url buffer buffer pos buffer pos if buffer pos url buffer length state state none return result
reads from the filename buffer
public void write device out throws ioexception try get frame write out catch ioexception e throw e catch exception e log fatal resource get id e throw new ioexception e get message undeclared throwable
renders and writes the code of the
private string strip string buffer char character if buffer char at 0 character return strip buffer substring 1 buffer length character if buffer char at buffer length 1 character return strip buffer substring 0 buffer length 1 character return buffer
strips a string of occurences of character
private void analyze state int character switch character case u if state state none state state u else state state none break case r if state state u state state ur else state state none break case l if state state ur state state url else state state none break case if state state url state state url done else state state none break default state state none break
analyzes the parse state and sets the state variable accordingly
public void set attribute selector selector cssproperty property sicon icon set attribute selector property icon null url icon get url to string none
convenience variant of
public void remove component scomponent c if c null return string constraint null iterator iterator components entry set iterator while iterator has next map entry entry map entry iterator next if c equals entry get value constraint string entry get key break if constraint null components remove constraint remove singleton component constraint
removes the component from the layout manager
public boolean can import scomponent component data flavor transfer flavors property descriptor property descriptor get property descriptor property name component if property descriptor null return false get the writer method method write method property descriptor get write method if write method null return false get arguments of write method class arguments write method get parameter types if arguments null arguments length 1 return false check if the argument type matches one of the transferflavors data flavor flavor get property data flavor arguments 0 transfer flavors if flavor null return false return true
returns whether if this component can import one of the transfers data flavors
public void set attribute selector selector cssproperty property color color set attribute selector property cssstyle sheet get attribute color
convenience variant of
public boolean can import stransfer handler transfer support support return can import support get component support get data flavors
returns if this component can import the given data within a transfer support
protected transferable create transferable scomponent component property descriptor property descriptor get property descriptor property name component if property descriptor null return new property transferable property descriptor component return null
creates a transferable based on the data in the given component
public stable cell renderer get cell renderer int row int col stable column model column model get column model if column model null stable column column column model get column col if column null stable cell renderer renderer column get cell renderer if renderer null return renderer return get default renderer get column class col
returns the cell renderer for the given table cell
public void set target resource string target resource string old val this target resource this target resource target resource property change support fire property change target resource old val this target resource
set the target resource
public void export to clipboard scomponent component clipboard clipboard int action throws illegal state exception transferable t create transferable component if action copy action move get source actions component action 0 export done component null none return if t null try clipboard set contents t null export done component t action catch illegal state exception e export done component t none throw e
exports the data in componet to the given clipboard
public string get target resource if target resource null target resource get dynamic resource reload resource class get id return target resource
every externalized ressource has an id
public stable cell renderer get header renderer int col stable column model column model get column model if column model null stable column column column model get column col if column null stable cell renderer renderer column get header renderer if renderer null return renderer return get header renderer
returns the header renderer for the given header cell
public color get background return dynamic styles null dynamic styles get selector all null null cssstyle sheet get background cssattribute set dynamic styles get selector all
returns the current background color of this component
public void set background color color color old val this get background set attribute selector all cssproperty background color cssstyle sheet get attribute color property change support fire property change background old val this get background
set the components background color
public void clear headers headers clear reload
removes all headers
protected void name renderer component final scomponent component final int row final int col name buffer set length 0 name buffer append this get name append if row 1 name buffer append h else name buffer append row name buffer append append col component set name raw name buffer to string
generates the name id of the editing component so that
public color get foreground return dynamic styles null dynamic styles get selector all null null cssstyle sheet get foreground cssattribute set dynamic styles get selector all
return the components foreground color
public void set title string title string old val this title if title null title if title equals this title this title title reload property change support fire property change title old val this title
sets the title of this html page
public scomponent prepare header renderer stable cell renderer header renderer int col object header value if col 0 header value null else if get column model null get column model get column col null header value get column model get column col get header value else header value model get column name col return header renderer get table cell renderer component this header value false 1 col
prepares and returns the renderer to render the column header
public void set foreground color color color old val this get foreground set attribute selector all cssproperty color cssstyle sheet get attribute color property change support fire property change foreground old val this get foreground
set the foreground color
public void expand path 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 no caching boolean no caching boolean old val this no caching this no caching no caching property change support fire property change no caching old val this no caching
typically you dont want any wings application to operate on old views meaning
public void set editable boolean editable boolean old val this editable reload if change this editable editable this editable editable property change support fire property change editable old val this editable
if this table is editable clicks on table cells will be catched
public sfont get font return dynamic styles null dynamic styles get selector all null null cssstyle sheet get font cssattribute set dynamic styles get selector all
return the font used inside this component
public sicon get visual representation transferable transferable return null
returns an sicon representing the visual representation of the transferable transferable
public void set visible boolean visible if visible is visible if visible list new headers new array list session headers get instance get headers for iterator i headers iterator i has next object old headers i next if new headers contains old headers new headers add old headers headers new headers get session add frame this register else get session remove frame this unregister super set visible visible set recursively visible visible
shows or hide this frame
public slabel get visual representation label transferable transferable sicon icon get visual representation transferable if icon null return null if label null label new slabel label set icon icon return label
returns an slabel representing the visual representation of the transferable transferable
public void set visible boolean visible boolean old this visible this visible visible if visible old if parent null parent reload else reload property change support fire property change visible old this visible set recursively visible is recursively visible
set the visibility
public boolean import data scomponent component transferable transferable property descriptor property decsriptor get property descriptor this property name component if property decsriptor null return false method write method property decsriptor get write method if write method null return false class arguments write method get parameter types if arguments null arguments length 1 return false data flavor flavor get property data flavor arguments 0 transferable get transfer data flavors if flavor null try object value transferable get transfer data flavor stransfer handler invoke write method component new object value return true catch exception e e print stack trace return false
imports the data specified in the transferable into the given component
public void set is drop scomponent component scomponent source smouse event event int action this is drop true this component component this source source this requested drop action action set drop location this component event get point
prepares the transfer support to be used in drop cases
public boolean is recursively visible return recursively visible
return the visibility
public scomponent get component return this component
returns the component on which the cursor is
public int get user drop action if is drop throw new illegal state exception get user drop action called when is drop false return this requested drop action
returns the drop action requested by the user
public int get source drop actions if is drop throw new illegal state exception get source drop actions called when is drop false return this source get transfer handler get source actions this source
returns the drop actions supported by the source component
public transferable get transferable return this transferable
returns the transferable associated with this transfer support
public boolean is cell editable int row int col if col get column count row 1 return false else return get model is cell editable row convert column index to model col
returns true if the cell at i row i and i column i
public boolean is data flavor supported data flavor data flavor return transferable is data flavor supported data flavor
returns if data flavor is supported by this transfer support
public void set enabled boolean enabled boolean old val this enabled reload if change this enabled enabled this enabled enabled property change support fire property change enabled old val this enabled
set wether this component should be enabled
public boolean is drop return this is drop
returns if this transfer support represents a drop
public void set node indent depth int depth if depth 0 depth 0 if node indent depth depth int old val this node indent depth node indent depth depth reload property change support fire property change node indent depth old val this node indent depth
set the indent depth in pixel between two nodes of a different level
public boolean handle error throwable e return false
custom error handling
public drop location get drop location if is drop throw new illegal state exception is drop was false when get drop location was called return this drop location
returns the drop location for this transfer
public void add smenu item menu item menu items add menu item menu item set parent menu this menu item put client property drm real parent component this
add a menu item to this menu
public void add scomponent menu item menu items add menu item menu item set parent frame get parent frame menu item put client property drm real parent component this
add a menu item to this menu
public void add separator add new sseparator
add a separator to this menu
public void reload get session get reload manager reload this
marks this component as subject to reload
public double get width scale factor return width scale factor
returns the scale factor for the width of the menu components
public void set width scale factor double width scale factor double old val this width scale factor this width scale factor width scale factor property change support fire property change width scale factor old val this width scale factor
sets the scale factor for the width of the menu components
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 property change support fire property change title old title this title
sets the title of the dialog