Class AnchorPoint
- java.lang.Object
-
- com.inductiveautomation.ignition.designer.blockandconnector.model.AnchorPoint
-
- Direct Known Subclasses:
JComponentAnchorPoint
public abstract class AnchorPoint extends java.lang.Object
An anchor point is a point on a block that is acceptable for either starting or ending a connector. Coordinates are relative to the block component.
-
-
Field Summary
Fields Modifier and Type Field Description protected Block
block
protected java.lang.Object
id
protected java.util.EnumSet<AnchorType>
type
-
Constructor Summary
Constructors Constructor Description AnchorPoint(java.lang.Object id, Block block, java.util.EnumSet<AnchorType> type)
Creates an anchor point at the given point, with a rectangular hotspot around it.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
abstract java.awt.Point
getAnchor()
This is the actual anchor point that a connector will start/end at.Block
getBlock()
The block that this anchor point is part ofabstract java.awt.Shape
getHotSpot()
This is the shape that counts for the mouse to begin dragging or drop onto this anchor pointjava.lang.Object
getId()
An anchor point's id must implement equals() and be unique per blockabstract java.awt.Point
getPathLeader()
This is a point near the anchor that should "lead" any path into the anchor.boolean
isConnectorOrigin()
boolean
isConnectorTerminus()
java.lang.String
toString()
-
-
-
Field Detail
-
id
protected java.lang.Object id
-
block
protected Block block
-
type
protected java.util.EnumSet<AnchorType> type
-
-
Constructor Detail
-
AnchorPoint
public AnchorPoint(java.lang.Object id, Block block, java.util.EnumSet<AnchorType> type)
Creates an anchor point at the given point, with a rectangular hotspot around it.
-
-
Method Detail
-
getId
public java.lang.Object getId()
An anchor point's id must implement equals() and be unique per block
-
getBlock
public Block getBlock()
The block that this anchor point is part of
-
getAnchor
public abstract java.awt.Point getAnchor()
This is the actual anchor point that a connector will start/end at. This point may be inside the blocks bounds.
-
getPathLeader
public abstract java.awt.Point getPathLeader()
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.
-
getHotSpot
public abstract java.awt.Shape getHotSpot()
This is the shape that counts for the mouse to begin dragging or drop onto this anchor point
-
isConnectorOrigin
public boolean isConnectorOrigin()
-
isConnectorTerminus
public boolean isConnectorTerminus()
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-