jhplot
Class HJavaView
- java.lang.Object
-
- jhplot.HJavaView
-
public class HJavaView extends java.lang.Object
Interactive 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 PgGeometry
add(F2D f2d)
Create a graphic object from a 2D function.PgGeometry[]
add(F2D[] f2d)
Create a list of graphic objects from 2D functions;void
clear()
Clear the current graph including graph settings.void
close()
Close the canvas (and dispose all components) Note: a memory leak is found - no time to study it.void
doc()
Show online documentation.void
draw(F2D f2d)
Draw a 2D function.void
draw(F2D[] f2d)
Draw array of functions.void
draw(PgGeometry geom)
Draw a mathematical object.void
draw(PgGeometry[] obj)
Draw array of objects.boolean
export(java.lang.String file)
Export graph into an image file.PsMainFrame
getFrame()
Get the current frame.PvViewer
getView()
Get the current view.void
visible()
Show the canvasvoid
visible(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