Documentation of 'CH.ifa.draw.standard.CreationTool' Java class
CreationTool
CH.ifa.draw.standard

Class CreationTool

    • Constructor Summary

      Constructors 
      Constructor and Description
      CreationTool(DrawingView view, Figure prototype)
      Initializes a CreationTool with the given prototype.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void activate()
      Sets the cross hair cursor.
      void mouseDown(java.awt.event.MouseEvent e, int x, int y)
      Creates a new figure by cloning the prototype.
      void mouseDrag(java.awt.event.MouseEvent e, int x, int y)
      Adjusts the extent of the created figure
      void mouseUp(java.awt.event.MouseEvent e, int x, int y)
      Checks if the created figure is empty.
      • Methods inherited from class java.lang.Object

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

      • CreationTool

        public CreationTool(DrawingView view,
                            Figure prototype)
        Initializes a CreationTool with the given prototype.
    • Method Detail

      • mouseDown

        public void mouseDown(java.awt.event.MouseEvent e,
                              int x,
                              int y)
        Creates a new figure by cloning the prototype.
        Specified by:
        mouseDown in interface Tool
        Overrides:
        mouseDown in class AbstractTool
      • mouseDrag

        public void mouseDrag(java.awt.event.MouseEvent e,
                              int x,
                              int y)
        Adjusts the extent of the created figure
        Specified by:
        mouseDrag in interface Tool
        Overrides:
        mouseDrag in class AbstractTool
      • mouseUp

        public void mouseUp(java.awt.event.MouseEvent e,
                            int x,
                            int y)
        Checks if the created figure is empty. If it is, the figure is removed from the drawing.
        Specified by:
        mouseUp in interface Tool
        Overrides:
        mouseUp in class AbstractTool
        See Also:
        Figure.isEmpty()

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.