public abstract class AttachedNodeHandler
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
RESIZE_EAST |
static int |
RESIZE_NORTH |
static int |
RESIZE_SOUTH |
static int |
RESIZE_WEST |
Constructor and Description |
---|
AttachedNodeHandler() |
Modifier and Type | Method and Description |
---|---|
void |
attach(ProcessNode source,
AttachedNode target)
Attaches the target AttachedNode to the source ProcessNode.
|
void |
detach(AttachedNode target)
Detaches the target AttachedNode from any source ProcessNode.
|
abstract boolean |
isAttachable(ProcessNode source,
AttachedNode target)
Returns true if the target ProcessNode can be attached to the source
ProcessNode at their current positions.
|
void |
sourceMoved(ProcessNode source,
java.util.List<AttachedNode> attachedNodes,
int xDiff,
int yDiff)
Is called each time the source ProcessNode is moved.
|
void |
sourceResized(ProcessNode oldSource,
ProcessNode newSource,
java.util.List<AttachedNode> attachedNodes,
int direction)
Is called each time the source ProcessNode is resized.
|
public static final int RESIZE_NORTH
public static final int RESIZE_SOUTH
public static final int RESIZE_EAST
public static final int RESIZE_WEST
public abstract boolean isAttachable(ProcessNode source, AttachedNode target)
source
- target
- public void attach(ProcessNode source, AttachedNode target)
source
- target
- public void detach(AttachedNode target)
target
- public void sourceMoved(ProcessNode source, java.util.List<AttachedNode> attachedNodes, int xDiff, int yDiff)
source
- - can be used by subclassespublic void sourceResized(ProcessNode oldSource, ProcessNode newSource, java.util.List<AttachedNode> attachedNodes, int direction)
oldSource
- newSource
- attachedNodes
- direction
- One of RESIZE_{NORTH,SOUTH,EAST,WEST}