input
stringlengths
10
828
output
stringlengths
5
107
public void set value string attribute name object value if validation controller get form null validation controller get form get vomodel set value attribute name value
method called by lookup controller to update parent v
public void set selection background color selection background list set selection background selection background
sets the background color for selected cells
public boolean accept file f return f is file f is directory
whether the given file is accepted by this filter
public string get description return all file formats
the description of this filter
public void focus gained focus event e old file name file name get text
invoked when a component gains the keyboard focus
public void set enabled boolean enabled currency box set editable enabled currency box set focusable enabled client settings disabled input controls focusable if enabled currency box set background color uimanager get text field inactive background
replace enabled setting with editable setting this allow tab swithing
public void focus lost focus event e if file name get text null file name get text trim equals bytes null old file name null download button set enabled false else if file name get text equals old file name read file file name get text
invoked when a component loses the keyboard focus
public jformatted text field get text field jspinner spinner jcomponent editor spinner get editor if editor instanceof jspinner default editor return jspinner default editor editor get text field else logger error this get class get name get text field unexpected editor type spinner get editor get class isn t a descendant of default editor null return null
return the formatted text field used by the editor or
public void add change listener change listener listener try spinner add change listener listener catch exception ex
adds a listener to the list that is notified each time a change
public void set edit button edit button edit button if this edit button null this edit button remove data controller this this edit button edit button if edit button null edit button add data controller this binded buttons add edit button
set edit button linked to grid
public void remove change listener change listener listener try spinner remove change listener listener catch exception ex
removes a code change listener code from this spinner
public void set reload button reload button reload button if this reload button null this reload button remove data controller this this reload button reload button if reload button null reload button add data controller this binded buttons add reload button
set reload button linked to grid
private void control focus gained focus event e if this instanceof date control maybe fire value changed event old value get value if client settings view background sel color is enabled get binding component set background client settings background sel color if client settings select data in editable form is enabled get binding component instanceof jtext component jtext component get binding component select 0 jtext component get binding component get text length
this method is called when the input control receives focus
private void control focus lost focus event e if client settings view background sel color is enabled get binding component set background default background color maybe fire value changed event
this method is called when the input control losts focus
public boolean accept file f return f get name to lower case ends with gif f get name to lower case ends with jpg f is directory
whether the given file is accepted by this filter
public void set value object value logger error this get class get name set value this method must be overridden in this get class get name null
set value to the input control
public string get description return jpeg gif image jpg gif
the description of this filter
public void set enabled boolean enabled sel button set enabled enabled
replace enabled setting with editable setting this allow tab swithing
private void add focus listener text box add focus listener new focus adapter public void focus lost focus event e if text box is enabled text box is editable set text text box get text
create a focus listener to correcly set the content of the control
public string get function id return
get function id
private void control focus gained focus event e old value get value if client settings view background sel color is enabled uimanager put check box background client settings background sel color uimanager put check box menu item selection background client settings background sel color repaint
this method is called when the input control receives focus
private void control focus lost focus event e if client settings view background sel color is enabled uimanager put check box background default background color uimanager put check box menu item selection background default background color repaint maybe fire value changed event
this method is called when the input control losts focus
public void set link label label control label this label label
link the input control label to the specified label
public dimension get preferred size if image null dimension dim new dimension image get width this 2 image get height this 2 if text null font metrics fm this get graphics get font metrics dim height fm get height 2 return dim else return new dimension 0 0
method automatically called by the jvm to fetch window dimensions
private void add focus listener text area add focus listener new focus adapter public void focus lost focus event e if text area is enabled text area is editable text area set text text area get text
create a focus listener to correcly set the content of the control
public void set enabled boolean enabled text area set editable enabled text area set focusable enabled client settings disabled input controls focusable if enabled text area set background color uimanager get text field background else text area set background color uimanager get text field inactive background
replace enabled setting with editable setting this allow tab swithing
public void set value object value text area set text string value
set value to the input control
public void set enabled boolean enabled num box set editable enabled num box set focusable enabled client settings disabled input controls focusable if enabled num box set background color uimanager get text field inactive background
replace enabled setting with editable setting this allow tab swithing
private void goto page if current page nr 0 result set controller null result set controller load page current page nr
reload grid starting from the specified page
public void set value string attribute name object value if form null form get vomodel set value attribute name value
method called by items controller to update parent v
public void set first row boolean is first record first button set enabled is first record prev pg button set enabled is first record prev button set enabled is first record control page nr set enabled true control page nr set enabled result set controller get total result set length 1
method called by grid component each time a row is selected
public void set last row boolean is last record last button set enabled is last record next button set enabled is last record next pg button set enabled is last record control page nr set enabled true control page nr set enabled result set controller get total result set length 1
method called by grid component each time a row is selected
public void focus gained focus event e if current date null refresh date select 0 date get text length if date has focus date request focus date set caret position 0
invoked when a component gains the keyboard focus
public void set value object value set date java util date value
set value to the input control
public void focus lost final focus event e if e get opposite component null e get opposite component equals window user has clicked onto the scrollpane swing utilities invoke later new runnable public void run window to front return window set visible false try if timer null timer interrupt catch exception ex
invoked when a component loses the keyboard focus
private void add focus listener if text box null text box add focus listener new focus adapter public void focus lost focus event e if text box is enabled text box is editable if text box get text null text box get text length 0 set text text box get text set text text box get text else set text text box get text
create a focus listener to correcly set the content of the control
public void add change listener change listener listener try change listeners add listener spinner add change listener listener catch exception ex
adds a listener to the list that is notified each time a change
public void remove change listener change listener listener try change listeners remove listener spinner remove change listener listener catch exception ex
removes a code change listener code from this spinner
public void set focus lost behavior int behavior try if text box null text box set focus lost behavior behavior catch exception ex
sets the behavior when focus is lost
public void invalid edit try if controller null super invalid edit else controller invalid edit catch exception ex
invoked when the user inputs an invalid value
public void set formatter jformatted text field abstract formatter format try if controller null if get formatter factory null super set formatter factory new default formatter factory format else super set formatter format else controller set formatter format catch exception ex
sets the current abstract formatter
public void item state changed item event e if e get state change e selected languages combo box get value null update language string languages combo box get value
method invoked when changing language from combo box
public boolean drag enabled sel row grid get selected row return true
method called on beginning a drag event
public boolean drop enabled string grid id boolean ok grid id equals filter grid panel this grid id if ok int new sel row grid get selected row value object vo grid get volist table model get object for row sel row grid get volist table model remove object at sel row grid get volist table model insert object at vo new sel row sel row 1 grid repaint return ok
method called on firing a drop event onto the grid
public void adjustment value changed adjustment event e cols scroll pane get horizontal scroll bar set value e get value
listen for horizontal scrolling in order to scroll cols table too
public void adjustment value changed adjustment event e rows scroll pane get vertical scroll bar set value e get value
listen for vertical scrolling in order to scroll rows table too
private string decode pattern string pattern if pattern length 0 return pattern string buffer aux new string buffer for int i 0 i pattern length i if pattern char at i i 1 pattern length pattern char at i 1 aux append i else aux append string value of pattern char at i if aux char at 0 aux char at aux length 1 return aux substring 1 aux length 1 return aux to string
search for patterns and replace them with
public void component moved component event e locate window
invoked when the components position changes
protected void show window internally window set visible true fire window event iconifable window listener window showed
this method shows the window
private void show tip label title set text client settings get instance get resources get resource tip panel content get titles index tip pane set text client settings get instance get resources get resource tip panel content get tips index
show tip text and title
private void set pivot table changed boolean pivot table changed this pivot table changed pivot table changed
set current state of pivot table changed flag
private boolean validate boolean ok true fire editing stopped return ok
perform the validation
public boolean is cell editable event object evt return true
this method should be overrided
public boolean should select cell event object evt return false
this method should be overrided
protected void fire editing stopped object listeners listener list get listener list for int i listeners length 2 i 0 i 2 if listeners i cell editor listener class cell editor listener listeners i 1 editing stopped new change event this
notify all listeners that have registered interest for notification on this event type
protected void fire editing canceled object listeners listener list get listener list for int i listeners length 2 i 0 i 2 if listeners i cell editor listener class cell editor listener listeners i 1 editing canceled new change event this
notify all listeners that have registered interest for notification on this event type
private boolean validate fire editing stopped if table null table request focus return true
perform the validation
private component prepare editor object value if value null value instanceof date field set date date value else field set date null return field
prepare the editor for a value
private void expand all int level 1 boolean contains children true while contains children contains children false for int i 0 i pivot table model get hroot get children count i contains children contains children set expansion state node pivot table model get hroot get children i true level level build pivot table level 0 contains children true while contains children contains children false for int i 0 i pivot table model get vroot get children count i contains children contains children set expansion state node pivot table model get vroot get children i true level build pivot table level
expand all row column fields
private boolean validate boolean ok true try field set value field get formatter string to value field get text catch parse exception ex ok false field set value null if field get text null field get value null ok false if ok field set text null fire editing stopped return ok
perform the validation
private void collapse all current expandable col fields clear current expandable row fields clear for int i 0 i pivot table model get hroot get children count i set expansion state node pivot table model get hroot get children i false 1 for int i 0 i pivot table model get vroot get children count i set expansion state node pivot table model get vroot get children i false 1 build pivot table
collapse all row column fields
private boolean validate boolean ok field validate input boolean ok true if ok fire editing stopped return ok
perform the validation
private component prepare editor object value if row 1 dynamic settings null if dynamic settings instanceof decimal column settings field set decimals decimal column settings dynamic settings get decimals row field set min value dynamic settings get min value row field set max value dynamic settings get max value row if value null value get class get superclass number class field set text number value to string if select data on edit field select 0 field get text length else field set text null return field
prepare the editor for a value
private boolean set expansion state node row generic node node boolean expanded int level node set node expanded expanded boolean contains children false if node get level level level 1 for int i 0 i node get children count i contains children contains children set expansion state node node get children i expanded level return contains children
collapse all row nodes
public int get selected column if table null return 1 else return table get selected column
returns the index of the first selected column
private void edit cell at final int row final int col index swing utilities invoke later new runnable public void run set row selection interval row row table get grid edit cell at row col index
method called by edit cell at public method
public void set value string attribute name object value if selected row 1 table get volist table model set value at value selected row table get column index attribute name
method called by lookup controller to update parent v
public void set value object value cod box set text value null null value to string
set value to the input control
public void add ancestor listener ancestor listener listener cod box add ancestor listener listener
registers code listener code so that it will receive
public void add focus listener focus listener l cod box add focus listener l
adds the specified focus listener to receive focus events from
public point get location on screen return cod box get location on screen
gets the location of this component in the form of a point
public int get height return cod box get height
returns the current height of this component
public int get width return cod box get width
returns the current width of this component
private boolean validate boolean ok string text string field get value if text null text ok field null text length max characters if ok fire editing stopped return ok
perform the validation
private boolean validate boolean ok if encrypt text ok field null field get text length max characters else ok passwd field get text length max characters if ok fire editing stopped return ok
perform the validation
private void drop focus from all forms try key listener ll application event queue get instance get key listeners for int i 0 i ll length i if ll i instanceof form shortcuts listener form shortcuts listener ll i get form drop focus from form catch exception ex1
remove global key listeners related to form panels
public color get background color int row string attribute name object value if delta row 0 delta color null row delta row 0 return delta color return client settings grid cell background
method used to define the background color for each cell of the grid
public color get foreground color int row string attribute name object value return client settings grid cell foreground
method used to define the foreground color for each cell of the grid
public void set delta color color delta color this delta color delta color
set the background cell color used when delta row 0
public void row changed int row number
callback method invoked when the user has selected another row
public void after reload grid
callback method invoked after data reloading on pressing reload cancel button
public boolean before copy grid grid control grid return true
callback method invoked on pressing copy button
public boolean before save data in edit grid control grid int row numbers array list old persistent objects array list persistent objects return true
callback method invoked on pressing save button before invoking update records method
public boolean before save data in insert grid control grid int row numbers array list persistent objects return true
callback method invoked on pressing save button before invoking insert records method
public boolean before edit grid grid control grid return true
callback method invoked on pressing edit button
public boolean before insert grid grid control grid return true
callback method invoked on pressing insert button
public object get initial quick filter value string attribute name object initial value return initial value
callback method invoked by grid before showing quick filter panel
public dimension get export dialog size dimension dialog size return dialog size
callback method invoked by grid before showing exporting dialog
public void export grid export options export options
callback method invoked by grid when exporting data from grid
public boolean drag enabled return true
method called on beginning a drag event
public boolean drop enabled string grid id return true
method called on firing a drop event onto the grid
public void set domain domain domain this domain domain domain table cell renderer renderer null spinner list cell editor editor null iterator it renderers values iterator while it has next renderer domain table cell renderer it next renderer set domain domain it editors values iterator while it has next editor spinner list cell editor it next editor set domain domain
set the domain
public void set hide button boolean hide button this hide button hide button
set button visibility
public void set edit button edit button edit button if this edit button null this edit button remove data controller this this edit button edit button if edit button null edit button add data controller this binded buttons add edit button edit button set enabled true
set edit button linked to grid
public void set enable cod box boolean enable cod box this enable cod box enable cod box
set if code field is editable
public void set lookup controller lookup controller lookup controller this lookup controller lookup controller
set lookup controller
public void set code padding boolean code padding this code padding code padding
set code padding related to max character property default false
public void set allow only numbers boolean allow only numbers this allow only numbers allow only numbers
allow numbers only in code field
public void set zero length as null boolean zero length as null this zero length as null zero length as null
set null value if code has zero length
public void set hide code box boolean hide code box this hide code box hide code box
used to hide the code box