Documentation of 'CH.ifa.draw.framework.Tool' Java class
Tool
CH.ifa.draw.framework

Interface Tool

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      void activate()
      Activates the tool for the given view.
      void deactivate()
      Deactivates the tool.
      void keyDown(java.awt.event.KeyEvent evt, int key)
      Handles key down events in the drawing view.
      void mouseDown(java.awt.event.MouseEvent e, int x, int y)
      Handles mouse down events in the drawing view.
      void mouseDrag(java.awt.event.MouseEvent e, int x, int y)
      Handles mouse drag events in the drawing view.
      void mouseMove(java.awt.event.MouseEvent evt, int x, int y)
      Handles mouse moves (if the mouse button is up).
      void mouseUp(java.awt.event.MouseEvent e, int x, int y)
      Handles mouse up in the drawing view.
    • Method Detail

      • activate

        void activate()
        Activates the tool for the given view. This method is called whenever the user switches to this tool. Use this method to reinitialize a tool.
      • deactivate

        void deactivate()
        Deactivates the tool. This method is called whenever the user switches to another tool. Use this method to do some clean-up when the tool is switched. Subclassers should always call super.deactivate.
      • mouseDown

        void mouseDown(java.awt.event.MouseEvent e,
                       int x,
                       int y)
        Handles mouse down events in the drawing view.
      • mouseDrag

        void mouseDrag(java.awt.event.MouseEvent e,
                       int x,
                       int y)
        Handles mouse drag events in the drawing view.
      • mouseUp

        void mouseUp(java.awt.event.MouseEvent e,
                     int x,
                     int y)
        Handles mouse up in the drawing view.
      • mouseMove

        void mouseMove(java.awt.event.MouseEvent evt,
                       int x,
                       int y)
        Handles mouse moves (if the mouse button is up).
      • keyDown

        void keyDown(java.awt.event.KeyEvent evt,
                     int key)
        Handles key down events in the drawing view.

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.