input
stringlengths
10
828
output
stringlengths
5
107
public boolean is idle return get type equals coding get type equals unitize get type equals uqc get type equals qc get type equals qa get type equals listing get type equals tally
is the currently selected node neither queued nor assigned
public void remove update document event e check ok enabled
gives notification that a portion of the document has been
public void changed update document event e check ok enabled
gives notification that an attribute or set of attributes changed
public boolean is label return get type equals coding label get type equals volume label get type equals unitize label get type equals uqc label get type equals qc label get type equals qa label get type equals masking label get type equals modifyerrors label get type equals listing label get type equals tally label
is the currently selected node a label
public void discard all edits log print lundo controller discard all edits manager discard all edits undo action set enabled false redo action set enabled false
clear the undo buffer of edits
public void die log print lundo controller die manager get undo presentation name manager die
remove the last edit from the undo queue
public boolean is unitize return get type equals unitize get type equals unitize queued get type equals unitize label get type equals unitize assigned
is the currently selected node a unitize batch
public boolean is uqc return get type equals uqc get type equals uqc queued get type equals uqc label get type equals uqc assigned
is the currently selected node a unitize batch in qc
public void drag enter drag source drag event e drag source context context e get drag source context intersection of the users selected action and the source and target actions int myaction e get drop action if myaction dn dconstants action copy 0 context set cursor drag source default copy drop else context set cursor drag source default copy no drop
drag source listener interface method
public boolean is coding return get type equals coding queued get type equals coding get type equals coding label get type equals coding assigned
is the currently selected node a coding batch
public boolean is qc return get type equals qc queued get type equals qc get type equals qc label get type equals qc assigned
is the currently selected node a coding batch in qc
private boolean is fields name exists set string field name set project admin page parent get project fields names if old name null field name set remove old name return field name set add field name get text else return field name set add field name get text
check whether field is already present in the project
public boolean is qa return get type equals qa queued get type equals qa get type equals qa label get type equals qa assigned
is the currently selected node a batch in qa
public date select date date calendar set time date int day calendar get calendar date int month calendar get calendar month int year calendar get calendar year year set selected index year first year month set selected index month calendar january set selected day ok clicked false show if ok clicked return null calendar clear calendar set time zone zone calendar set calendar date get selected day calendar set calendar month month get selected index calendar january calendar set calendar year year get selected index first year return calendar get time
selects a date
public void drop drop target drop event e e reject drop
drop is not allowed on batch nodes so just reject it
public void drag over drop target drag event e e reject drag
drag and drop is not allowed on batch nodes so reject a drag
private void get issue data entry result set query result try if query result next text set text query result get string 1 original text text get text catch sqlexception e log quit e
retrieve pageissue from server
public string get type level if is unitize return unitize else if is uqc return uqc else if is coding return coding else if is qc return codingqc else if is qa return qa return
return the get type that corresponds to the users table role
public list selection model get selection model return null
not currently used
protected void ok set enabled boolean flag ok button set enabled flag ok button set selected flag
enable or disable the code ok button code
private void get edit coding manual data if project id 0 final client task task log print add edit users get user data users id task new task execute query select project name from project integer to string project id task set callback new runnable public void run get user by id data entry result set task get result set ok disabled again it was enabled by get user by data entry when combo selection set ok button set enabled true boolean ok task enqueue this ok button set enabled true add controls
get the data for the manual coding for the project
private void get user by id data entry result set query result try updating a user existing file name set text file name change file name set text ok button set enabled true enable admin priv catch exception e log quit e
called when manual data is found from the server
public boolean is droppable return get type equals team get type equals user
if the node type is one that can be dropped upon return true
public void drag exit drop target event dsde
drag source listener interface method
public boolean is transferable if global the server connection get permission admin batch user does not have privilege to manage batches log print users tree node is transferable permission denied return false log print users tree node is transferable get type return get type equals coding queued get type equals unitize queued get type equals uqc queued get type equals qc queued get type equals qa queued get type equals masking get type equals masking queued
test type to see if it is the transferable node types
public boolean is data flavor supported data flavor flavor return user flavor flavor is batch
returns whether or not the specified data flavor is supported
private void check ok enable string new doc change file name get text trim if the document or file is entered then make ok button enabled else disabled if new doc length 0 ok button set enabled false else ok button set enabled true
make the ok button enabled or disabled
public void value changed tree selection event tse
tree selection listener interface method
private void test fields length string desc string if desc string description get text length field length description set text desc string substring 0 field length if desc string specific question get text length field length description set text desc string substring 0 field length
check the length of the description
public void drop drop target drop event e log print dynamic tree drop
drop target listener interface method what happens when drag is released
public void set enabled boolean flag log print ltext button set enabled flag textfield set editable flag button set enabled flag textfield set foreground color black if flag textfield set background color white else textfield set background null
set all components on this panel to enabled flag and
public void set background color c if textfield null textfield set background c
set the background color of the text field on this panel
public void mouse dragged mouse event e the user is dragging so scroll log print dynamic tree mml mouse dragged rectangle r new rectangle e get x e get y 1 1 scroll rect to visible r
invoked when a mouse button is pressed on a component and then
public component get first component container focus cycle root component result super get first component focus cycle root if result instanceof jcheck box result super get component after focus cycle root result return result
returns the first component in the traversal cycle
public void set foreground color c if textfield null textfield set foreground c
set the foreground text color of the text field on this panel
protected int get column width if l column width 0 font metrics metrics get font metrics get font l column width metrics char width w return l column width
gets the column width
public dimension get preferred size note super synchronizes on get tree lock shouldn t matter since we only mess with this on the event thread dimension size textfield get preferred size int columns textfield get columns 22 22 textfield get columns if columns 0 size width 6 columns get column width return size
returns the preferred size dimensions needed for this
public void handle event event evt
this method is called whenever an event occurs of the type for which
public void set value int user id this user id user id
set user id
private void ok button action performed action event evt set visible false
make the form visible
public void strip leading space string text get text while text starts with text text substring 1 set text text
remove all leading spaces from code text field code
protected void tab selected project model project model new sqlmanaged combo model get team leaders project model register listing user select box set model project model data new populate data
on clicking the current listing tab
private int dof10 key event evt if child id 0 child id coding data f6 child id add edit query query dialog query dialog new add edit query this project map field name bates number image path which status child id batch id query dialog set modal true query dialog show return 0
for f10 query tracker
public void set check box jcheck box check box this check box check box
set the jcheck box used in qc and qa
public dimension get preferred size return get preferred size get columns
returns the preferred size dimensions needed for this
protected dimension get preferred size int columns dimension size super get preferred size if this get parent instanceof beans ltext button columns 22 columns 22 if columns 0 size width 6 columns get column width return size
calculate size for specified number of columns
private void check mask string mask string valid chars string invalid chars if mask equals valid chars equals invalid chars equals return try if mask equals if no mask given fill with to indicate any character is allowed mask mf new javax swing text mask formatter mask if valid chars equals valid chars valid chars mf set valid characters valid chars if invalid chars equals invalid chars invalid chars mf set invalid characters invalid chars mf set allows invalid false catch throwable t com lexpar util log quit t
set the format of masked textfield so the user input can be checked
private void check ok enabled if the table name is not blank and type and project is selected then enable the ok button if table name get text trim equals changed here type combo get selected index 1 project combo get selected index 1 ok button set enabled true else ok button set enabled false
enable the ok button
protected int get column width if l column width 0 java awt font metrics metrics get font metrics get font l column width metrics char width n return l column width
gets the column width
final public boolean should yield focus jcomponent input according to the documentation should yield focus is allowed to cause side effects so temporarily remove the input verifier on the text field input set input verifier null log write removed input verifier this get class call the real should yield focus boolean result this l should yield focus input reinstall the input verifier input set input verifier this log write reinstalled input verifier return the result form the real should yield focus return result
calls code verify input code to ensure that the input is valid
public boolean l should yield focus jcomponent input return this verify input
must be overridden in the subclasses this calls code verify input code
public void get to model entry result set rs result set table model model new result set table model rs log print compose dialog get to model entry model get row count to set project model model
entry point method to receive and format the recipient list data
protected string check text string str int offs return str
this method may be overridden to provide checking and modification
public boolean get status return send status
let the caller know whether anything was sent
protected void remove value string text if get value model null int i get value model index of object text if i 1 get value model remove element at i
remove the row matching the given text
protected void remove values int rows string text default list model model new default list model default list model model get value model get the values not matching row for int i rows length 1 i 1 i model remove rows i value list set model model
remove the rows provided in the parameter from the selected values list
public void set model model sorted list model model choice list set model model
set the list model used for the choice panel
public sorted list model get model return sorted list model choice list get model
return the list model used for the choice panel
public default list model get value model if value list get model null return null log print ibase popup get value model class value list get model return default list model value list get model
return the list model used for the value panel
public list selection model get choice selection model return choice list get selection model
return the list selection model used for the choice panel
public void set values from string string str int j default list model model new default list model string items str split log print ibase popup set values from string new model items length str int row 1 for int i 0 i items length i if items i trim length 0 for j 0 j model get size j if string model get element at j compare to ignore case items i trim 0 no dups allowed break if j model get size model add element items i trim value list set model model
set the list model for the value panel from the given string
public void set selection interval int first int last choice list set selection interval first last if first last choice list ensure index is visible last choice list ensure index is visible first
select the rows embraced by code first code and code last code
protected void clear selection value list get selection model clear selection
remove all selection from the list
public string get current mask return current mask
return the current mask for use in field mapper
private void get validation data if field id 0 scope equals field final client task task field validation data field validation data get field validation data true task new task edit advance validations field validation data task set callback new runnable public void run results java sql result set task get result set data in text fields results ok button set enabled true boolean ok task enqueue this
get existing details of the selected function to be updated
public void add mutable tree node node throw new unsupported operation exception
not implemented code batching page code uses code dynamic tree
public boolean is assigned return get type equals unitize assigned get type equals uqc assigned get type equals coding assigned get type equals qc assigned get type equals qa assigned get type equals listing qc assign get type equals masking assigned get type equals modifyerrors assigned
is the currently selected node a batch that is assigned to a user
public boolean is idle return get type equals unitize get type equals uqc get type equals coding get type equals qc get type equals qa get type equals listing qc get type equals masking get type equals modifyerrors
is the currently selected node a batch that is queued or assigned
private void set type ui component string type if null type type equals output format format radio button set selected true validation radio button set enabled false error type panel set visible false else validation radio button set selected true format radio button set enabled false error type panel set visible true if null type type trim equals error type combo box set selected item type else error type combo box set selected item input validation
set the type ui component from the field type
public boolean is label return get type equals unitize label get type equals uqc label get type equals coding label get type equals qc label get type equals qa label get type equals masking label get type equals modifyerrors label
is the currently selected node a label
public boolean is uqc return get type equals uqc get type equals uqc queued get type equals uqc label get type equals uqc assigned get type equals unitize complete
does the currently selected node have a uqc status
public boolean is new unitize return get type equals unitize
is the currently selected node an idle batch with unitize status
private void close button action performed java awt event action event evt set visible false dispose
closes the dialog
public boolean is unitize complete return get type equals unitize complete
is the currently selected node a unitize batch that has finished uqc
public boolean is unitize return get type equals unitize get type equals unitize batched get type equals unitize queued get type equals unitize label get type equals unitize assigned
is the currently selected node associated with a unitize batch
public boolean is coding return get type equals coding get type equals coding queued get type equals coding label get type equals coding assigned
is the currently selected node associated with a coding batch
private void load tablespec data final string action final client task task log print add edit tablespec load tablespec data id tablespec id task new task execute query tablespec select integer to string tablespec id task set callback new runnable public void run result set results result set task get result if results null log print result not null load tablespec data entry results action else log print tables null resultset returned boolean ok task enqueue this
fill the table with table spec data
private void get team by id data entry result set query result try if query result next team name set text query result get string 1 leader combo set selected index leader model index of query result get int 2 catch sqlexception e log quit e
load the users data
private void check fields check field length if error message get text is empty method body get text is empty ok button set enabled false else ok button set enabled true
enable the ok button when all required field is filled up
private void load tablevalue final client task task string table select the table on the basis of type of the field if the field type is name the table should be codd name code else the table will be code namevalue code if type equals name table namevalue else table value task new task request tablevalue sweep table tablespec id task set callback new runnable public void run result set results result set task get result if results null load tablevalue entry results else log print tablevalues null resultset returned boolean ok task enqueue this
load the table values
public boolean is qc return get type equals qc get type equals qc queued get type equals qc label get type equals qc assigned get type equals qc complete
is the currently selected node associated with a qc batch
public boolean l should yield focus jcomponent input if verify input return true log print date verifier should yield focus verify returned false toolkit get default toolkit beep log print beep date verifier joption pane show message dialog input not a valid date error joption pane error message return false
calls code verify code to ensure that the input is valid
private boolean save int id leader model get selected id if id 0 no leader for this team id 0 final client task task new task send teams teams id id team name get text task enqueue this return true
save the team name
private void check field length string value if value function name get text length 50 function name set text value substring 0 49 if value description get text length field length description set text value substring 0 field length if value error message get text length field length error message set text value substring 0 field length
check the field length
private void form window closing java awt event window event evt parent set buttons enabled true
on closing this form enable the parent window
protected string check text string str int offs return str to upper case
convert inserted text to upper case
private boolean save if check all fields return false if is proper function return false if mode equals add add else edit return true
saving the changes made in the selected functions
public boolean is qa return get type equals qa get type equals qa queued get type equals qa label get type equals qa assigned get type equals qa complete get type equals qa error
is the currently selected node associated with a qa batch
public void add jcomponent widget log print select dialog add widget int component count select panel get component count select panel add box create vertical strut 20 component count 1 select panel add widget component count
to be called from within the subclass to add the actual controls
protected void ok set enabled boolean flag ok button set enabled flag ok button set selected flag ok button set default capable flag get root pane set default button ok button
enable or disable the ok button
protected void check ok enabled boolean is ok is selection available ok button set enabled is ok ok button set selected is ok ok button set default capable is ok get root pane set default button ok button
if the user has entered selectable data enable the ok button
protected boolean is selection available object the selection get selection return the selection null
may be overridden with more efficient version if desired
public string get text if context text area null return context text area get text return null
obtain the possibly updated text
public void set border int top int left int bottom int right select panel set border border factory create empty border top left bottom right
creates an empty border on all sides of select panel
public boolean user canceled return canceled
determine if the user canceled the spelling check
public void delete text int num chars throws no such element exception delete the text in the text area because both selection start and selection end are constrained so selection start selection end we have to set selection start 2x to ensure it takes text area set selection start cursor text area set selection end cursor num chars text area set selection start cursor text area replace selection super delete text num chars
delete a specified number of characters from the text starting at
public void highlight word if has more elements string word get word following commented because it causes double cursor caret on screen nlm text area request focus selection start and selection end are constrained so selection start selection end so selection start must be set 2x to ensure it gets set to what we want text area set selection start cursor text area set selection end cursor word length text area set selection start cursor
highlight the current word in the text area
public void insert text int pos string new text super insert text pos new text text area insert new text pos
insert text at a specified position
public void replace word string new word throws no such element exception update the text area first string old word get word replace the old with the new because selection start and selection end are constrained so selection start selection end we have to set selection start 2x to ensure it takes text area set selection start cursor text area set selection end cursor old word length text area set selection start cursor text area replace selection new word super replace word new word
replace the word at the current position with a new word
public void update text the string set length 0 the string append text area get text cursor 0 sub word length 0
report that the contents of the text area have changed