Class AbstractShapeHandle

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.awt.Shape drawShape
      The shape that represents this IHandle.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected AbstractShapeHandle()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      java.awt.Rectangle getBounds​(DesignPanel panel)
      Return the bounds of this handle, in 2d (zoomed) space.
      java.lang.String getStatusBarText​(int inputMask)
      Called on mouseover and during drag to get the status bar text for the handle.
      protected java.awt.Shape newDrawShape()
      Called to create a new draw shape.
      void onClick​(int inputMask)
      The mouse was clicked within the handle's bounds.
      void onDrag​(double dX, double dY, int inputMask)
      Called while the handle is being dragged.
      void onDragEnd​(double dX, double dY, int inputMask)
      The drag event is complete (mouse has been released).
      void onDragStart​(double dX, double dY, int inputMask)
      The handle has started to be dragged.
      void paintHandle​(DesignPanel panel, java.awt.Graphics2D g, ShapePaint paint)  
      protected abstract void position​(java.awt.geom.Point2D.Double location)
      Updates the argument location with the correct position of this handle's anchor point.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface com.inductiveautomation.ignition.designer.designable.IHandle

        paintHandle
    • Field Detail

      • drawShape

        protected java.awt.Shape drawShape
        The shape that represents this IHandle. Initialized in newDrawShape()
    • Constructor Detail

      • AbstractShapeHandle

        protected AbstractShapeHandle()
    • Method Detail

      • paintHandle

        public void paintHandle​(DesignPanel panel,
                                java.awt.Graphics2D g,
                                ShapePaint paint)
      • newDrawShape

        protected java.awt.Shape newDrawShape()
        Called to create a new draw shape. Expectation is that a subclass will override this to provide a meaningful shape. Anchor point is at (0,0). Default shape is a 10x10 square anchored in the center.
      • getBounds

        public java.awt.Rectangle getBounds​(DesignPanel panel)
        Description copied from interface: IHandle
        Return the bounds of this handle, in 2d (zoomed) space.
        Specified by:
        getBounds in interface IHandle
      • position

        protected abstract void position​(java.awt.geom.Point2D.Double location)
        Updates the argument location with the correct position of this handle's anchor point. Must be in logical (unzoomed) coordinates.
      • getStatusBarText

        public java.lang.String getStatusBarText​(int inputMask)
        Description copied from interface: IHandle
        Called on mouseover and during drag to get the status bar text for the handle.
        Specified by:
        getStatusBarText in interface IHandle
      • onClick

        public void onClick​(int inputMask)
        Description copied from interface: IHandle
        The mouse was clicked within the handle's bounds.
        Specified by:
        onClick in interface IHandle
      • onDrag

        public void onDrag​(double dX,
                           double dY,
                           int inputMask)
        Description copied from interface: IHandle
        Called while the handle is being dragged.
        Specified by:
        onDrag in interface IHandle
        Parameters:
        dX - The distance along the horizontal axis away from the drag starting point. (Unzoomed, logical)
        dY - The distance along the vertical axis away from the drag starting point. (Unzoomed, logical)
        inputMask - The extended modifiers from the underlying mouse drag (see MouseEvent.getModifiersEx().)
      • onDragStart

        public void onDragStart​(double dX,
                                double dY,
                                int inputMask)
        Description copied from interface: IHandle
        The handle has started to be dragged.
        Specified by:
        onDragStart in interface IHandle
        Parameters:
        dX - The distance along the horizontal axis away from the drag starting point. (Unzoomed, logical)
        dY - The distance along the vertical axis away from the drag starting point. (Unzoomed, logical)
        inputMask - The extended modifiers from the underlying mouse drag (see MouseEvent.getModifiersEx().)
      • onDragEnd

        public void onDragEnd​(double dX,
                              double dY,
                              int inputMask)
        Description copied from interface: IHandle
        The drag event is complete (mouse has been released).
        Specified by:
        onDragEnd in interface IHandle
        Parameters:
        dX - The distance along the horizontal axis away from the drag starting point. (Unzoomed, logical)
        dY - The distance along the vertical axis away from the drag starting point. (Unzoomed, logical)
        inputMask - The extended modifiers from the underlying mouse drag (see MouseEvent.getModifiersEx().)