public abstract class GElement extends Object implements XJXMLSerializable
| Modifier and Type | Field and Description |
|---|---|
static String |
ANCHOR_BOTTOM |
static String |
ANCHOR_CENTER |
static String |
ANCHOR_LEFT |
static String |
ANCHOR_RIGHT |
static String |
ANCHOR_TOP |
protected Map<String,Anchor2D> |
anchors |
protected Color |
color |
protected boolean |
draggable |
protected List<GElement> |
elements |
protected boolean |
focused |
protected String |
label |
protected Color |
labelColor |
protected boolean |
labelVisible |
protected Object |
lock |
protected Vector2D |
oldPosition |
protected int |
penSize |
protected Vector2D |
position |
protected boolean |
selected |
protected BasicStroke |
strokeBold |
protected BasicStroke |
strokeNormal |
protected BasicStroke |
strokeSize |
protected GView |
view |
| Constructor and Description |
|---|
GElement() |
public static final String ANCHOR_CENTER
public static final String ANCHOR_TOP
public static final String ANCHOR_BOTTOM
public static final String ANCHOR_LEFT
public static final String ANCHOR_RIGHT
protected transient GView view
protected Vector2D position
protected transient Vector2D oldPosition
protected String label
protected Color labelColor
protected boolean labelVisible
protected transient boolean selected
protected transient boolean focused
protected transient Color color
protected transient int penSize
protected transient BasicStroke strokeSize
protected transient BasicStroke strokeNormal
protected transient BasicStroke strokeBold
protected boolean draggable
protected final Object lock
public void setPanel(GView view)
public void setLabel(String label)
public String getLabel()
public boolean isLabelEqualsTo(String otherLabel)
public void setLabelColor(Color color)
public Color getLabelColor()
public void setLabelVisible(boolean flag)
public boolean isLabelVisible()
public void setPosition(double x,
double y)
public double getPositionX()
public double getPositionY()
public void setPosition(Vector2D position)
public Vector2D getPosition()
public void addElement(GElement element)
public void removeElement(GElement element)
public GElement getFirstElement()
public GElement getLastElement()
public void updateAnchors()
public double getDefaultAnchorOffset(String anchorKey)
public Rect bounds()
public Rect getFrame()
public void setFocused(boolean flag)
public boolean isFocused()
public void setSelected(boolean flag)
public boolean isSelected()
public boolean acceptIncomingLink()
public boolean acceptOutgoingLink()
public void setDraggable(boolean flag)
public boolean isDraggable()
public void setColor(Color color)
public void setPenSize(int size)
public boolean isInside(Point p)
public void move(double dx,
double dy)
public void moveToPosition(Vector2D position)
public void beginDrag()
public void drag(Vector2D p)
public void drawRecursive(Graphics2D g)
public boolean isVisibleInClip(Graphics2D g)
public void draw(Graphics2D g)
public void drawShape(Graphics2D g)
public void elementPositionDidChange()
public void elementDimensionDidChange()
public void elementDidLoad()
Copyright © 2013. All rights reserved.