input
stringlengths
10
828
output
stringlengths
5
107
public void take object message queue send message
enqueue the object for processing
public void inner run while true handle queue next message
loops taking a message from the queue and calling
public boolean equals object obj return this as milliseconds duration obj as milliseconds
determines whether two durations represent the same amount of time
public static interface input message extends annotated public object get contents
an object that represents an incoming message
public int compare to object obj return int this as milliseconds duration obj as milliseconds
compares two durations
public void add import string name because this affects only the default finder directly class syntaxes need to at least use a finder that shares the same list of imports see the class finder class finder base constructor default class finder add import name
adds an import in the default class finder
public string saxdriver class return saxdriver class
returns the class name of the sax parser that should be
public saxbuilder make saxbuilder string sax driver saxdriver class return sax driver null new xml xsaxbuilder new xml xsaxbuilder sax driver
constructs a jdom saxbuilder
public xmloutputter make pretty xmloutputter xmloutputter outputter new xmloutputter true outputter set line separator system get property line separator outputter set trim text true deprecated in beta 7 wrong anyway outputter set text normalize false return outputter format f format get pretty format f set indent f set text mode format text mode preserve f set line separator system get property line separator return new xmloutputter f
constructs a jdom xmloutputter that outputs a jdom document
public void message received input message message thread take message
enqueues a message for later processing by the
protected void handle message input message message inner listener message received message
called in this buffered message listeners thread to process
public static interface connection public object get destination public void send object contents public object receive public void close
an object that can send and receive
public static interface destination table public object get object destination public object put object destination object data
a mapping from destination names to the data needed to establish
public boolean is editor return true
returns true if this frame allows editing and false
public boolean is viewer return is editor
returns the negation of the value returned by
protected list get constraint syntax list final ltf parser ltfp new ltf parser list parsers ltfp get constraint parsers get cases return list collect map new linked list parsers new function1 public object funcall object arg ltf parser constraint parser parser ltf parser constraint parser arg return parser make template
returns a list of constraint objects that represent the
protected list get enumeration values class c if get class descr c is enumeration return list fn apply static c values new object else throw new illegal argument exception c is not an enumeration
returns a list of the allowed values of an enumeration class
public void startup util swing and wait new runnable public void run frame new xmltree edit frame xmltree editor this display name frame set visible true string resource parameters get parameter document if resource null document doc xml read document resource frame edit document doc
completes setup and initialization
public xmltranslator get xmltranslator return xmlt
returns the xmltranslator that is used by the save object method
public void set xmltranslator xmltranslator xmlt this xmlt xmlt
sets the xmltranslator that is used by this xmlsaver
public sorted map read all objects class desired class string directory name file files get files desired class directory name sorted map result new tree map for int i 0 i files length i object obj read object desired class files i get path result put files i obj return result
returns a sorted map from the files in a specified directory
private void check context see also opt expects context context from opt current option get expected context context current context get context if from opt current debug warn the current option current option is for from opt but the current context is current
called to check that the current context is the right
protected file choose file to write if file chooser null file chooser make file chooser int option file chooser show save dialog frame if option jfile chooser approve option return file chooser get selected file else return null
asks the user to choose a file
public jfile chooser make file chooser jfile chooser chooser new jfile chooser lib dir file syntax manager fsm xml file syntax manager set extensions new tree set for iterator i fsm get all syntaxes iterator i has next file syntax syntax file syntax i next if fsm can write syntax output object class extensions add all syntax get file types chooser add choosable file filter new syntax file filter syntax syntax file filter class filter new syntax file filter output object class extensions chooser set file filter class filter return chooser
constructs a suitable file chooser for this xmlsavers
public object load object loop until either the data has successfully been read from a file or else the user has decided to cancel rather than try a nother file while true ask user to select a file file file choose file to read if file null return null user cancels try object obj read object from file return obj success catch throwable t debug display exception t now round the loop again
reads an object from a file selected by the user conducting
protected object read object from file file throws ioexception debug noteln xmlloader reading object from file return xml read object desired result class file to url
converts the contents of the specified file to an object
public document load document loop until either the data has successfully been read from a file or else the user has decided to cancel rather than try a nother file while true ask user to select a file file file choose file to read if file null return null user cancels try document doc read document from file return doc success catch throwable t debug display exception t now round the loop again
reads a jdom document from a file selected by the user conducting
protected document read document from file file throws ioexception debug noteln xmlloader reading document from file file syntax manager fsm xml file syntax manager file syntax syntax fsm get syntax file debug noteln using syntax syntax if syntax fsm get syntax for type xml if it s xml syntax assume we can parse the file ourself return xml parse xml file else read as object then convert to document object obj read object from file return xmlt object to document obj
converts the contents of the specified file to a jdom document
protected file choose file to read if file chooser null file chooser make file chooser int option file chooser show open dialog frame if option jfile chooser approve option return file chooser get selected file else return null
asks the user to choose a file
public jfile chooser make file chooser debug noteln library directory lib dir jfile chooser chooser new jfile chooser lib dir file syntax manager fsm xml file syntax manager set extensions new tree set for iterator i fsm get all syntaxes iterator i has next file syntax syntax file syntax i next if fsm can read syntax desired result class extensions add all syntax get file types chooser add choosable file filter new syntax file filter syntax syntax file filter class filter new syntax file filter desired result class extensions chooser set file filter class filter return chooser
constructs a suitable file chooser for this xmlloaders
public element get type definition string type name for iterator i get children iterator i has next element child element i next if child get name ends with type child get attribute value name equals type name return child return null
finds a definition in the existing top level content
public void startup frame new chat frame this display name frame set visible true
completes i chat setup and initialization
public void handle new chat message chat message message frame new message message
handles new chat messages
protected jmenu bar make menu bar jmenu bar bar new jmenu bar jmenu file menu new jmenu file bar add file menu if agent instanceof ichat standalone i chat file menu add ifutil make menu item exit this else part of another agent file menu add ifutil make menu item close this make style menu style menu new jmenu style bar add style menu style menu add ifutil make menu item message color this maybe should have edit preferences return bar
creates the menu bar
public void set omit impl attributes boolean v omit impl attributes v
controlls whether or not code impl class code attributes
public namespace get home namespace return home namespace
returns the home namespace used by this xmltranslator
protected element ns element string name return new element name home namespace
utility that creates an element in the home namespace
public void set require namespace boolean v require namespace v
controls whether element names must be in the home namespace
public void add menu jmenu menu frame get jmenu bar add menu
adds a menu to the menu bar
public void add tab string name component component tabbed pane add name component frame pack
adds a new tab and corresponding component
public boolean subsumes capability required return required instanceof verb capability verb capability required verb equals verb
returns true iff the required capability is a verb capability
protected jmenu bar make menu bar jmenu bar bar new jmenu bar jmenu file menu new jmenu file bar add file menu file menu add ifutil make menu item close this return bar
creates the menu bar
public void add agent string name add agent name agent relationship contact
adds the agent as a contact
public collection get base population return collect ensure list contact manager get agent data rel
returns the collection of agent data objects from which this
public void add agent string name agent relationship rel debug expect get agent data name null adding agent twice name agent data data new agent data name rel agent data add data rel map add value rel data fire new contact data
adds the agent recording it as having the specified
public void add agents list names agent relationship rel for iterator i names iterator i has next add agent string i next rel
adds the agents by calling
public void note agent string name note agent name agent relationship contact
record the agent as a contact if it is not already known
public void set selected value object item agent relationship r agent relationship item set selected item strings capitalize r to string
the item must be a
public void note agent string name agent relationship assumed rel agent data data get agent data name if data null add agent name assumed rel
record the agent as having the specified relationship to
public collection get base population return contact manager get agent data
returns the collection of agent data objects from which this
public boolean is member object item return true
a test that is applied to members of the base population to
public boolean ensure agent string name agent relationship rel agent data known get agent data name if known null add agent name rel else change relationship name rel return known null
ensures that the agent is recorded as having the specified
public collection get known members return collect filter get base population new predicate1 public boolean true of object item return is member item
returns the collection obtained by using the is member method
public string object to xmlstring object obj return document to xmlstring object to document obj
converts an object to a string of xml
public void action performed action event e string command e get action command debug noteln xmltree edit panel action command if command equals add child add child else if command equals copy subtree copy subtree else if command equals cut subtree cut subtree else if e get source submit button command text varies edit text submit else throw new consistency exception nothing to do for command
action interpreter for panel buttons
public void add child editor tree tree most recently selected tree if tree null complain no selected tree return tnode selected tree get selected node tnode new node new tnode blank default tree model model default tree model tree get model model insert node into new node selected selected get child count tree scroll path to visible new node get tree path
adds a new node after the existing children of the selected
public void copy subtree editor tree tree most recently selected tree if tree null complain no selected tree return tnode selected tree get selected node new cut frame selected copy subtree copy
copy the subtree below and including the currently selected node
public void cut subtree editor tree tree most recently selected tree if tree null complain no selected tree return tnode selected tnode tree get selected node if tree cut node subtree selected new cut frame selected cut
cut the subtree below and including the currently selected node
public element get last examined element return last examined element
returns the jdom element most recently examined by the
public void value changed tree selection event e editor tree source editor tree e get source tnode node tnode source get last selected path component if node null return debug noteln source get name selection node get tree path set selected tree source edit text display node
required by the tree selection listener interface
public object object from element element elt last examined element elt string class name elt get name if class name equals null irritating special case return null class c class syntax class for external name class name if c null throw new xmlexception cannot find class class name else return object from element c elt
converts a jdom element to an object
public void action performed action event e string command e get action command debug noteln cut frame action command if command equals discard subtree node null finished return destination tree most recently selected tree if destination tree null complain no selected tree return destination model default tree model destination tree get model tnode selected destination tree get selected node if command equals as insert as selected else if command equals before insert before selected else if command equals after insert after selected else if command equals child insert under selected else throw new consistency exception nothing to do for command
action interpreter for cut frame buttons
protected object make instance class c try return c new instance catch exception e debug note exception e throw new xmlexception cannot make 0 arg instance of c e
makes an instance of a class using the 0 argument constructor
public void set focus unicode set focus
passing the focus request to the viewers control
protected void close action action listener action listener new action listener public void action performed action event action event set visible false key stroke stroke key stroke get key stroke key event vk escape 0 get root pane register keyboard action action listener stroke jcomponent when in focused window
this method registers a listener to the esc key that closes the implementing
public void add criterion search criterion search criterion search criterion set parent criteria this criteria put search criterion get field name search criterion
adds a criterion to the criteria list
public search criterion get criterion for key string key return criteria get key
returns the search criterion object for the given filter name
public void clear criteria clear calparameters clear objparameters clear parameter index 0
resets all previously defined filters
public text field get text field if text field null gen end 36 getter 0 36 pre init write pre init user code here text field new text field received message null 32 text field any gen line 36 getter 1 36 post init write post init user code here gen begin 36 getter 2 return text field
returns an initiliazed instance of text field component
protected void analyse image we work always on a copy if temp image null current image tools copy image temp image vision settings webcam image width vision settings webcam image height r list new filtered region list new simple raster current image new filter empty square region criteria r list split in regions vision square list new vision square list r list vision square list colorize all get content pane repaint
method which is called when we pressed the button
protected float rectangular shape form proportion public float get rectangular shape form proportion return rectangular shape form proportion
the value must be between 0 and 1
protected float low empty proportion area public float get low empty proportion area return low empty proportion area
the value must be between 0 and 1
public boolean can short castle return short castle
return if the king can short castle
public boolean can long castle return long castle
return if the king can long castle
protected writable raster raster public writable raster get raster return raster
the corresponding raster
protected buffered image buff img public buffered image get image return buff img
the buffered image which is transformed
protected filter region criteria filter region criteria public filter region criteria get filter region criteria return filter region criteria
the criteria to filter
protected simple raster simple raster public simple raster get simple raster return simple raster
the reference to the simple raster
protected side side public side get side return side
the side corresponding to this piece
protected schema model get schema model return new schema model get schema classes
get schema model
protected string get database name return get class get simple name
get database name
protected file export xml sidekar database db string name throws ioexception ji bxexception file temp file file create temp file export this tempdir file output stream out new file output stream temp file xmlexporter export database out db name false out close return temp file
export database to a temporary file and return that file
protected void compare xml string expected file actual throws ioexception ji bxexception xml pull parser exception input stream expected input get class get resource as stream expected if expected input null throw new runtime exception can t find resource expected file input stream actual input new file input stream actual compare xml expected input actual input expected actual to string
compare an xml file with a classpath resource
protected environment config get environment config environment config config new environment config config set allow create true config set transactional true return config
get configuration for the
public schema model get expected schema return this expected
get the expected schema
public schema model get actual schema return this actual
get the actual schema
public r case reference field model reference field model field return case simple field model field
this implementation delegates to
public r case set field model set field model field return case collection field model field
this implementation delegates to
public r case map field model map field model field return case complex field model field
this implementation delegates to
public r case list field model list field model field return case collection field model field
this implementation delegates to
public r case string field model string field model field return case atomic field model field
this implementation delegates to
public r case date field model date field model field return case atomic field model field
this implementation delegates to
public r case big integer field model big integer field model field return case atomic field model field
this implementation delegates to
public void clear this get name map clear this get class map clear
reset this instance so that it contains no entity models
public r case array field model array field model field return case simple field model field
this implementation delegates to
public void validate for entity model entity model get name map values try entity model validate schema model this catch illegal argument exception e throw new illegal argument exception invalid entity model e get message e
validate this schema
public r case boolean field model boolean field model field return case atomic field model field
this implementation delegates to
public void print print stream ps ps println schema for iterator entity model i iterate entity models i has next i next print ps ps println
print a description of this schema
public r case byte field model byte field model field return case atomic field model field
this implementation delegates to
public void check same schema final schema model that check pair run with checks new runnable public void run do check same schema that
determine if the given type has the same in database structure