Class AbstractMouseTransformFactory.SelectAreaTransform

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected SelectAreaTransform()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.awt.geom.Rectangle2D getClipRectangle()
      Returns a rectangle defining the clip boundary for this mouse-transform, in model-coordinates
      java.awt.Cursor getCursor()
      Return the cursor for this MouseTransform
      java.lang.String getHelpMessage()
      Return a help-message for the UI, that makes sense with this transform.
      protected java.awt.geom.Rectangle2D getSelectionRectangle()
      Return the selection rectangle as built from the first mouse-pressed event and the current drag position.
      boolean next​(PEMouseEvent e)
      Called when the mouse is released.
      void paint​(java.awt.Graphics2D g, java.awt.geom.Rectangle2D allocation, double scale)
      render the selection rectangle
      void process​(PEMouseEvent e)
      Called when the mouse is dragged.
      void start​(PEMouseEvent e)
      Invoked by mousePressed().
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • SelectAreaTransform

        protected SelectAreaTransform()
    • Method Detail

      • getSelectionRectangle

        protected final java.awt.geom.Rectangle2D getSelectionRectangle()
        Return the selection rectangle as built from the first mouse-pressed event and the current drag position.
      • start

        public void start​(PEMouseEvent e)
        Invoked by mousePressed(). This implementation simply initializes the geometry of the selection rectangle. Override if you must carry out specific selection operations on mousePressed().
        Specified by:
        start in interface MouseTransform
      • process

        public void process​(PEMouseEvent e)
        Called when the mouse is dragged. This simply grows the selection rectangle. Override if you must carry out specific selection operations while the mouse is being dragged.
        Specified by:
        process in interface MouseTransform
      • next

        public boolean next​(PEMouseEvent e)
        Called when the mouse is released. This implementation simply repaint the selection rectangle. Override if you must carry out specific selection operations while the mouse is being released.
        Specified by:
        next in interface MouseTransform
        Returns:
        true if there's another task in the sequence, false if mouse-transform has completed with this mouse-event.
      • paint

        public void paint​(java.awt.Graphics2D g,
                          java.awt.geom.Rectangle2D allocation,
                          double scale)
        render the selection rectangle
        Specified by:
        paint in interface MouseTransform
        Parameters:
        scale - Graphics2D's current scale factor b/w model and view
      • getClipRectangle

        public java.awt.geom.Rectangle2D getClipRectangle()
        Returns a rectangle defining the clip boundary for this mouse-transform, in model-coordinates
      • getHelpMessage

        public java.lang.String getHelpMessage()
        Description copied from interface: MouseTransform
        Return a help-message for the UI, that makes sense with this transform.
        Specified by:
        getHelpMessage in interface MouseTransform
        Returns:
        a help-message for the UI, that makes sense with this transform.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        Returns:
        a textual representation of this transform for debugging purpose
      • getCursor

        public java.awt.Cursor getCursor()
        Description copied from interface: MouseTransform
        Return the cursor for this MouseTransform
        Specified by:
        getCursor in interface MouseTransform
        Returns:
        a cursor adequate with this mouse-transform, delegating to CursorFactory.