input stringlengths 10 828 | output stringlengths 5 107 |
|---|---|
public boolean get show axes return show axes | returns the value of the show axes property |
public complex plus complex c return new complex re c re im c im | returns this c c must be non null |
public complex minus complex c return new complex re c re im c im | returns this c c must be non null |
public complex times complex c return new complex re c re im c im re c im im c re | returns this c c must be non null |
public complex divided by complex c double denom c re c re c im c im if denom 0 return new complex double na n double na n else return new complex re c re im c im denom im c re re c im denom | returns this c c must be non null |
public void set show axes boolean show if show show axes if show axes2 d axes create axes add decoration axes else for int i decorations size 1 i 0 i if decorations get i instanceof axes2 d decorations remove i force redraw if show show axes action put value action name i18n tr vmm core commands hide axes else show axes action put value action name i18n tr vmm core commands show axes show axes show | if set to true an axes decoration is added to the view |
public void set columns int columns super set columns columns string content get text if content length columns content equals original string param instanceof real param return double value switch input type case value value real param param get value break case animation start value real param animateable param get animation start break default value real param animateable param get animation end break string str string format columns g value set text str original string str | sets the preferred size to the specified number of columns |
public parameter get parameter return param | returns the parameter whose value is input by this parameter input |
protected axes2 d create axes return new axes2 d | create an axes decoration that can be added to this view |
public void revert set text original string | reset the contents of the text box to its original value |
public void do mouse up mouse event evt display display view view int width int height if started dragging return if operation zoom rect scale rect null double pixel width start window 1 start window 0 width double pixel height start window 3 start window 2 height double newxmin start window 0 scale rect x pixel width double newxmax newxmin scale rect width pixel width double newymax start window 3 scale rect y pixel height double newymin newymax scale rect height pixel height new window view newxmin newxmax newymin newymax display repaint view set fast drawing save fast drawing | finish processing a drag operation |
public double r return math sqrt re re im im | returns the absolute value r in polar coordinates of this |
public cursor get cursor for dragging mouse event mouse down event display display view view if operation zoom rect return cursor get predefined cursor cursor crosshair cursor else if operation drag return cursor get predefined cursor cursor move cursor else if operation zoom return cursor get predefined cursor cursor s resize cursor else return null | returns the cursor that the display should use during a drag operation |
public void draw while dragging graphics2 d g display display view view int width int height if operation zoom rect scale rect null return if math abs startx prevx 3 math abs starty prevy 3 return g set color color white g draw rect scale rect x 1 scale rect y 1 scale rect width 2 scale rect height 2 g draw rect scale rect x 1 scale rect y 1 scale rect width 2 scale rect height 2 g set color color black g draw rect scale rect x scale rect y scale rect width scale rect height | when the display is repainted during a drag operation this method will be |
public void add extra panel extra panel input panel if extra panels null extra panels new array list extra panel extra panels add input panel input pane add input panel | add an extra input panel to the dialog box |
public void set value double val set value object new double val | set the value of this parameter to a specified value of type double |
public void do mouse drag mouse event evt display display view view int width int height | continue processing a mouse gesture for which code do mouse down code |
public double get value double d double get value object if d null return 0 else return d double value | returns the value of this object as a number of type double |
public void do mouse up mouse event evt display display view view int width int height | finish processing a mouse gesture for which code do mouse down code |
public complex exponential double length math exp re return new complex length math cos im length math sin im | computes the complex exponential function e z where z is this complex number |
public void set default value double val set default value object new double val | sets the default value of the parameter to a specified double |
public double get default value double d double get default value object if d null return 0 else return d double value | returns the default value of this parameter as an int |
public cursor get cursor display display view view return null | return a cursor to be used in the display when this mouse task |
public complex inverse complex result double length re re im im if length 0 result new complex double na n double na n else result new complex re length im length return result | computes the complex reciprocal function 1 z where z is this complex number |
public void draw while dragging graphics2 d g display display view view int width int height | when the display is repainted during a drag operation this method will be |
public boolean wants more clicks display display view view return false | this method is called by a display immediately after processing a click or |
public complex log nearer complex previous complex c new complex this log double h c im previous im 2 math pi double d 2 math pi math floor h 0 5 c im c im d return c | computes that complex logarithm of this complex number |
protected string value object to string object obj return util to external string double obj double value | returns a string representation of a value object of this parameters |
public static point2 d normal to point2 d p point2 d n new point2 d double n set location p get y p get x return n | public point2 d normal to point2 d p returns new object n p |
public boolean get apply graphics2 dtransform return apply graphics2 dtransform | returns the value of the apply graphics2 dtransform property |
public void set limits double xmin double xmax double ymin double ymax if xmin this xmin ymin this ymin xmax this xmax ymax this ymax return this xmin xmin requested xmin this xmax xmax requested xmax this ymin ymin requested ymin this ymax ymax requested ymax x y width height 0 fire transform change event | set the window in the xy plane for this transform |
public complex integer root int k double a b boolean neg false if k 0 k k neg true if k 0 a 1 b 0 else if k 1 a re b im else double length r double angle theta if angle 0 angle math pi 2 length math pow length 1 0 k angle angle k a length math cos angle b length math sin angle if neg double denom a a b b if denom 0 a double na n b double na n else a a denom b b denom return new complex a b | returns a complex k th root of this complex number |
public complex square root nearer complex previous complex c c this integer root 2 if c re previous re c im previous im 0 c re c re c im c im return new complex c re c im | computes that square root of this complex number |
public void set value object object object super set value object object if variable null it will be null when set value object is called during the constructor variable set val complex object | sets the value of this parameter and of the associated variable |
public object get value object complex val complex super get value object if variable get val equals val val variable get val super set value object val return val | get the value object of this parameter |
public complex variable get variable return variable | returns the non null variable associated with this variable param |
public boolean get preserve aspect return preserve aspect | returns the value of the preserve aspect property |
public void add runnable task if task null return if closed throw new illegal state exception can t add a new task to a job after the job has been closed synchronized owner tasks add task owner notify all | add a task to this job |
synchronized public void close if closed return closed true if finished task count failed task count tasks size finished true owner finish this | close this job making it possible for the job to complete |
public int finished task count return finished task count | returns the number of tasks in this job that have been completed successfully |
public int total task count return tasks size | returns the number of tasks that have been added to this job |
public void cancel synchronized owner finished true canceled true closed true owner finish this owner notify all | cancel the job |
synchronized public void shut down shut down true for job job active jobs job cancel notify all | this method should be called before discarding the task manager |
public int get thread pool size return thread pool get size | returns the number of threads that will be used in the thread pool |
public void execute and wait collection extends runnable tasks if shut down throw new illegal state exception can t execute tasks after shutdown if tasks null throw new null pointer exception the collection of tasks can t be null if get thread pool size 1 for runnable task tasks try if task null task run finally if one task fails continue with the next task else job job execute async tasks job await 0 | executes all the tasks in a collection of tasks |
public void set window double xmin double xmax double ymin double ymax if transform null transform set limits xmin xmax ymin ymax | sets the rectangular window in the xy plane for this view |
synchronized public job execute async collection extends runnable tasks if shut down throw new illegal state exception can t execute tasks after shutdown if tasks null throw new null pointer exception the collection of tasks can t be null job job new job this tasks job close active jobs add job notify all return job | creates a job to execute a specified collection of tasks and starts working |
synchronized public job create job if shut down throw new illegal state exception can t execute tasks after shutdown job job new job this null active jobs add job return job | creates a job to which a collection of tasks can be added |
public boolean get use filmstrip return filmstrip null | returns true if this animation is creating a filmstrip |
public object clone transform o null try o transform super clone o change listeners null cloned version has no listeners o change event null catch clone not supported exception e won t happen return o | returns a copy of this transform |
public void set use filmstrip boolean use filmstrip if use filmstrip filmstrip null if use filmstrip filmstrip new filmstrip else filmstrip null | set whether or not this animation uses a filmstrip |
public void set window double window if window null set window window 0 window 1 window 2 window 3 | sets the window in the xy plane for this view |
public void finish drawing g null if untransformed graphics null untransformed graphics dispose untransformed graphics null | this is called by view and is not meant to be called directly |
public void set looping int looping mode if looping mode once looping mode oscillate looping looping mode if looping mode oscillate forward true | sets the looping mode of the animation |
public int get looping return looping | returns the current looping mode of the animation |
public display enable events awtevent component event mask mouse handler listener new mouse handler add mouse listener listener add mouse motion listener listener set background color white set foreground color black set opaque true status status empty save original font get font | construct an initially empty display |
public boolean get restore parameter values return restore parameter values | get the setting of the restore parameter values property |
public void set restore parameter values boolean restore parameter values this restore parameter values restore parameter values | set the restore parameter values property |
public void set frames int frames if frames 0 frames 1 this frames frames if frames 0 set looping once | sets the maximum frame number for this animation |
synchronized public void add with custom value integer param item int value if item null return if custom limit animated parameters null custom limit animated parameters new array list object custom limit animated parameters add new object item value | adds an integer param to this animator with specified value for |
synchronized public void add with custom value real param item double value if item null return if custom limit animated parameters null custom limit animated parameters new array list object custom limit animated parameters add new object item value | adds a real param to this animator with specified value for |
synchronized public void add with custom value complex param item complex value if item null return if custom limit animated parameters null custom limit animated parameters new array list object if value null value new complex custom limit animated parameters add new object item value | adds a complex param to this animator with specified value for |
public boolean get fire frame events return fire frame events | tells whether frame events are fired by this animation |
public void set fire frame events boolean fire frame events this fire frame events fire frame events | if set to true then change events are generated each time the |
public int get frame number return frame number value is 1 when the start event is fired | gets the current frame number |
synchronized public void start if running return runner new thread public void run do run runner start running true canceled false paused false fire animation change event | this method must be called to start the animation running |
synchronized public void set paused boolean paused if running this paused paused notify | pauses or unpauses a running animation |
public int get milliseconds per frame return milliseconds per frame | returns the nominal number of milliseconds per frame |
public double get pixel width if width 0 return 1 return pixel width | this can be called during drawing to determine the actual width |
synchronized public void cancel if running return canceled true notify | cancels the animation |
public void set milliseconds per frame int milliseconds per frame if milliseconds per frame 0 this milliseconds per frame milliseconds per frame if timer null timer set delay apply dilation milliseconds per frame | sets the nominal number of milliseconds per frame |
public void set background color c if c null if exhibit null c exhibit get default background else c color white if c equals background return background c if c get red 150 c get green 120 c get blue 150 set foreground color white else set foreground color black force redraw if color black equals get background background commands set selected index 0 else if color white equals get background background commands set selected index 1 else background commands set selected index 2 | set the background color that will be used for rendering this view |
public filmstrip get saved filmstrip return saved filmstrip | get the filmstrip if any that has been created by a recent animation |
public double get pixel height if height 0 return 1 return pixel height | this can be called during drawing to determine the actual height |
public void set paused boolean paused if timer null this paused paused return this paused paused if paused timer stop else timer set initial delay 0 timer restart | pauses or unpauses a running animation |
public double get time dilation return time dilation | returns the time dilation factor that is currently set for this animation |
public boolean applied transform2 d return applied transform2 d | this can be called during drawing to determine whether a 2 d transform |
synchronized protected void fire animation change event if change listeners null return if change event null change event new change event this for int i 0 i change listeners size i change listeners get i state changed change event | sends a change event to any registered change listeners |
synchronized public void start if timer null return timer new timer apply dilation milliseconds per frame new action listener public void action performed action event evt next frame evt timer set initial delay apply dilation initial delay frame number 1 changes to zero before the first time draw frame is called forward true paused false animation starting fire animation change event timer start | starts the animation running |
public void set foreground color c if c null if exhibit null c exhibit get default background else c color white if c equals foreground return foreground c force redraw | set the foreground color to be used for rendering this view |
public view get view return main view | returns the view that is curently installed in this display |
protected void add input panel jcomponent input panel input panel set border border factory create empty border 5 5 5 5 content panel add input panel border layout center pack | adds the specified panel to the center position of the dialog box |
protected jbutton defaults button return defaults button | returns the defaults button |
synchronized public void cancel if timer null timer stop animation ending timer null paused false fire animation change event | cancels a running animation |
protected jpanel bordered panel string title jpanel panel new jpanel panel set border border factory create compound border border factory create empty border 4 0 4 0 border factory create compound border border factory create titled border border factory create line border color black title border factory create empty border 5 5 5 5 return panel | a convenience method for creating a panel that uses a titled border |
protected void do apply do ok | this is called when the user clicks the apply button |
protected string value object to string object obj return obj null 0 obj to string | returns a string representation of this parameters value |
public parameterizable get owner return owner | returns the owner of this parameter |
synchronized public boolean is running return timer null | returns true if the animation is currently running |
public void set owner parameterizable owner this owner owner | sets the owner of this parameter |
public object get value object return value | returns the value of this object as an object |
public void set default value object object object default value object default value string null | explicitely set the default value object for this parameter |
public object get default value object return default value | returns the default value of this parameter |
public boolean get fast drawing return transform null false transform get fast drawing | tells whether the exhibit should be drawn as quickly as possible |
public exhibit get exhibit return main view null null main view get exhibit | return the exhibit that is currently installed in the display |
final public string get value as string if value string null return value string else if value null return 0 else return value object to string value | returns a non null string representation of this parameters value |
public string get default value as string if default value string null return default value string else if default value null return 0 else return value object to string default value | returns a non null string representation of this parameters default value |
final public void set value from string string value as string boolean new default val default value null set value object string to value object value as string value string value as string the previous line will have set value string to null if new default val default value string value as string | sets the value of this parameter from a string representation of the value |
public void set matrix entry complex val int i int j if i 0 i 3 j 0 j 3 entries i j val | set the entry i j in the matrix to the value of val |
public complex matrix2 d inverse complex matrix2 d the inverse new complex matrix2 d complex determinant entries 1 1 times entries 2 2 minus entries 2 1 times entries 1 2 complex zero new complex 0 0 if determinant equals zero return null else the inverse entries 1 1 entries 2 2 divided by determinant the inverse entries 2 2 entries 1 1 divided by determinant the inverse entries 1 2 zero minus entries 1 2 divided by determinant the inverse entries 2 1 zero minus entries 2 1 divided by determinant return the inverse | compute the inverse of the matrix |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.