java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JScrollPane
com.inductiveautomation.ignition.designer.designable.DesignPanel
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, ScrollPaneConstants
Direct Known Subclasses:
SfcDesignPanel

public class DesignPanel extends JScrollPane
See Also:
  • Field Details

    • SNAP_THRESHOLD

      public static final int SNAP_THRESHOLD
      See Also:
    • SNAP_TO_GRID_MASK

      public static final int SNAP_TO_GRID_MASK
      See Also:
    • SNAP_TO_GUIDES_MASK

      public static final int SNAP_TO_GUIDES_MASK
      See Also:
    • SNAP_TO_ANCHORS_MASK

      public static final int SNAP_TO_ANCHORS_MASK
      See Also:
    • workspace

      protected AbstractDesignableWorkspace workspace
    • designable

      protected DesignableContainer designable
    • component

      protected JComponent component
    • layerParent

      protected com.inductiveautomation.ignition.designer.designable.DesignPanel.LayerParent layerParent
    • baseLayer

      protected com.inductiveautomation.ignition.designer.designable.DesignPanel.DesignableContainerLayer baseLayer
    • interactionLayer

      protected InteractionLayer interactionLayer
    • guideAddingListener

      protected com.inductiveautomation.ignition.designer.designable.DesignPanel.GuideAddingListener guideAddingListener
  • Constructor Details

  • Method Details

    • initRulers

      protected void initRulers()
    • getZoom

      public int getZoom()
    • setZoom

      public void setZoom(int zoom)
    • zoomIn

      public void zoomIn()
    • zoomOut

      public void zoomOut()
    • zoom

      public Rectangle zoom(Rectangle rect)
    • zoom

      public Rectangle2D zoom(Rectangle2D rect)
    • zoom

      public Shape zoom(Shape shape)
    • zoom

      public int zoom(int point)
    • zoom

      public double zoom(double point)
    • zoom

      public Point zoom(Point point)
    • zoom

      public Point2D zoom(Point2D point)
      Converts a point in logical space to a point in zoomed(2d) space
    • zoom

      public Dimension zoom(Dimension dim)
    • unzoom

      public Point unzoom(Point point)
    • unzoom

      public Point2D unzoom(Point2D point)
    • unzoom

      public Rectangle2D unzoom(Rectangle2D rect)
    • unzoom

      public Rectangle2D unzoom(Rectangle rect)
    • unzoom

      public int unzoom(int point)
    • getGuideCount

      public int getGuideCount()
    • getGuides

      public List<Guide> getGuides()
    • addGuide

      public void addGuide(Guide g)
    • removeGuide

      public void removeGuide(Guide g)
    • snapLocation

      public Point2D snapLocation(Rectangle2D rect, int userMask, Point2D point)
      Applies snap logic to the location of a rectangle. Returns a delta to apply to the rectangle as a Point of (dX,dY)
      Parameters:
      point - An existing point object to modify and return. May be null.
    • snapGrid

      public int snapGrid(int i)
      Snaps an integer to be aligned with even grid spacing, if grid-snap is on
    • snapPoint

      public int snapPoint(int point, char axis)
      Snaps a point to both guides and grid, (depending on settings for each).
      Parameters:
      point - The value of the edge to (potentially) snap
      axis - either 'y', 'x'. For top and bottom edges, use 'y', for left and right edges, use 'x'.
    • snapPoint

      public double snapPoint(double point, char axis)
      Snaps a point, much like snapPoint(int, char), except that this function uses floating point coordinates. If a point isn't snapped, then the original value is returned.
    • snapPoint

      public void snapPoint(Point2D point)
    • snapRectangle

      public void snapRectangle(Rectangle2D rect, int userMask)
      Snaps all 4 sides of a rectangle independently using guides and/or grid, depending on settings
    • getWorkspace

      public AbstractDesignableWorkspace getWorkspace()
    • getDesignable

      public DesignableContainer getDesignable()
    • getDesignableComponent

      public JComponent getDesignableComponent()
    • getInteractionLayer

      public InteractionLayer getInteractionLayer()