Class JComponentAnchorPoint
- java.lang.Object
-
- com.inductiveautomation.ignition.designer.blockandconnector.model.AnchorPoint
-
- com.inductiveautomation.ignition.designer.blockandconnector.model.impl.JComponentAnchorPoint
-
public class JComponentAnchorPoint extends AnchorPoint
An anchorpoint that uses a jcomponent to define its hotspot. Anchor point is the centerpoint of the component, path leader is a delta of the centerpoint.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JComponentAnchorPoint.JComponentAnchorPointBuilder
-
Field Summary
Fields Modifier and Type Field Description protected java.awt.Rectangle
bounds
protected javax.swing.JComponent
component
protected int
exitSide
protected int
leaderSpacing
-
Fields inherited from class com.inductiveautomation.ignition.designer.blockandconnector.model.AnchorPoint
block, id, type
-
-
Constructor Summary
Constructors Constructor Description JComponentAnchorPoint(java.lang.Object id, Block block, javax.swing.JComponent component, int exitSide, int leaderSpacing, java.util.EnumSet<AnchorType> type)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static JComponentAnchorPoint.JComponentAnchorPointBuilder
builder()
Used to create a new JComponentAnchorPoint with a builder patternjava.awt.Point
getAnchor()
This is the actual anchor point that a connector will start/end at.java.awt.Shape
getHotSpot()
This is the shape that counts for the mouse to begin dragging or drop onto this anchor pointjava.awt.Point
getPathLeader()
This is a point near the anchor that should "lead" any path into the anchor.void
setComponent(javax.swing.JComponent component)
-
Methods inherited from class com.inductiveautomation.ignition.designer.blockandconnector.model.AnchorPoint
equals, getBlock, getId, isConnectorOrigin, isConnectorTerminus, toString
-
-
-
-
Constructor Detail
-
JComponentAnchorPoint
public JComponentAnchorPoint(java.lang.Object id, Block block, javax.swing.JComponent component, int exitSide, int leaderSpacing, java.util.EnumSet<AnchorType> type)
-
-
Method Detail
-
setComponent
public void setComponent(javax.swing.JComponent component)
-
getHotSpot
public java.awt.Shape getHotSpot()
Description copied from class:AnchorPoint
This is the shape that counts for the mouse to begin dragging or drop onto this anchor point- Specified by:
getHotSpot
in classAnchorPoint
-
getAnchor
public java.awt.Point getAnchor()
Description copied from class:AnchorPoint
This is the actual anchor point that a connector will start/end at. This point may be inside the blocks bounds.- Specified by:
getAnchor
in classAnchorPoint
-
getPathLeader
public java.awt.Point getPathLeader()
Description copied from class:AnchorPoint
This is a point near the anchor that should "lead" any path into the anchor. This point should fall outside the block's bounds. Any path to this anchor will pass through this point and a straight line will connect this point to the anchor point.- Specified by:
getPathLeader
in classAnchorPoint
-
builder
public static JComponentAnchorPoint.JComponentAnchorPointBuilder builder()
Used to create a new JComponentAnchorPoint with a builder pattern
-
-