input stringlengths 10 828 | output stringlengths 5 107 |
|---|---|
public animation get create animation view view return null | this method is called to create the exhibit |
protected double height along line double t line3 d line vector3 d point new vector3 d line parametric equation t double the height height function point x point y point z return the height | the height function as a function of the signed distance t along line |
protected void create osi int width int height full osi null full osi new buffered image width height offscreen image type | this method is called whenever |
public int get segment choice return segment choice | returns the value of the segment choice property |
public void set segment choice int segment choice if this segment choice segment choice segment choice 1 segment choice 4 this segment choice segment choice segment choice select set selected index segment choice 1 force redraw | sets the value of the segment choice property |
public action list get actions for view view view action list actions super get actions for view view action list submenu new action list i18n tr vmm fractals hilbert segmentchoice submenu add segment choice select actions add null actions add submenu return actions | adds a submenu that contains commands for selecting the value of the |
protected void do draw graphics2 d g view view transform transform for int i 0 i curve points length 1 i g set color color get hsbcolor float color repeat factor i curve points length 1 1 view draw line curve points i re curve points i im curve points i 1 re curve points i 1 im | draws the curve in continuous rainbow colors |
public boolean get use injective curve return use injective curves | returns the value of the use injective curves property |
public void set use injective curves boolean use injective curves if this use injective curves use injective curves return this use injective curves use injective curves segment choice toggle set state use injective curves force redraw | sets the value of the set use injective curves property |
public action list get actions for view view view action list actions super get actions for view view actions add null actions add segment choice toggle return actions | adds a submenu that contains commands for selecting the value of the |
private boolean turns left complex u complex v complex w return v im u im w re v re v re u re w im v im 0 | returns true if u v w turns to the left |
protected void clear osi graphics2 d g graphics2 d full osi get graphics g set color background g fill rect 0 0 full osi get width full osi get height g dispose | fills the offscreen image with the background color of this view |
public void set show status bar boolean show if show show status bar return if holder null if show holder add holder status bar border layout south else holder remove holder status bar validate show status bar show | sets the value of the show status bar property |
public boolean get state return boolean get value toggle state boolean value | gets the current state of the toggle action |
public void set state boolean state put value toggle state new boolean state | sets the current state of the toggle action |
public int add item string item name if item name null actions add null else final int index actions size abstract action action new abstract action item name public void action performed action event evt set selected index index option selected index action put value radio state new boolean false action set enabled enabled actions add action return actions size 1 | adds an option to the group |
public void set selected index int index if index 0 index actions size actions get index null index 1 if selected index 0 actions get selected index put value radio state new boolean false if index 0 actions get index put value radio state new boolean true selected index index | set the currently selected option |
public int get item count return actions size | returns the number of items in the group |
public void add action item object items add object | adds an action item to the list of items in this action list |
public void remove action item object items remove object | removes a specified action item from this action list |
public action item get item int i return items get i | gets the i th action item in this action list |
public string get status text if holder null return null else return holder status bar get text | returns the string from the status bar |
public void add all action list list if list null int ct list get item count for int i 0 i ct i add list get item i | add all the action items in list to this action list |
public boolean get use reverse collar return use reverse collar | get the current setting of the use reverse collar property |
public void set use reverse collar boolean use reverse collar if this use reverse collar use reverse collar this use reverse collar use reverse collar reverse collar toggle set state use reverse collar force redraw | sets the value of the use reverse collar property |
public action list get actions action list actions super get actions actions add reverse collar toggle return actions | returns a list of actions for this view |
public void set color color c if current graphics null current graphics set color c null get foreground c | this method will set the color in the current graphics context |
protected void compute draw data hook view view transform transform compute draw data view exhibit needs redraw previous transform transform previous transform transform transform clone | called by render to compute the draw data for the exhibit |
public void add border component component c object position if position border layout north position border layout east position border layout west position border layout south throw new illegal argument exception internal error border component position must be north south east or west if holder null if position border layout south show status bar holder remove holder status bar show status bar false holder add c position holder validate | adds an extra component to the displays holder |
public view get default view return new mandelbrot view | overridden to return an object belonging to the nested class mandelbrot view |
protected void do draw hook graphics2 d g view view transform transform do draw g view transform | called by render to this exhibit |
public color get color return current graphics null null current graphics get color | returns the drawing color of the current graphics context |
public void remove border component component c if holder null holder remove c holder validate | removes a specified component from the displays holder |
public void do zoom double magnification factor double window get requested window double width window 1 window 0 double height window 3 window 2 double center x window 0 width 2 double center y window 2 height 2 double new width width magnification factor double new height height magnification factor set window center x new width 2 center x new width 2 center y new height 2 center y new height 2 | zooms the display by a specified magnification factor |
public jsplit pane split component new component return split new component false false | calls code split new component false false code |
public int get show julia and orbit return show julia and orbit | returns the value of the show julia and orbit property |
protected void do draw graphics2 d g view view transform transform | do the actual drawing of the exhibit |
public void set show julia and orbit int show julia and orbit if this show julia and orbit show julia and orbit return this show julia and orbit show julia and orbit show julia and orbit select set selected index show julia and orbit if get display null get display set status text force redraw | sets the value of the show julia and orbit property |
protected void make points int subintervals t resolution get value t vals new double subintervals 1 points new vector3 d subintervals 1 double t tmin get value double dt tmax get value t subintervals for int i 0 i subintervals i t vals i t dt i points i value t vals i if double is na n points i x double is infinite points i x double is na n points i y double is infinite points i y double is na n points i z double is infinite points i z points i null | computes the array of points on the curve using the |
public space curve parametric get curve return curve | returns the curve to which this decoration applies or null if no |
public void set curve space curve parametric c curve c | sets the curve to which this decoration applies |
protected vector3 d get center of points vector3 d point set int num points double x 0 0 y 0 0 z 0 0 for int i 0 i num points i x x point set i x y y point set i y z z point set i z return new vector3 d x num points y num points z num points | returns the center of the first num points of the array point set |
public void draw pixel double x double y temp point set location x y transform window to viewport temp point int x int int temp point get x 0 4999 int y int int temp point get y 0 4999 draw pixel direct null x int y int | draws a point by turning on a single pixel |
public void unsplit if holder null holder split pane null holder remove holder split pane holder split pane null holder add this border layout center holder validate | removes the component added by |
public void set fast drawing boolean fast boolean redraw synchronized views super set fast drawing fast redraw synchronized views bitmap needs redraw true force redraw | overridden to force a redraw of the mandelbrot bitmap |
public vector3 d geographic coordinates double theta double phi double x math sin theta math cos phi double y math sin theta math sin phi double z math cos theta return new vector3 d x y z | computes spherical coordinates x y z theta phi |
public view get default view view view new spherical curve view view set name vmm spacecurve parametric space curve parametric view view as curve return view | returns a view of type |
public void reset holder if holder null holder reset | restores the holder to its default state this is called automatically by |
public int get point count return points null 0 points length | get the size of the array of points that define this curve |
public vector3 d get point int i return points i | get one of the points from the array that defines the curve |
protected void compute draw data3 d view3 d view boolean exhibit needs redraw transform3 d previous transform transform3 d new transform if exhibit needs redraw make points | computes the array of points |
protected void do draw3 d graphics2 d g view3 d view transform3 d transform boolean use reverse collar false if view instanceof space curve view use reverse collar space curve view view get use reverse collar view draw collared curve points use reverse collar | draws the curve |
public void draw pixel point2 d pt draw pixel pt get x pt get y | draws a point by turning on a single pixel |
public view get default view view view new space curve parametric view view set name vmm spacecurve parametric space curve parametric view view as curve return view | returns a view of type |
public container get holder if holder null holder new display holder return holder | returns the container or holder for this display |
public void draw dot point2 d pt double diameter temp point set location pt transform window to drawing coords temp point double h diameter transform get pixel width double w diameter transform get pixel height current graphics fill new ellipse2 d double pt get x h 2 pt get y w 2 h w | draws a dot of specified diameter centered at a specified point |
public int get rendering style return rendering style | returns the current rendering style |
public void set rendering style int style if style wireframe rendering style patch rendering return select rendering commands set selected index style if drag as surface toggle null drag as surface toggle set enabled style patch rendering if style rendering style return rendering style style force redraw | sets the rendering style that is used to draw surfaces |
public boolean get black and white return black and white | tells whether surfaces are rendered in gray scale rather than color |
public animation get create animation final view view if view null view instanceof space curve parametric view return null return new timer animation 75 20 75 frames 20 mulliseconds per frame protected void draw frame space curve parametric view view fraction to draw frame number 75 0 view force redraw public void animation starting space curve parametric view view fraction to draw 0 public void animation ending space curve parametric view view fraction to draw 1 view force redraw | returns an animation that shows the curve being drawn bit by bit |
public void set show viewpoint boolean show viewpoint this show viewpoint show viewpoint | sets the show viewpoint property |
public void set black and white boolean black and white select colored commands set selected index black and white 1 0 if black and white this black and white this black and white black and white offscreen image type black and white buffered image type byte gray buffered image type int rgb full osi left stereograph osi right stereograph osi null force redraw | set whether surfaces should be rendered in gray scale or in color |
public void take exhibit view view boolean share transform super take exhibit view share transform if share transform view instanceof mandelbrot view max count set value mandelbrot view view max count get value palette length set value mandelbrot view view palette length get value | has been overridden to copy the maximum iteration count if the share transform |
public void set orientation int orientation if orientation normal orientation orientation reverse orientation orientation no orientation return select orientation commands set selected index orientation if this orientation orientation this orientation orientation force redraw | set how front and back faces of surface patches are determined |
public transform get default transform view view double window get default window if view instanceof view3 d transform3 d tr new transform3 d default viewpoint window 0 window 1 window 2 window 3 if default view up null tr set image plane ydirection default view up return tr else return new transform window 0 window 1 window 2 window 3 | returns the default transform for use in the specified view |
public view get default view return new view3 d | returns the default view of this exhibit |
public void set phong shading boolean phong shading select shading commands set selected index phong shading 0 1 if this phong shading phong shading this phong shading phong shading force redraw | select the type of shading to be used for surface patches |
public vector3 d get default viewpoint return default viewpoint | returns the default viewpoint for viewing this exhibit in 3 d |
public void set default viewpoint vector3 d default viewpoint this default viewpoint default viewpoint null new vector3 d 20 0 0 default viewpoint | set the default viewpoint for viewing this exhibit in 3 d |
public vector3 d get default view up return default viewpoint | returns the default view up for viewing this exhibit in 3 d |
public void set default view up vector3 d default view up this default view up default view up | set the default view up vector for viewing this exhibit in 3 d |
protected void compute draw data3 d view3 d view boolean exhibit needs redraw transform3 d previous transform3 d transform3 d new transform3 d | recopmputes cached data if necessary for a 3 d rendering of this exhibit |
protected void do draw3 d graphics2 d g view3 d view transform3 d transform | draws this exhibit in a 3 d view |
public double get transparency return transparency | returns the current degree of transparency |
public void set transparency double transparency if transparency 0 transparency 0 else if transparency 1 transparency 1 if this transparency transparency return this transparency transparency force redraw | set the degree of transparency for surfaces displayed in this view3 dlit |
private void set patch count int u patch count int v patch count this u patch count u patch count this v patch count v patch count u count 1 u patch count sub patches per patch v count 1 v patch count sub patches per patch points on surface new vector3 d u count v count | sets the number of patches in each direction |
public void add grid transform grid transform matrix transform if transform null return if transforms null transforms new array list grid transform matrix transforms add transform transformed data transformed vcurves null patches subpatches null patches valid sub patches valid false | adds a transformed copy of the basic grid to the surface |
public void discard grid transforms if transforms null transforms null transformed data transformed vcurves null patches subpatches null patches valid sub patches valid false | discards any grid transforms that have been added by |
public boolean get use identity transform return use identity transform | gets the value of the use identity transform property |
public void draw line double x1 double y1 double x2 double y2 double tx1 ty1 temp point set location x1 y1 transform window to drawing coords temp point tx1 temp point get x ty1 temp point get y temp point set location x2 y2 transform window to drawing coords temp point current graphics draw new line2 d double tx1 ty1 temp point get x temp point get y | draws a line in the current drawing context |
public void set use identity transform boolean use identity transform if use identity transform this use identity transform this use identity transform use identity transform patches subpatches null patches valid sub patches valid false | sets the value of the use identity transform property |
public int get ucount return u count | gets the number of vertices along the u direction of the basic grid |
public vector3 d normalized vector3 d v new vector3 d x y z v normalize return v | returns a new vector that is equal to this vector normalized |
public vector3 d negated return new vector3 d x y z | returns a new vector that is equal to 1 times this vector |
public void draw line point2 d pt1 point2 d pt2 draw line pt1 get x pt1 get y pt2 get x pt2 get y | draws a line in the current drawing context |
public vector3 d lin comb double c double d vector3 d v return new vector3 d c x d v x c y d v y c z d v z | returns the linear combination c this d v |
public int get vcount return v count | gets the number of vertices along the v direction of the basic grid |
public double dot vector3 d v return x v x y v y z v z | returns the dot product of this vector and v |
public int get sub patch count in grid return u count 1 v count 1 | gets the total number of subpatches in the basic grid |
public vector3 d cross vector3 d v double x1 y v z v y z double y1 x v z v x z double z1 x v y v x y return new vector3 d x1 y1 z1 | returns the cross product of this vector and v |
public int get patch count in grid return u patch count v patch count | gets the total number of major patches in the basic grid |
public light settings get light settings return get view style red green stereo view anaglyph light settings non anaglyph light settings | retrieve the current |
public void set light settings light settings light settings if light settings null if anaglyph light settings non anaglyph light settings anaglyph light settings non anaglyph light settings light settings else if get view style red green stereo view anaglyph light settings light settings else non anaglyph light settings light settings | sets the current light settings for this view |
protected void set anaglyph light settings light settings light settings if light settings null this anaglyph light settings light settings | set the light setting object that is used for anaglyph view style |
protected void set non anaglyph light settings light settings light settings if light settings null this non anaglyph light settings light settings | set the light setting object that is used for non anaglyph view styles |
public boolean get lighting enabled return lighting enabled | check whether lighting is currently enabled |
public void set lighting enabled boolean lighting enabled if this lighting enabled lighting enabled return this lighting enabled lighting enabled lighting enabled toggle set state lighting enabled force redraw | set whether lighting is currently enabled |
public void read extra xml element view info throws ioexception super read extra xml view info element light settings element save and restore get child element view info light settings if light settings element null return light settings light settings read light from xml light settings element non anaglyph light settings anaglyph light settings light settings light settings element save and restore get child element view info light settings anaglyph if light settings element null light settings read light from xml light settings element anaglyph light settings light settings | overridden to read back the light settings info |
public cursor get cursor for dragging mouse event mouse down event display display view view 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 set view point vector3 d view point if view point null this view point view point new vector3 d 20 0 0 else this view point new vector3 d view point view direction new vector3 d this view point view direction normalize view direction negate focal length view point norm clip distance 0 25 focal length save view point new vector3 d view point save view direction new vector3 d view direction set image plane ydirection image plane ydirection calls fire transform change event | sets the viewpoint of the transformation |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.