|
|
||||||||||
| 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 Elementclone in class BranchElementpublic Drawing getDrawing()
getDrawing in interface ElementgetDrawing in class AbstractElementpublic Element getParent()
getParent in interface ElementgetParent in class AbstractElementpublic void setParent(Element p)
setParent in interface ElementsetParent in class AbstractElementprotected 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 ElementforwardChangedUpdate in class BranchElementeventType - the event typechild -
public PicPoint getPoint(int numPoint,
PicPoint src)
getPoint in interface ElementgetPoint in class BranchElementnumPoint - 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 ElementsetPoint in class BranchElement
public void setPoint(int numPoint,
PicPoint src,
EditPointConstraint c)
setPoint in interface ElementsetPoint in class BranchElementpublic int getFirstPointIndex()
getFirstPointIndex in interface ElementgetFirstPointIndex in class BranchElementpublic int getLastPointIndex()
getLastPointIndex in interface ElementgetLastPointIndex in class BranchElement
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||