Class BlockDiagramItemDelegate

java.lang.Object
com.inductiveautomation.ignition.designer.designable.JComponentItemDelegate
com.inductiveautomation.ignition.designer.blockandconnector.BlockDiagramItemDelegate
All Implemented Interfaces:
DesignableDelegate

public class BlockDiagramItemDelegate extends JComponentItemDelegate
  • Constructor Details

  • Method Details

    • isOffsettingParent

      public boolean isOffsettingParent(JComponent container)
      Description copied from interface: DesignableDelegate
      Tests whether this container is an offsetting parent or not
    • isMovable

      public boolean isMovable(JComponent item)
      Description copied from interface: DesignableDelegate
      Defines whether or not an item is inherently movable or not. Note that a normally movable object that is currently "locked" would still return true for this function.
    • isLocked

      public boolean isLocked(JComponent item)
      Description copied from interface: DesignableDelegate
      Returns whether a normally movable object is currently locked or not
    • isRotateCapable

      public boolean isRotateCapable(JComponent item)
      Description copied from interface: DesignableDelegate
      Returns whether or not an item supports being rotated.
    • isContainer

      public boolean isContainer(JComponent item)
      Description copied from interface: DesignableDelegate
      Determines whether any given object is a container. That is - whether it contains other selectable objects inside itself.
      Parameters:
      item - The item to test
      Returns:
      true if item is a container.
    • findObjectsAt

      public List<JComponent> findObjectsAt(DesignableContainer container, Point point)
      Description copied from interface: DesignableDelegate
      Performs a basic "hit-test" to find objects in a container underneath a point.
      point - The point in question, relative to the DesignableContainer
    • getParent

      public JComponent getParent(JComponent child)
      Description copied from interface: DesignableDelegate
      Finds the given item's parent in the container hierarchy
    • scaleObject

      public void scaleObject(JComponent object, Rectangle2D newBounds)
      Description copied from interface: DesignableDelegate
      Scale the given item to the new bounds. Bounds location is relative to its parent. This is used for realtime, transient scales, so it shouldn't add an undo action.
    • rotateObject

      public void rotateObject(JComponent object, double angle, Point2D rotationAnchor)
      Description copied from interface: DesignableDelegate
      Rotate the object around the given point by the angle specified.
      Parameters:
      object - The object to rotate.
      angle - The angle to rotate, specified in radians.
      rotationAnchor - The rotation center, relative to the object's parent.
    • setZOrderPosition

      public void setZOrderPosition(JComponent item, int position)
    • getBounds

      public Rectangle2D getBounds(JComponent source, JComponent relativeTo, Rectangle2D rect)
      Description copied from interface: DesignableDelegate
      Fetch the current bounds of the given item, relative to the supplied JComponent. If the rect argument is null, a new Rectangle should be instantiated and returned. Otherwise, rect should be modified and returned to avoid unnecessary Rectangle instantiation, because this function is called very frequently.
      Specified by:
      getBounds in interface DesignableDelegate
      Overrides:
      getBounds in class JComponentItemDelegate
    • moveObject

      public void moveObject(JComponent object, Point2D newLocation)
      Description copied from interface: DesignableDelegate
      Move the given item to the new location. Location is relative to its parent. This is used for realtime, transient moves, so it shouldn't add an undo action.
    • notifyObjectsMoved

      public void notifyObjectsMoved(List<JComponent> objects, Map<JComponent,Rectangle2D> originalPositions)
    • notifyObjectsRotated

      public void notifyObjectsRotated(List<JComponent> objects, double angle, Point2D rotationAnchor)
    • copyMove

      public void copyMove(List<JComponent> objects, double dX, double dY)
    • addObject

      public void addObject(JComponent parent, JComponent newChild, Rectangle2D newBounds)
      Description copied from interface: DesignableDelegate
      Adds the child into the given parent (which must be a container) at the given bounds, relative to the parent. If the bounds rectangle is null, then the component is assumed to already have it's location set on it.