input
stringlengths
10
828
output
stringlengths
5
107
public void remove component scomponent c throw new illegal argument exception does not have components
this frame stays invisible
public sicon get closed icon return closed icon
returns the icon used to represent non leaf nodes that are not
public void set parent scontainer p if p null p instanceof sframe set throw new illegal argument exception the reload manager frame can only be added to sframe sets parent p
sets the parent frame set container
public void set leaf icon sicon new icon leaf icon new icon
sets the icon used to represent leaf nodes
protected void set parent frame sframe f
there is no parent frame
public sicon get leaf icon return leaf icon
returns the icon used to represent leaf nodes
public sframe get parent frame return null
there is no parent frame
public void set layout slayout manager l throw new illegal argument exception no layout manager allowed
no layout manager allowed
public collection get headers if get frame is no caching return no expiration headers else return collections empty set
the http header parameteres attached to this dynamic code ressource
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 fire container event org wings event scontainer event component removed c c set parent null reload reload manager reload code
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 layout null 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 layout null 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 parent p
sets the parent frameset container
public void set base target string base target this base target base target propagate it to all frame set s iterator iterator get component list iterator while iterator has next object object iterator next if object instanceof sframe sframe object set base target base target
set the base target and propagate it to all frames
public int get horizontal alignment if style null return style get horizontal alignment return sconstants left align
returns the alignment
public void synchronize adjustables if scrollable null return rectangle viewport scrollable get viewport size rectangle max viewport scrollable get scrollable viewport size if viewport null viewport max viewport if get horizontal scroll bar null get horizontal scroll bar policy horizontal scrollbar never adjust adjustable get horizontal scroll bar viewport max viewport if get vertical scroll bar null get vertical scroll bar policy vertical scrollbar never adjust adjustable get vertical scroll bar viewport max viewport
synchronize viewport of scrollable with settings of adjustables
public void set value int n set range properties n extent min max is adjusting
sets the current value of the model
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 return id
get the id that identifies this resource as an externalized object
public void set extent int n set range properties value n min max is adjusting
sets the extent to i n i after ensuring that i n i
public void set model sbounded range model new model if model null model remove change listener fwd adjustment events model new model if model null model add change listener fwd adjustment events
sets the model that handles the scrollbars four
public void set minimum int n set range properties math max value n extent n max is adjusting
sets the minimum to i n i after ensuring that i n i
public void synchronize viewport rectangle viewport scrollable get scrollable viewport size should never happen if it happen we got a serious problem because we cannot determine what to scroll if viewport null viewport new rectangle if get horizontal scroll bar null get horizontal scroll bar policy horizontal scrollbar never adjust viewport viewport get horizontal scroll bar if get vertical scroll bar null get vertical scroll bar policy vertical scrollbar never adjust viewport viewport get vertical scroll bar scrollable set viewport size viewport
synchronize viewport of scrollable with settings of adjustables
public void set maximum int n set range properties math min value n extent min n is adjusting
sets the maximum to i n i after ensuring that i n i
public void set selection attribute string name string value boolean changed selection attributes contains name selection attributes put name value if changed reload reload manager reload style
set a selection attribute
public void set unit increment int unit increment this unit increment unit increment
sets the unit increment property
public string get selection attribute string name return selection attributes get name
return the value of an selection attribute
public void set block increment int block increment this block increment block increment
sets the block increment property
public void set cell padding int p cell padding p
set the amount of padding between cells
public void set cell spacing int s cell spacing s
set the amount of space between the cells and the outer border
public adjustable get horizontal scroll bar return horizontal scroll bar
returns the horizontal scroll bar
public void set horizontal scroll bar adjustable sb set horizontal scroll bar sb sborder layout south
set the horizontal scroll bar
public void set horizontal scroll bar adjustable sb string constraint if horizontal scroll bar null horizontal scroll bar remove adjustment listener get adjustment listener if horizontal scroll bar instanceof scomponent remove scomponent horizontal scroll bar horizontal scroll bar sb if horizontal scroll bar null if horizontal scroll bar instanceof scomponent super add component scomponent horizontal scroll bar constraint get component count synchronize adjustables horizontal scroll bar add adjustment listener get adjustment listener reload reload manager reload code
set the horizontal scroll bar
public void set header boolean b header b
specify if the first row should be printed as header
public void set vertical scroll bar adjustable sb set vertical scroll bar sb sborder layout east
set the vertical scroll bar
public void set orientation int orientation switch orientation case sconstants vertical case sconstants horizontal this orientation orientation break default throw new illegal argument exception orientation must be one of vertical horizontal
set the scrollbars orientation to either vertical or
public void set vertical scroll bar adjustable sb string constraint if vertical scroll bar null vertical scroll bar remove adjustment listener get adjustment listener if vertical scroll bar instanceof scomponent remove scomponent vertical scroll bar vertical scroll bar sb if vertical scroll bar null if vertical scroll bar instanceof scomponent super add component scomponent vertical scroll bar constraint get component count synchronize adjustables vertical scroll bar add adjustment listener get adjustment listener reload reload manager reload code
set the vertical scroll bar
public void set horizontal scroll bar policy int policy if policy horizontal scroll bar policy horizontal scroll bar policy policy reload reload manager reload code
determines when the horizontal scrollbar appears in the scrollpane
public grid get grid if current grid null current grid new grid return current grid
build a grid from the current configuration
public void set vertical scroll bar policy int policy if policy vertical scroll bar policy vertical scroll bar policy policy reload reload manager reload code
determines when the vertical scrollbar appears in the scrollpane
final public grid bag constraints get constraints scomponent comp it might be better to return a copy of the constraint but that would hurt the performance return grid bag constraints components get comp
retrieve the constraint of a scomponent
public void set preferred size sdimension dim super set preferred size dim if horizontal scroll bar instanceof scomponent scomponent horizontal scroll bar set preferred size dim if vertical scroll bar instanceof scomponent scomponent vertical scroll bar set preferred size dim
set the preferred size for this scrollpane and
public object string to value string text object obj null try obj number format parse object text catch exception e e print stack trace return obj
specified by string to value in class abstract formatter
public void set viewport view scomponent view if view component null remove view component add view view component view
sets the viewport component
public void add change listener change listener cl add event listener change listener class cl
add a listener to the list of change listeners
protected int scroll value int pos int size int rpos int rsize int inc if pos rpos pos size rpos rsize nothing to do return pos if pos rpos scroll backward ignore rsize either it fits or it doesn t just make sure the difference between pos and rpos is as small as possible while pos rpos pos inc else scroll forward while pos size rpos rsize pos inc rpos pos inc return pos
calculate the best new position to show the given range
public void add smenu item menu item menu items add menu item menu item set parent menu 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
add a menu item to this menu
public void add string menuitem this add new smenu item menuitem
add a menu item to this menu
public int get menu component count return menu items size
return the number of items on the menu including separators
public void remove int pos remove get menu component pos
removes the menu item at specified index from the menu
public void set maximum row count int count if maximum row count count maximum row count count reload reload manager reload code
sets the maximum number of rows the scombo box displays
public void set popup menu visible boolean b if is enabled return popup menu visible b
sets the visibility of the menus popup
public void remove change listener change listener cl remove event listener change listener class cl
remove listener from the list of change listeners
public boolean is popup menu visible return popup menu visible
returns true if the menus popup window is visible
public void add adjustment listener adjustment listener l add event listener adjustment listener class l
adds an adjustment listener
public void remove adjustment listener adjustment listener l remove event listener adjustment listener class l
removes an adjustment event listener
protected void fire state changed change event event null 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 change listener class lazily create the event if event null event new change event this change listener listeners i 1 state changed event
fire change events at all registered change listeners
public void set default button sbutton default button unregister existing default buttons from dispatcher if this default button null get dispatcher null get dispatcher unregister low level event listener this default button this default button default button manually register new default buttons at dispatcher as default button is not added into a container this must be done manually if default button null get dispatcher null get dispatcher register low level event listener default button
set the default button activated upon b enter b
public void set selected index int index int size data model get size if index 1 set selected item null else if index 1 index size throw new illegal argument exception set selected index index out of bounds else set selected item data model get element at index
selects the item at index code index code
public int get selected index object selected data model get selected item if selected null return 1 for int i 0 i get item count i if selected equals get item at i return i return 1
returns the index of the currently selected item in the list
public int hash code return class loader hash code resource file name hash code
resources using the same classloader and are denoting the same
public boolean equals object o if o instanceof classpath resource classpath resource other classpath resource o return this other 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 void add item object object check mutable combo box model mutable combo box model data model add element object
adds an item to the item list
protected void fire action performed string p action command action event e null guaranteed to return a non null array object listeners listener list 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 lazy create action event if e null e new action event this action event action performed p action command action listener listeners i 1 action performed e
fire a action event at each registered listener
public void set tab placement int tab placement if tab placement top tab placement left tab placement bottom tab placement right throw new illegal argument exception illegal tab placement must be top bottom left or right this tab placement tab placement if f style sheet null f style sheet invalidate
sets the tab placement for this tabbedpane
public void set no break boolean breakable no break breakable
render the text in this label non breakable
public void insert item at object object int index check mutable combo box model mutable combo box model data model insert element at object index
inserts an item into the item list at a given index
public void set post method boolean post method reload if change reload manager reload code this post method post method this post method post method
set whether this form is to be transmitted via code post code true
public void set horizontal text position int text position horizontal text position text position
sets the horizontal position of the lables text relative to its icon
public void remove item object object check mutable combo box model mutable combo box model data model remove element object
removes an item from the item list
public void set vertical text position int text position vertical text position text position
sets the vertical position of the lables text relative to its icon
public void set encoding type string type reload if change reload manager reload code this enc type type enc type type
set the encoding of this form
public void remove item at int index check mutable combo box model mutable combo box model data model remove element at index
removes the item at code index code
public string get encoding type if enc type null return detect encoding type this else return enc type
get the current encoding type as set with
public void remove all items check mutable combo box model mutable combo box model model mutable combo box model data model int size model get size if model instanceof default combo box model default combo box model model remove all elements else for int i 0 i size i object element model get element at 0 model remove element element
removes all items from the item list
public void set model single selection model model this model model model add change listener this
sets the model to be used with this tabbedpane
public void add item listener item listener listener add event listener item listener class listener
adds an item listener
public void set action url action reload if change reload manager reload code this action action this action action
overwrite the request url to which this form should target
public void remove item listener item listener listener remove event listener item listener class listener
removes an item listener
public void add action listener action listener listener add event listener action listener class listener reload reload manager reload code
adds an action listener
public request url get request url request url addr super get request url if get action null addr add parameter get action to string return addr
the url to which this form should post its content requests
public void remove action listener action listener listener remove event listener action listener class listener reload reload manager reload code
removes an action listener
public scomponent get selected component int index get selected index if index 1 return null return get tab at index
returns the currently selected component for this tabbedpane
protected void fire item state changed item event e 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 item listener class item listener listeners i 1 item state changed e
notify all listeners that have registered as item listeners
public void set selected component scomponent c int index index of component c if index 1 set selected index index else throw new illegal argument exception component not found in tabbed pane
sets the selected component for this tabbedpane
public int index of component scomponent component for int i 0 i get tab count i if page pages get i component equals component return i return 1
returns the index of the tab for the specified component
public void contents changed list data event e if is different selected item reminder data model get selected item selected item changed if selecting item fire action event reload reload manager reload code
this method is public as an implementation side effect
public void interval added list data event e reload reload manager reload code
invoked when items have been added to the internal data model
public void interval removed list data event e reload reload manager reload code
invoked when values have been removed from the data model
public scomponent add string title scomponent component add tab title component return component
adds a i component i with the specified tab title
public wing sskeleton call super constructor not necessary but if ever it s here super init gui
p creates the gui of the webapplication p
private void init gui create a frame sframe frame new sframe accessing the servlet context servlet context sctx frame get session get servlet context get the pane to put components in scontainer pane frame get content pane create and add a label to the pane slabel label new slabel add as you like pane add component label tell the wing servlet that we have something to show frame show note no frame set size needed
p initializes the gui p
public string get configuration return configuration null configuration type get config
contains the configuration for the rich text editor
public void remove scomponent component int index index of component component if index 1 remove tab at index
removes the tab which corresponds to the specified component
public void set divider size int new size int old size divider size if old size new size divider size new size reload if change old size new size property change support fire property change divider size old size this divider size
sets the size of the divider
public void set max tabs per line int tabs max tabs per line tabs
sets the maximum tabs per line
public sborder get border return border
gets the border
public void set left component scomponent comp scomponent old val this left component if comp null if left component null remove left component left component null else add comp ssplit pane left property change support fire property change left component old val this left component
sets the component to the left or above the divider
public void set border sborder border if component null is different this border border component reload this border border
sets the border
public void set title string title if component null is different this title title component reload this title title
sets the title