public class Drawing.RootElement extends BranchElement
changeLock, children, ptsX, ptsY
attributeSet, parent, view
ARROW_GLOBAL_SCALE_LENGTH, ARROW_GLOBAL_SCALE_WIDTH, ARROW_INSET_SCALE, ARROW_LENGTH_SCALE, ARROW_WIDTH_LINEWIDTH_SCALE, ARROW_WIDTH_MINIMUM_MM, BRACKET_LENGTH_SCALE, CROSSHATCH, CROSSHATCH_FILLED, DASH_OPAQUE, DASH_TRANSPARENT, DASH1, DASH2, DASH3, DASHED, DIMEN, DOT_SEP, DOT_SEP1, DOT_SEP2, DOT_SEP3, DOTTED, DOUBLE_COLOR, DOUBLE_LINE, DOUBLE_SEP, FILL_COLOR, FILL_STYLE, HATCH_ANGLE, HATCH_COLOR, HATCH_SEP, HATCH_WIDTH, HLINES, HLINES_FILLED, INNER, LEFT_ARROW, LINE_COLOR, LINE_STYLE, LINE_WIDTH, MIDDLE, NONE, OUTER, OVER_STRIKE, OVER_STRIKE_COLOR, OVER_STRIKE_WIDTH, POLYDOTS_ANGLE, POLYDOTS_CIRCLE, POLYDOTS_DISK, POLYDOTS_PENTAGON, POLYDOTS_PENTAGON_FILLED, POLYDOTS_PLUS, POLYDOTS_SCALE_H, POLYDOTS_SCALE_V, POLYDOTS_SIZE_LINEWIDTH_SCALE, POLYDOTS_SIZE_MINIMUM_MM, POLYDOTS_SQUARE, POLYDOTS_SQUARE_FILLED, POLYDOTS_STYLE, POLYDOTS_SUPERIMPOSE, POLYDOTS_TRIANGLE, POLYDOTS_TRIANGLE_FILLED, PS_POINT, PST_CUSTOM, RBRACKET_LENGTH_SCALE, RIGHT_ARROW, SHADOW, SHADOW_ANGLE, SHADOW_COLOR, SHADOW_SIZE, SOLID, TBAR_WIDTH_LINEWIDTH_SCALE, TBAR_WIDTH_MINIMUM_MM, TEXT_BOX_CIRCLE, TEXT_BOX_NO_FRAME, TEXT_BOX_OVAL, TEXT_BOX_RECTANGLE, TEXT_FRAME, TEXT_HALIGN_CENTER, TEXT_HALIGN_LEFT, TEXT_HALIGN_RIGHT, TEXT_HOR_ALIGN, TEXT_ROTATION, TEXT_VALIGN_BASELINE, TEXT_VALIGN_BOTTOM, TEXT_VALIGN_CENTER, TEXT_VALIGN_TOP, TEXT_VERT_ALIGN, VLINES, VLINES_FILLED
Constructor and Description |
---|
Drawing.RootElement()
Construct a new empty RootElement
|
Drawing.RootElement(BranchElement e)
construct a new RootElement whose content is initialized from the content of the given BranchElement
Children are cloned beforehands, so it's perfectly safe to use this constructor when one
doesn't want to modify the initial content of the given BranchElement.
|
Drawing.RootElement(java.util.Collection c)
create a new BranchElement from the content of the given Collection of Element's.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Returns a clone of this Element
|
protected void |
fireChangedUpdate(DrawingEvent.EventType eventType)
Called each time the content of this RootElement has changed.
|
void |
forwardChangedUpdate(Element child,
DrawingEvent.EventType eventType)
Called by a child to inform of some change that occured to it or one of its children.
|
Drawing |
getDrawing()
Retrieves the underlying drawing
Overriden to return this.
|
int |
getFirstPointIndex()
Return 0
|
int |
getLastPointIndex()
Return 0
|
java.lang.String |
getName()
Return a non-localised string representing this element's name.
|
Element |
getParent()
Gets the parent of the element.
|
PicPoint |
getPoint(int numPoint,
PicPoint src)
return null
|
void |
setParent(Element p)
Sets the parent of the element.
|
void |
setPoint(int numPoint,
PicPoint src)
Deprecated.
use setPoint(int, PicPoint, EditPointConstraint) instead
|
void |
setPoint(int numPoint,
PicPoint src,
EditPointConstraint c)
does nothing
|
add, addAll, addChild, addChild, bringBackward, bringForward, bringToBack, bringToFront, children, clear, contains, contains, containsAll, containsClass, createFilteredCollection, equals, getAllowsChildren, getBoundingBox, getChildAt, getChildCount, getChildIndex, getPointX, getPointY, isEmpty, isToBack, isToFront, iterator, remove, removeAll, removeAllChildren, removeChild, removeView, replaceChild, retainAll, rotate, scale, scale, setAttribute, setAttributeSet, setViewFromFactory, shear, size, toArray, toArray, toString, translate, updateBoundingBox
anchorPointsIterator, getAttribute, getAttributeSet, getView
public Drawing.RootElement()
public Drawing.RootElement(BranchElement e)
The
- Drawing object to clonepublic Drawing.RootElement(java.util.Collection c)
public java.lang.String getName()
Element
public java.lang.Object clone()
AbstractElement
clone
in interface Element
clone
in class BranchElement
public Drawing getDrawing()
getDrawing
in interface Element
getDrawing
in class AbstractElement
public Element getParent()
getParent
in interface Element
getParent
in class AbstractElement
public void setParent(Element p)
setParent
in interface Element
setParent
in class AbstractElement
protected void fireChangedUpdate(DrawingEvent.EventType eventType)
fireChangedUpdate
in class AbstractElement
public void forwardChangedUpdate(Element child, DrawingEvent.EventType eventType)
child
as the element that changed.
This mainly occurs when the geometry of an element is modified.forwardChangedUpdate
in interface Element
forwardChangedUpdate
in class BranchElement
child
- the child that sent the change-event.eventType
- the event typepublic PicPoint getPoint(int numPoint, PicPoint src)
getPoint
in interface Element
getPoint
in class BranchElement
numPoint
- the point index, should be greater or equal to the value returned by
getFirstPointIndex
, and lower or equal to getLastPointIndex
.numPoint
;
if src
is null, allocates a new PicPoint and return it,
otherwise directly modifies src
and returns it as well for convenience.public void setPoint(int numPoint, PicPoint src)
setPoint
in interface Element
setPoint
in class BranchElement
public void setPoint(int numPoint, PicPoint src, EditPointConstraint c)
setPoint
in interface Element
setPoint
in class BranchElement
c
- a geometry constraint, or null if no particular constraint is being imposed (aka default).public int getFirstPointIndex()
getFirstPointIndex
in interface Element
getFirstPointIndex
in class BranchElement
public int getLastPointIndex()
getLastPointIndex
in interface Element
getLastPointIndex
in class BranchElement
Submit a bug : syd@jpicedt.org