public class PipelineBlock extends PropertySetBlock
Modifier and Type | Field and Description |
---|---|
static Property<java.lang.Boolean> |
MIRRORED |
LOCATION
listeners
Constructor and Description |
---|
PipelineBlock(ObservablePropertySet backingSet,
PipelineBlockPrototype prototype) |
Modifier and Type | Method and Description |
---|---|
Block |
copy(java.util.Map<java.util.UUID,java.util.UUID> newIds)
Copy the settings of this block into a new block instance.
|
java.util.Collection<AnchorPoint> |
getAnchorPoints()
The valid origins and terminus points for connectors coming into or out of this block
|
ObservablePropertySet |
getBackingSet() |
void |
getConnections(PipelineBlockModel model,
java.util.List<Connection> connections) |
AnchorPoint |
getDefaultDropAnchor(AnchorPoint oppositeAnchor)
When a connector is being dropped on this block, what anchor point should it attach to if it isn't specifically
over an anchor's hotspot (may return null)
|
java.util.UUID |
getId()
Each block in a model is identified by a UUID
|
java.awt.Point |
getLocation()
The upper left-most point of the block in the diagram.
|
Property<java.util.UUID> |
getOutput(java.lang.Object anchorId) |
PipelineBlockPrototype |
getPrototype() |
void |
initUI(BlockComponent parent)
Used to initialize the display of a block.
|
boolean |
isMirrored() |
void |
setLocation(java.awt.Point newLocation)
Don't forget to fire a change so that the UI knows the block has moved
|
void |
setMirrored(boolean mirrored) |
addBlockListener, equals, fireBlockMoved, fireUIChanged, hashCode, removeBlockListener
public static final Property<java.lang.Boolean> MIRRORED
public PipelineBlock(ObservablePropertySet backingSet, PipelineBlockPrototype prototype)
public boolean isMirrored()
public void setMirrored(boolean mirrored)
public ObservablePropertySet getBackingSet()
getBackingSet
in class PropertySetBlock
public Property<java.util.UUID> getOutput(java.lang.Object anchorId)
getOutput
in class PropertySetBlock
public void getConnections(PipelineBlockModel model, java.util.List<Connection> connections)
getConnections
in class PropertySetBlock
public PipelineBlockPrototype getPrototype()
public java.util.UUID getId()
Block
public java.awt.Point getLocation()
Block
public void setLocation(java.awt.Point newLocation)
Block
public Block copy(java.util.Map<java.util.UUID,java.util.UUID> newIds)
Block
newIds
- a map of all new ids for copied blocks (including this one). Should be used to point outgoing
connections to blocks in the copied set to their new ids.public java.util.Collection<AnchorPoint> getAnchorPoints()
Block
public AnchorPoint getDefaultDropAnchor(AnchorPoint oppositeAnchor)
Block
oppositeAnchor
- The anchor point that would be the opposite anchor on the connector being hovered over
this block.public void initUI(BlockComponent parent)
Block