|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjpicedt.graphic.model.AbstractElement
jpicedt.graphic.model.BranchElement
jpicedt.graphic.model.Drawing.RootElement
the Element that is the root of the tree of Element's in this Drawing. Children can be directly added to this RootElement (i.e. instead of using the Drawing API), since changed-update are always forwarded to the hosting drawing.
Field Summary |
Fields inherited from class jpicedt.graphic.model.BranchElement |
changeLock, children, ptsX, ptsY |
Fields inherited from class jpicedt.graphic.model.AbstractElement |
attributeSet, parent, view |
Constructor Summary | |
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(Collection c)
create a new BranchElement from the content of the given Collection of Element's. |
Method Summary | |
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 |
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 |
Methods inherited from class jpicedt.graphic.model.BranchElement |
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 |
Methods inherited from class jpicedt.graphic.model.AbstractElement |
anchorPointsIterator, getAttribute, getAttributeSet, getView |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Collection |
hashCode |
Constructor Detail |
public Drawing.RootElement()
public Drawing.RootElement(BranchElement e)
public Drawing.RootElement(Collection c)
Method Detail |
public String getName()
Element
public 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
eventType
- the event typechild
- public 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
public int getFirstPointIndex()
getFirstPointIndex
in interface Element
getFirstPointIndex
in class BranchElement
public int getLastPointIndex()
getLastPointIndex
in interface Element
getLastPointIndex
in class BranchElement
|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |