|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--com.jfimagine.jfgraph.shape.base.AbstractObject
|
+--com.jfimagine.jfgraph.shape.union.JFLayer
JFLayer class. A layer is a cad layer, for multi-views of a cad graph design.
| Field Summary | |
static java.lang.String |
LAYER_NAME_DEFAULT
|
static java.lang.String |
XML_LAYER
A XML string tag represents a Layer |
static java.lang.String |
XML_NAME
A XML string tag represents name of this layer. |
static java.lang.String |
XML_VISIBLE
A XML string tag represents if this layer is visible |
| Fields inherited from class com.jfimagine.jfgraph.shape.base.AbstractObject |
m_lastError, XML_OBJECTID, XML_OBJECTTYPE |
| Constructor Summary | |
JFLayer()
Constructor for Layer |
|
| Method Summary | |
protected void |
appendChildToDOM(Element element,
JFVersion version)
Append necessary xml child for current element, this method will be called internally by toDOM. |
void |
attachRealPort()
A loadFromStream method should only load an parentId-objectId list of ports attached, So here we use an attachRealPort to ACTUALLY attach some ports to the ports in list. |
void |
bringToFront(java.util.List objList)
Send a sub-collection of this object list to front. |
void |
clearAccessTimes()
Clear access times, Clear all objects access times. |
java.lang.Object |
clone()
Creates a new object of the same class and with the same contents as this object. |
protected AbstractObject |
cloneMe()
Creates a new AbstractObject of the same class and with the same contents as this object. |
void |
draw(java.awt.Graphics g,
boolean isXorMode)
Draw current object on graphic canvas. |
boolean |
equals(java.lang.Object obj)
Determines whether or not two objects are equal. |
protected void |
extractChildFromDOM(Element element,
JFVersion version)
Extract needed xml child from current element, this method will be called internally by fromDOM. |
boolean |
finishLoadingImages(java.awt.Component canvas)
for loading an image, we need to call this finish loading image method to completely create a new image. |
Rect |
getBounds()
Get the bounds of this layer. |
java.lang.String |
getName()
Get name of this layer. |
ObjectList |
getShapeList()
Get the shape list. |
boolean |
getVisible()
Get if this layer is visible or invisible. |
AbstractObject |
groupShapes(java.util.List objList,
boolean showDesign)
Group a selection to one JFGroup object. |
int |
hashCode()
Returns the hashcode for this Object. |
void |
loadFromStream(JFReader stream,
boolean skipHead,
JFVersion version)
Load object data from a binary stream |
AbstractObject |
pickBy(java.awt.Graphics g,
JFPoint pnt)
pick up shape object by a position point. |
ObjectList |
pickBy(java.awt.Graphics g,
Rect rect)
pick up shape object by a rectangle. |
Port |
portIntersects(JFPoint pnt,
AbstractObject avoidParent)
Get which port of current shape that intersects with point pnt. |
java.util.List |
portIntersectsList(JFPoint pnt)
Get a ports list of alls hapes that intersects with point pnt. |
void |
saveToStream(JFWriter stream,
JFVersion version)
Save this object to a binary stream |
void |
sendToBack(java.util.List objList)
Send a sub-collection of this object list to back. |
void |
setName(java.lang.String name)
Set name of this layer. |
void |
setShowDesign(boolean showDesign)
set if show or hide current object's design info |
void |
setVisible(boolean visible)
Set if this layer is visible or invisible. |
void |
setZoomScale(double zoomScale)
set zoom scale |
java.lang.String |
toString()
Convert this object to String |
java.util.List |
ungroupShapes(java.util.List objList)
Ungroup a selection to individual objects. |
| Methods inherited from class com.jfimagine.jfgraph.shape.base.AbstractObject |
fromDOM, getLastError, getMaxObjectId, getObjectId, getObjectType, getXMLTag, getZoomScale, isShowDesign, setLastError, setObjectId, setObjectType, setValue, setXMLTag, toDOM |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String LAYER_NAME_DEFAULT
public static final java.lang.String XML_LAYER
public static final java.lang.String XML_VISIBLE
public static final java.lang.String XML_NAME
| Constructor Detail |
public JFLayer()
| Method Detail |
public boolean getVisible()
public void setVisible(boolean visible)
public java.lang.String getName()
public void setName(java.lang.String name)
public ObjectList getShapeList()
public Rect getBounds()
public void draw(java.awt.Graphics g,
boolean isXorMode)
g - A graphic canvas.isXorMode - If is in xor mode now.public void setShowDesign(boolean showDesign)
setShowDesign in class AbstractObject
public AbstractObject pickBy(java.awt.Graphics g,
JFPoint pnt)
g - A graphics context used to pick some graphics sensitive shapes(e.g. label)pnt - A JFPoint that intersect or contained in an AbstractObject.
public ObjectList pickBy(java.awt.Graphics g,
Rect rect)
g - A graphics context used to pick some graphics sensitive shapes(e.g. label)rect - A Rect that intersects or contains one or move AbstractObjects.
public Port portIntersects(JFPoint pnt,
AbstractObject avoidParent)
pnt - A JFPoint used to test intersection.avoidParent - A specified avoided parent to avoid connected to self.
public java.util.List portIntersectsList(JFPoint pnt)
pnt - A JFPoint used to test intersection.
public void clearAccessTimes()
public void setZoomScale(double zoomScale)
setZoomScale in class AbstractObjectzoomScale - A new zoom scale.
public AbstractObject groupShapes(java.util.List objList,
boolean showDesign)
objList - a sub collection of this object list.
public java.util.List ungroupShapes(java.util.List objList)
objList - a collection of grouped objects.
public void sendToBack(java.util.List objList)
public void bringToFront(java.util.List objList)
public java.lang.String toString()
toString in class AbstractObject
protected AbstractObject cloneMe()
throws java.lang.CloneNotSupportedException
cloneMe in class AbstractObjectjava.lang.CloneNotSupportedException
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class AbstractObjectjava.lang.CloneNotSupportedExceptionpublic int hashCode()
hashCode in class AbstractObjectpublic boolean equals(java.lang.Object obj)
equals in class AbstractObjectobj - an object to be compared with this object
protected void appendChildToDOM(Element element,
JFVersion version)
appendChildToDOM in class AbstractObjectelement - A XML element to append child xml nodesversion - A file version notification so this object can obey the rules to save data.
protected void extractChildFromDOM(Element element,
JFVersion version)
extractChildFromDOM in class AbstractObjectelement - An element used to extract needed xml childversion - A file version notification so this object can obey the rules to fetch data.
public void saveToStream(JFWriter stream,
JFVersion version)
throws java.io.IOException
saveToStream in class AbstractObjectstream - An binary output streamversion - A file version notification so this object can obey the rules to save data.
java.io.IOException
public void loadFromStream(JFReader stream,
boolean skipHead,
JFVersion version)
throws java.io.IOException
loadFromStream in class AbstractObjectstream - An binary input streamskipHead - Skip head 'TYPE' check, an shape object should always
has its own shape-type stored, if this shape-type has already been readed,
this loadFromStream should/could not read the type anymore.version - A file version notification so this object can obey the rules to fetch data.
java.io.IOExceptionpublic boolean finishLoadingImages(java.awt.Component canvas)
canvas - A component for creating an image object.public void attachRealPort()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||