Documentation of 'jhplot.HZirkel' Java class.
HZirkel
jhplot

Class HZirkel



  • public class HZirkel
    extends java.lang.Object
    HZirkel class is used to create a canvas for dynamic manipulation with geometrical objects. Based on CarMatal/Zirkel program adopted for java scripting.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static boolean IsApplet 
      static long Version 
    • Constructor Summary

      Constructors 
      Constructor and Description
      HZirkel()
      Build a canvas for the zirkel with the standard size 600x600
      HZirkel(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 canvas
      void close()
      close current page
      void draw(carmetal.objects.ConstructionObject obj)
      Draw an object on the canvas.
      void exit() 
      void export(java.lang.String file)
      Export image to a file.
      carmetal.rene.zirkel.ZirkelCanvas getCanvas()
      Return the actual canvas where all objects are shown
      carmetal.construction.Construction getConstruction()
      Get construction to draw the objects
      void setAxis(boolean axis)
      Show coordinate system on the canvas.
      void update()
      Update the canvas with new objects.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • 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 X
        Ysize - size in Y
      • HZirkel

        public HZirkel(int Xsize,
                       int Ysize)
        Build a canvas for the Zirkel canvas
        Parameters:
        Xsize - size in X
        Ysize - 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(java.lang.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 3.0 © DataMelt by jWork.ORG