input
stringlengths
10
828
output
stringlengths
5
107
public void add rendering hints map rendering hints key object hints this rendering hints put all hints
add new rendering hints to the currently active rendering hints
public double get shear x double value get value type shear x return value
get the shear x value as set by
public double get shear y double value get value type shear y return value
get the shear y value as set by
public affine transform get preferred transform dimension size jxlayer extends jcomponent layer return this transform model get preferred transform size layer
get a preferred
public boolean is mirror boolean value get value type mirror return value
get the mirror property
public boolean is preserve aspect ratio boolean value get value type preserve aspect ratio return value
get the preserve aspect ratio value
public boolean is scale to preferred size boolean value get value type scale to preferred size return value
get the scale to preferred size value
public void set rendering hints map rendering hints key object hints this rendering hints clear if hints null this rendering hints put all hints
replace the currently active rendering hints with new hints
public void set mirror boolean new value set value type mirror new value
set the mirror property
public void set scale double new value throws illegal argument exception if new value 0 0 throw new illegal argument exception preferred scale can not be set to 0 set value type preferred scale new value
set a scale
public void set preserve aspect ratio boolean new value set value type preserve aspect ratio new value
set preserve aspect ratio
public void set quadrant rotation int new value set value type quadrant rotation new value
set the rotation in quadrants
public void set rotation double new value set value type rotation new value
set the rotation in radians
public void set scale to preferred size boolean new value set value type scale to preferred size new value
set scale to preferred size
public void set shear x double new value set value type shear x new value
set the shear x value
public void set shear y double new value set value type shear y new value
set the shear y value
protected void fire change event object old value object new value if old value equals new value change event event new change event this for change listener listener listeners key set listener state changed event
if old value
private void set value type type object new value object old value values type ordinal values type ordinal new value fire change event old value new value
set a value and fire a property change
private color get background color jxlayer extends jcomponent layer container color provider layer get view null layer layer get view while color provider null color provider is opaque color provider color provider get parent return color provider null system color desktop color provider get background
get the most suitable background color
private affine transform transform no scale double center x double center y affine transform at new affine transform at translate center x center y at rotate get rotation at quadrant rotate get quadrant rotation at shear get shear x get shear y at translate center x center y return at
apply the prescribed transformations excluding the scale
public jsonarray put int index collection object value throws jsonexception put index new jsonarray value return this
put a value in the jsonarray where the value will be a
public repaint manager get delegate manager return delegate
get the delegate
public void gd open double w double h open true
requests a new device of the specified size
public void gd activate active true
the device became active current
public void gd circle double x double y double r if c null return c add new gdcircle x y r
draw a circle
public void gd clip double x0 double x1 double y0 double y1 if c null return c add new gdclip x0 y0 x1 y1
clip drawing to the specified region
public void gd close if c null c close display open false
close the display
public void gd deactivate active false
the device became inactive i
public void window closing window event e if c null execute dev off
listener response to close effectively invokes code dev
public void gd hold
unimplemented this call is now obsolete in r
public void gd line double x1 double y1 double x2 double y2 if c null return c add new gdline x1 y1 x2 y2
draw a line
public void gd mode int mode if c null c sync display mode 0
r signalled a mode change
public void gd new page if c null c reset
create a new blank page old api not used anymore
public double gd str width string str double width 8 str length rough estimate if c null if canvas is active we can do better graphics g c get graphics if g null font f c get gstate f if f null font metrics fm g get font metrics f if fm null width fm string width str return width
retrieve width of the given text when drawn in the current font
public void set names string nam names new vector string nam length int i 0 while i nam length names add element nam i
replace the names vector do not use directly
public rexp at string name if names null return null int i 0 for enumeration string e names elements e has more elements string n e next element if n equals name return rexp element at i i return null
return contents by name or code null code if not found
public void gdc set color int cc if c null return c add new gdcolor cc
set drawing color
public void gdc set line double lwd int lty if c null return c add new gdline par lwd lty
set line width and type
public void gdc set font double cex double ps double lineheight int fontface string fontfamily if c null return gdfont f new gdfont cex ps lineheight fontface fontfamily c add f c get gstate f f get font
set current font
public int get device number return c null dev nr c get device number
returns the device number
public string at int i if i 0 i id size return null int j id element at i int value due to the index shift na int min will turn into int max if base is 1 return j 0 j 2147483640 null val element at j
returns name for a specific id
public int size return id size
returns the number of caes
public long rni cons long head long tail return rni cons head tail 0 false
rni create a dotted pair list listsxp
public rexp parse and eval string text rexp where boolean resolve throws rengine exception rexpmismatch exception rexp p parse text false return eval p where resolve
convenince method equivalent to code eval parse text false where resolve code
public boolean close return false
performs a close operation on engines that support it
public boolean supports references return false
check whether this engine supports references to r objects
public long rni lcons long head long tail return rni cons head tail 0 true
rni create a dotted pair language list langsxp
public boolean supports environments return false
check whether this engine supports handing of environments if not
public boolean supports repl return false
check whether this engine supports repl read evaluate print loop and corresponding callbacks
public boolean supports locking return false
check whether this engine supports locking
public void assign string symbol double d throws rengine exception try assign symbol new rexpdouble d null catch rexpmismatch exception e throw new rengine exception this rexpmismatch exception in assign double e
convenience method equivalent to code assign symbol new rexpdouble d null code see
public void assign string symbol int d throws rengine exception try assign symbol new rexpinteger d null catch rexpmismatch exception e throw new rengine exception this rexpmismatch exception in assign int e
convenience method equivalent to code assign symbol new rexpinteger d null code see
public void add main loop callbacks rmain loop callbacks c we don t really add we just replace so far callback c
add a handler for r callbacks
public void assign string symbol string d throws rengine exception try assign symbol new rexpstring d null catch rexpmismatch exception e throw new rengine exception this rexpmismatch exception in assign string e
convenience method equivalent to code assign symbol new rexpstring d null code see
public void assign string symbol byte d throws rengine exception try assign symbol new rexpraw d null catch rexpmismatch exception e throw new rengine exception this rexpmismatch exception in assign byte e
convenience method equivalent to code assign symbol new rexpraw d null code see
public void assign string symbol rexp value throws rengine exception rexpmismatch exception assign symbol value null
convenience method equivalent to code assign symbol value null code see
public rexp get string name boolean resolve throws rengine exception try return eng get name this resolve catch rexpmismatch exception e this should never happen because this is always guaranteed to be rexpenv throw new rengine exception eng rexpmismatch exception e in get
get a value from this environment
public rexp get string name throws rengine exception return get name true
get a value from this environment equavalent to code get name true code
public rexp parent boolean resolve throws rengine exception try return eng get parent environment this resolve catch rexpmismatch exception e this should never happen because this is always guaranteed to be rexpenv throw new rengine exception eng rexpmismatch exception e in parent
returns the parent environment or a reference to it
public void jri write console string text int o type if callback null callback r write console this text o type
jri r write console call back from r
public rpacket request int cmd string par try byte b par get bytes rconnection transfer charset int sl b length 1 if sl 3 0 sl sl 0xfffffc 4 make sure the length is divisible by 4 byte rq new byte sl 5 int i for i 0 i b length i rq i 4 b i while i sl pad with 0 rq i 4 0 i set hdr dt string sl rq 0 return request cmd rq catch exception e e print stack trace return null
sends a request with one string parameter attached
public rpacket request int cmd int par try byte rq new byte 8 set int par rq 4 set hdr dt int 4 rq 0 return request cmd rq catch exception e return null
sends a request with one string parameter attached
public void jri busy int which if callback null callback r busy this which
jri r busy call back from r
public void jri show message string message if callback null callback r show message this message
jri r show message call back from r
public rexp eval string cmd throws rserve exception if connected rt null throw new rserve exception this not connected rpacket rp rt request rtalk cmd eval cmd n if rp null rp is ok return parse eval response rp throw new rserve exception this eval failed rp
evaluates the given command and retrieves the result
public void jri load history string filename if callback null callback r load history this filename
jri r loadhistory call back from r
public void set key at int i string value if i 0 return if names null names new vector object if names size size names set size size if i size names set i value
set key at the given index
public void jri save history string filename if callback null callback r save history this filename
jri r savehistory call back from r
public string jri choose file int new file if callback null return callback r choose file this new file return null
jri r choose file call back from r
public void jri flush console if callback null callback r flush console this
jri r flush console call back from r
public rexpreference create rjava ref object o throws rengine exception precaution if o null return null call rengine api and make rexpreference from the result rexpreference ref null boolean obtained lock rni mutex safe lock try org rosuda jri rexp rx rni create rjava ref o if rx null throw new rengine exception this could not push java object to r else long p rx xp rni rni preserve p ref new rexpreference this p finally if obtained lock rni mutex unlock return ref
creates a code jobj ref code reference in r via r java
public int size return ids length
returns the number of cases
public rengine get engine return engine
returns the engine associated with this exception
public boolean need login return auth req
check authentication requirement sent by server
public rexp resolve if resolved value null return resolved value try resolved value eng resolve reference this return resolved value catch rexpmismatch exception me this should never happen since we are rexpreference catch rengine exception ee fixme what to we do return null
resolve the external rexp reference into an actual rexp object
public void invalidate resolved value null
invalidates any cached representation of the reference
public void server eval string cmd throws rserve exception if connected rt null throw new rserve exception this not connected rpacket rp rt request rtalk cmd ctrl eval cmd n if rp null rp is ok return throw new rserve exception this server eval failed rp
evaluates the given command in the master server process asynchronously control command
public void server shutdown throws rserve exception if connected rt null throw new rserve exception this not connected rpacket rp rt request rtalk cmd ctrl shutdown if rp null rp is ok return throw new rserve exception this server shutdown failed rp
attempt to shut down the server process cleanly
public boolean assign string sym string ct boolean obtained lock rsync safe lock try long x1 rni put string ct return rni assign sym x1 0 finally if obtained lock rsync unlock
assign a string value to a symbol in r
private void assign parameter variables rsession r session throws operator exception for parameter type type get parameter types string name type get key if is parameter set name if type instanceof parameter type boolean r session execute prefix parameter name get parameter as boolean name true false else if type instanceof parameter type int r session execute prefix parameter name get parameter as int name else if type instanceof parameter type double r session execute prefix parameter name get parameter as double name else r session execute prefix parameter name get parameter as string name
this will publish the parameters from the operator to variables of according type
public boolean is variable char forbidden chars new char for char forbidden char forbidden chars if source expression index of forbidden char 1 return false return true
returns if this rresult is a variable
public rexp create rjava ref object o if o null return null string klass o get class get name boolean obtained lock rsync safe lock try long l rni eval rni lcons rni install symbol jmkref rni lcons rni java to xref o rni lcons rni put string klass 0 0 if l 0 l 4 return null for safety failure codes are only 3 0 to not clash with 64 bit pointers return new rexp this l false finally if obtained lock rsync unlock
creates a code jobj ref code reference in r via r java
public void execute string command input get text command history add command command history position command history size add command to console command n rconsole panel this r console execute command command input set text
this will trigger the execution of the current entered text
public void add result to console string texts style constants set foreground attribute set result color style constants set bold attribute set false add to console texts attribute set
this will append each single text given to the console
public void set multi line edit boolean mutli line mode enabled input multi line mutli line mode enabled
if enabled enter does not send the text to r
public void clear console output set document new default styled document
this method will discard the complete content of the console
public void sync display boolean finish if this observer null observer image update null image observer allbits 0 0 int width int height
actually this implementation does nothing since repaint is requested by awt event queue
public void close connection rconnection connection connections remove connection connection close
this method will close the connection of this instance
public void deliver plot jgdplot painter c for rsession listener listener listeners listener notify plot listener c
if a new plot has been created deliver
public string to string try iterator string keys keys string buffer sb new string buffer while keys has next if sb length 1 sb append object o keys next sb append quote o to string sb append sb append value to string this map get o sb append return sb to string catch exception e return null
make a json text of this jsonobject
private asevaluation get weka attribute evaluator string prefix name string parameters throws operator exception string actual name prefix name substring weka tools weka operator prefix length string evaluator name null for int i 0 i weka operator factory weka attribute evaluators length i if weka operator factory weka attribute evaluators i ends with actual name evaluator name weka operator factory weka attribute evaluators i break asevaluation evaluator null try evaluator asevaluation for name evaluator name parameters catch exception e throw new user error this e 904 new object evaluator name e return evaluator
returns the weka attribute evaluator based on the subtype of this
public boolean is initialized return all licenses null
returns true if licenses are downloaded already
public string get weka class path string prefix name get operator class name string actual name prefix name substring weka tools weka operator prefix length for int i 0 i weka operator factory weka classifiers length i if weka operator factory weka classifiers i ends with actual name return weka operator factory weka classifiers i return null
this method is used by the
override public boolean is updatable return classifier instanceof updateable classifier
returns true if the weka classifier is updatable
public string get weka class path string prefix name get operator class name string actual name prefix name substring weka tools weka operator prefix length for int i 0 i weka operator factory weka meta classifiers length i if weka operator factory weka meta classifiers i ends with actual name return weka operator factory weka meta classifiers i return null
this method is used by the
private classifier get weka classifier string parameters throws operator exception string classifier name get weka class path classifier classifier null try classifier classifier for name classifier name parameters class clazz class for name classifier name classifier classifier clazz new instance if parameters null classifier set options parameters catch exception e throw new user error this e 904 new object classifier name e return classifier
returns the weka classifier based on the subtype of this operator
public void add query attribute att text extractor query attribute list add att name query map put att get name query
add a new query to the map
public text extractor get query attribute att return name query map get att get name
get a query given an attribute
public boolean is append words return append words
returns the append words
public boolean is update only current return use only
returns the update only current