jhplot
Class HZirkel
- java.lang.Object
- jhplot.HZirkel
public class HZirkelextends Object
HZirkel class is used to create a canvas for dynamic manipulation with geometrical objects. Based on CarMatal/Zirkel program adopted for java scripting.
Constructor Summary
Constructors Constructor and Description HZirkel()
Build a canvas for the zirkel with the standard size 600x600HZirkel(int Xsize, int Ysize)
Build a canvas for the Zirkel canvas
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
add(carmetal.objects.ConstructionObject obj)
Add an object on the canvas and update it.void
clear()
Clear the canvasvoid
close()
close current pagevoid
draw(carmetal.objects.ConstructionObject obj)
Draw an object on the canvas.void
exit()
void
export(String file)
Export image to a file.carmetal.rene.zirkel.ZirkelCanvas
getCanvas()
Return the actual canvas where all objects are showncarmetal.construction.Construction
getConstruction()
Get construction to draw the objectsvoid
setAxis(boolean axis)
Show coordinate system on the canvas.void
update()
Update the canvas with new objects.
Field Detail
Version
public static final long Version
- See Also:
- Constant Field Values
IsApplet
public static boolean IsApplet
Constructor Detail
HZirkel
public HZirkel()
Build a canvas for the zirkel with the standard size 600x600- Parameters:
Xsize
- size in XYsize
- size in Y
HZirkel
public HZirkel(int Xsize, int Ysize)
Build a canvas for the Zirkel canvas- Parameters:
Xsize
- size in XYsize
- size in Y
Method Detail
getCanvas
public carmetal.rene.zirkel.ZirkelCanvas getCanvas()
Return the actual canvas where all objects are shown- Returns:
draw
public void draw(carmetal.objects.ConstructionObject obj)
Draw an object on the canvas. Canvas is updated after the object is placed on the canvas.- Parameters:
obj
- object
getConstruction
public carmetal.construction.Construction getConstruction()
Get construction to draw the objects- Returns:
add
public void add(carmetal.objects.ConstructionObject obj)
Add an object on the canvas and update it. Usually, you will need to call "update" to update the canvas.- Parameters:
obj
- object
update
public void update()
Update the canvas with new objects. It repaints and update history.
close
public void close()
close current page
exit
public void exit()
clear
public void clear()
Clear the canvas
setAxis
public void setAxis(boolean axis)
Show coordinate system on the canvas.
export
public void export(String file)
Export image to a file. The output depends on the file extension. The allowed file extensions are eps, png, svn- Parameters:
file
- name
DMelt 2.7 © DataMelt by jWork.ORG