public class GLink extends GElement implements XJXMLSerializable
| Modifier and Type | Field and Description |
|---|---|
protected SLink |
link |
String |
pattern |
protected int |
shape |
static int |
SHAPE_ARC |
static int |
SHAPE_BEZIER |
static int |
SHAPE_ELBOW |
GElement |
source |
String |
sourceAnchorKey |
GElement |
target |
String |
targetAnchorKey |
ANCHOR_BOTTOM, ANCHOR_CENTER, ANCHOR_LEFT, ANCHOR_RIGHT, ANCHOR_TOP, anchors, color, draggable, elements, focused, label, labelColor, labelVisible, lock, oldPosition, penSize, position, selected, strokeBold, strokeNormal, strokeSize, view| Constructor and Description |
|---|
GLink() |
GLink(GElement source,
String sourceAnchorKey,
GElement target,
String targetAnchorKey,
int shape,
String pattern,
double flateness) |
GLink(GElement source,
String sourceAnchorKey,
GElement target,
String targetAnchorKey,
int shape,
String pattern,
Point mouse,
double flateness) |
acceptIncomingLink, acceptOutgoingLink, addElement, beginDrag, bounds, drag, dragElementPosition, drawRecursive, elementDidLoad, elementDimensionDidChange, elementPositionDidChange, findElementWithLabel, getAnchor, getAnchorClosestToPoint, getAnchorKeyClosestToPoint, getDefaultAnchorOffset, getElements, getFirstElement, getLabel, getLabelColor, getLastElement, getPosition, getPositionX, getPositionY, isDraggable, isFocused, isLabelEqualsTo, isSelected, isVisibleInClip, match, move, moveToPosition, removeElement, setAnchor, setColor, setDraggable, setElements, setFocused, setPanel, setPenSize, setPosition, setPosition, setSelected, toString, updateAnchorspublic static final int SHAPE_ARC
public static final int SHAPE_ELBOW
public static final int SHAPE_BEZIER
public GElement source
public GElement target
public String sourceAnchorKey
public String targetAnchorKey
public String pattern
protected SLink link
protected int shape
public GLink()
public GLink(GElement source, String sourceAnchorKey, GElement target, String targetAnchorKey, int shape, String pattern, Point mouse, double flateness)
public void setBezierControlPoints(Vector2D[] points)
public void setBezierLabelPosition(Vector2D position)
protected SLink createLinkInstance()
protected void initializeLink(double flateness)
public void setSource(GElement source)
public GElement getSource()
public void setTarget(GElement target)
public GElement getTarget()
public void setSourceAnchorKey(String key)
public String getSourceAnchorKey()
public void setTargetAnchorKey(String key)
public String getTargetAnchorKey()
public void setSourceTangentOffset(double offset)
public void setTargetTangentOffset(double offset)
public void setSourceOffset(double x,
double y)
public void setSourceOffset(Vector2D offset)
public void setTargetOffset(double x,
double y)
public void setTargetOffset(Vector2D offset)
public void setLink(SLink link)
public SLink getLink()
public void setPattern(String pattern)
public String getPattern()
public void setLabelColor(Color color)
setLabelColor in class GElementpublic void setLabelVisible(boolean flag)
setLabelVisible in class GElementpublic boolean isLabelVisible()
isLabelVisible in class GElementpublic void setShape(int type)
public int getShape()
public void toggleShape()
public void setMousePosition(Point mouse)
public void update()
public void draw(Graphics2D g)
public void drawShape(Graphics2D g)
Copyright © 2013. All rights reserved.