jhplot
Class HJavaView
- java.lang.Object
-
- jhplot.HJavaView
-
public class HJavaView extends java.lang.ObjectInteractive canvas for visualizing and experimenting with a variety of mathematical objects using JavaView.
-
-
Constructor Summary
Constructors Constructor and Description HJavaView()Construct a canvas with default parameters.HJavaView(java.lang.String exhibitName, int xsize, int ysize)Create canvas for showing mathematical object.HJavaView(java.lang.String exhibitName, int xsize, int ysize, java.awt.Color background)Create canvas for showing mathematical object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description PgGeometryadd(F2D f2d)Create a graphic object from a 2D function.PgGeometry[]add(F2D[] f2d)Create a list of graphic objects from 2D functions;voidclear()Clear the current graph including graph settings.voidclose()Close the canvas (and dispose all components) Note: a memory leak is found - no time to study it.voiddoc()Show online documentation.voiddraw(F2D f2d)Draw a 2D function.voiddraw(F2D[] f2d)Draw array of functions.voiddraw(PgGeometry geom)Draw a mathematical object.voiddraw(PgGeometry[] obj)Draw array of objects.booleanexport(java.lang.String file)Export graph into an image file.PsMainFramegetFrame()Get the current frame.PvViewergetView()Get the current view.voidvisible()Show the canvasvoidvisible(boolean vs)Set the canvas frame visible or not
-
-
-
Constructor Detail
-
HJavaView
public HJavaView(java.lang.String exhibitName, int xsize, int ysize, java.awt.Color background)Create canvas for showing mathematical object.- Parameters:
exhibitName- name of this canvasxsize- size in x directionysize- size in y directionbackground- background color
-
HJavaView
public HJavaView(java.lang.String exhibitName, int xsize, int ysize)Create canvas for showing mathematical object. Uses white background.- Parameters:
exhibitName- name of this canvasxsize- size in x directionysize- size in y direction
-
HJavaView
public HJavaView()
Construct a canvas with default parameters. Use white background.
-
-
Method Detail
-
clear
public void clear()
Clear the current graph including graph settings.
-
draw
public void draw(PgGeometry geom)
Draw a mathematical object.- Parameters:
geom- mathematical object to be shown.
-
draw
public void draw(F2D f2d)
Draw a 2D function.- Parameters:
f2d- function for drawing
-
draw
public void draw(F2D[] f2d)
Draw array of functions.- Parameters:
f2d- array of 2D functions.
-
draw
public void draw(PgGeometry[] obj)
Draw array of objects.- Parameters:
obj- array of 3D objects
-
add
public PgGeometry[] add(F2D[] f2d)
Create a list of graphic objects from 2D functions;- Parameters:
f2d- list with mathematical objects to be shown.- Returns:
- list with geometry objects which can be directly plotted.
-
add
public PgGeometry add(F2D f2d)
Create a graphic object from a 2D function. Prepare it for drawing as a surface plot. Ranges and number of points are taken from F2D definitions.- Parameters:
f2d- mathematical object to be shown.- Returns:
- geometry object which can be directly plotted.
-
export
public boolean export(java.lang.String file)
Export graph into an image file. The the image format is given by extension. The following extensions are supported: "gif", "jpg", "png", "ppm", "eps", "ps".- Parameters:
filename- file name
-
getView
public PvViewer getView()
Get the current view.- Returns:
- current view.
-
getFrame
public PsMainFrame getFrame()
Get the current frame.- Returns:
- current view.
-
visible
public void visible(boolean vs)
Set the canvas frame visible or not- Parameters:
vs- (boolean) true: visible, false: not visible
-
visible
public void visible()
Show the canvas
-
close
public void close()
Close the canvas (and dispose all components) Note: a memory leak is found - no time to study it. set to null all the stuff
-
doc
public void doc()
Show online documentation.
-
-
DMelt 3.0 © DataMelt by jWork.ORG