|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.mindfusion.diagramming.DiagramItem com.mindfusion.diagramming.DiagramNode com.mindfusion.diagramming.ContainerNode
public class ContainerNode
Implements nodes that can contain other nodes.
Field Summary |
---|
Fields inherited from class com.mindfusion.diagramming.DiagramNode |
---|
allowIncomingLinks, allowOutgoingLinks, anchorPattern, AV_Cancel, AV_EndModIncoming, AV_EndModOutgoing, AV_StartModIncoming, AV_StartModOutgoing, AV_UpdateIncoming, AV_UpdateOutgoing, AV_UpdIntscIncoming, AV_UpdIntscOutgoing, AV_UpdPosIncoming, AV_UpdPosOutgoing, bounds, enabledHandles, handlesStyle, incomingLinks, masterGroup, obstacle, outgoingLinks, savedBounds |
Fields inherited from class com.mindfusion.diagramming.DiagramItem |
---|
brush, cycleDetected, cycleProtect, font, hyperLink, ignoreLayout, locked, modifyDX, modifyDY, modifyHandle, modifying, pen, printable, ptEnd, ptMdfLast, ptOrg, ptSavedEnd, ptSavedOrg, selected, shadowColor, shadowOffsetX, shadowOffsetY, subordinateGroup, tag, toolTip, visible, zIndex |
Constructor Summary | |
---|---|
ContainerNode()
Initializes a new instance of the ContainerNode class. |
|
ContainerNode(ContainerNode prototype)
Initializes a new instance of the ContainerNode class using the specified node as a prototype. |
|
ContainerNode(Diagram parent)
Initializes a new instance of the ContainerNode class with the default values of the specified diagram. |
Method Summary | |
---|---|
void |
add(DiagramNode node)
Adds a node to this container. |
protected DiagramItemProperties |
createProperties()
DiagramItem.createProperties() override. |
void |
draw(java.awt.Graphics2D graphics,
RenderOptions options)
Draws the container on the specified Graphics2D surface. |
void |
drawShadow(java.awt.Graphics2D graphics,
RenderOptions options)
Draws the shadow of this container on the specified Graphics2D surface. |
boolean |
getAutoShrink()
Gets a value indicating whether the container should shrink in size when nodes are removed from it. |
java.lang.String |
getCaption()
Gets the container's caption text. |
java.awt.Color |
getCaptionColor()
Gets the color in which caption's text is rendered. |
TextFormat |
getCaptionFormat()
Gets the caption alignment and format. |
float |
getCaptionHeight()
Gets the height of the container's caption area. |
static ContainerNode |
getContainer(DiagramNode node)
Retrieves the container node (if any) the specified node belongs to. |
java.awt.geom.Rectangle2D |
getEditRect(java.awt.geom.Point2D mousePosition)
Implements InplaceEditable . |
boolean |
getFoldable()
Gets a value indicating whether the user is allowed to fold this container. |
boolean |
getFolded()
Gets a value indicating whether this container is folded. |
Pen |
getHighlightPen()
Gets the Pen used to draw the container frame lines
when an item is dragged over the container. |
float |
getMargin()
Gets how much space should be left between contained nodes and the container borders. |
java.awt.geom.Dimension2D |
getMinimumSize()
Gets the minimum size of the container. |
java.lang.String |
getTextToEdit()
Implements InplaceEditable . |
boolean |
getVisible()
Gets a value indicating whether the container is visible. |
int |
hitTestHandle(java.awt.geom.Point2D point)
DiagramNode.hitTestHandle(java.awt.geom.Point2D) override. |
protected void |
loadFromXml(org.w3c.dom.Element xmlElement,
XmlPersistContext context)
Loads the item content from an XML element. |
protected void |
onChildModified(DiagramNode node,
int handle)
Called when a group child node has been modified. |
void |
onDragOut(DiagramItem item)
Invoked when a diagram item is being dragged out of this node. |
boolean |
onDragOver(DiagramItem item)
Invoked when a diagram item is being dragged over this node. |
boolean |
onDropOver(DiagramItem item)
Invoked when a diagram item is dropped over this node. |
void |
readExternal(java.io.ObjectInput in)
Implements Externalizable. |
void |
remove(DiagramNode node)
Removes a node from this container. |
protected void |
restoreProperties(DiagramItemProperties props)
DiagramItem.restoreProperties(com.mindfusion.diagramming.DiagramItemProperties) override. |
protected void |
saveProperties(DiagramItemProperties props)
DiagramItem.saveProperties(com.mindfusion.diagramming.DiagramItemProperties) override. |
protected void |
saveToXml(org.w3c.dom.Element xmlElement,
XmlPersistContext context)
Saves the item content into an XML element. |
void |
setAutoShrink(boolean value)
Sets a value indicating whether the container should shrink in size when nodes are removed from it. |
void |
setCaption(java.lang.String value)
Sets the container's caption text. |
void |
setCaptionColor(java.awt.Color value)
Sets or sets the color in which caption's text is rendered. |
void |
setCaptionFormat(TextFormat value)
Sets the caption alignment and format. |
void |
setCaptionHeight(float value)
Sets the height of the container's caption area. |
void |
setEditedText(java.lang.String newText)
Implements InplaceEditable . |
void |
setFoldable(boolean value)
Sets a value indicating whether the user is allowed to fold this container. |
void |
setFolded(boolean value)
Sets a value indicating whether this container is folded. |
void |
setHighlightPen(Pen value)
Sets the Pen used to draw the container frame lines
when an item is dragged over the container. |
void |
setMargin(float value)
Sets how much space should be left between contained nodes and the container borders. |
void |
setMinimumSize(java.awt.geom.Dimension2D value)
Sets the minimum size of the container. |
void |
setVisible(boolean value)
Sets a value indicating whether the container is visible. |
void |
updateBounds()
Updates the container bounds to fit its contents. |
void |
writeExternal(java.io.ObjectOutput out)
Implements Externalizable. |
Methods inherited from class com.mindfusion.diagramming.DiagramItem |
---|
clone, getBrush, getFont, getHyperLink, getIgnoreLayout, getLayoutTraits, getLocked, getMeasureUnit, getParent, getPen, getPrintable, getSelected, getShadowColor, getShadowOffsetX, getShadowOffsetY, getSubordinateGroup, getTag, getToolTip, getWeight, getZIndex, hasSubordinates, onAdd, onChangeFont, onClick, onDoubleClick, onModify, putSelected, repaint, repaint, repaint, setBrush, setDiagramDirty, setFont, setHyperLink, setIgnoreLayout, setLocked, setPen, setPrintable, setSelected, setShadowColor, setShadowOffsetX, setShadowOffsetY, setTag, setToolTip, setWeight, setZIndex, shouldRender, zBottom, zLevelDown, zLevelUp, zTop |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ContainerNode()
public ContainerNode(Diagram parent)
public ContainerNode(ContainerNode prototype)
Method Detail |
---|
public void add(DiagramNode node)
node
- The DiagramNode that should be added to the container.public void remove(DiagramNode node)
node
- The DiagramNode
that should be removed from the container.public void draw(java.awt.Graphics2D graphics, RenderOptions options)
draw
in class DiagramItem
graphics
- A Graphics2D object where the node should be rendered.options
- Provides options for the drawing operation.public void drawShadow(java.awt.Graphics2D graphics, RenderOptions options)
drawShadow
in class DiagramItem
graphics
- A Graphics2D object where the shadow should be rendered.options
- Provides options for the drawing operation.public int hitTestHandle(java.awt.geom.Point2D point)
DiagramNode.hitTestHandle(java.awt.geom.Point2D)
override.
point
- A Point2D value specifying where to look for a selection handle.
public boolean onDragOver(DiagramItem item)
onDragOver
in class DiagramNode
item
- The DiagramItem
being dragged.
public void onDragOut(DiagramItem item)
onDragOut
in class DiagramNode
item
- The DiagramItem
being dragged.public boolean onDropOver(DiagramItem item)
onDropOver
in class DiagramNode
item
- The DiagramItem
being dragged.
protected void onChildModified(DiagramNode node, int handle)
onChildModified
in class DiagramItem
node
- The DiagramNode
that has been moved or resized.handle
- An AdjustmentHandles
constant indicating
which handle has been used to modify the node.public void updateBounds()
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
writeExternal
in class DiagramNode
java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
readExternal
in class DiagramNode
java.io.IOException
java.lang.ClassNotFoundException
protected void saveToXml(org.w3c.dom.Element xmlElement, XmlPersistContext context)
saveToXml
in class DiagramNode
xmlElement
- An Element the item's data should be stored into.context
- Provides contextual information about the serialization
process and some helper serialization methods.protected void loadFromXml(org.w3c.dom.Element xmlElement, XmlPersistContext context) throws javax.xml.transform.TransformerException, XmlException
loadFromXml
in class DiagramNode
xmlElement
- An Element containing the item's data.context
- Provides contextual information about the serialization
process and some helper serialization methods.
javax.xml.transform.TransformerException
XmlException
protected DiagramItemProperties createProperties()
DiagramItem.createProperties()
override.
createProperties
in class DiagramNode
protected void saveProperties(DiagramItemProperties props)
DiagramItem.saveProperties(com.mindfusion.diagramming.DiagramItemProperties)
override.
saveProperties
in class DiagramNode
props
- A DiagramItemProperties-derived object where
the item's properties should be saved.protected void restoreProperties(DiagramItemProperties props)
DiagramItem.restoreProperties(com.mindfusion.diagramming.DiagramItemProperties)
override.
restoreProperties
in class DiagramNode
props
- A DiagramItemProperties -derived object containing a
snapshot of the item's properties.public java.lang.String getTextToEdit()
InplaceEditable
.
getTextToEdit
in interface InplaceEditable
public void setEditedText(java.lang.String newText)
InplaceEditable
.
setEditedText
in interface InplaceEditable
public java.awt.geom.Rectangle2D getEditRect(java.awt.geom.Point2D mousePosition)
InplaceEditable
.
getEditRect
in interface InplaceEditable
public static ContainerNode getContainer(DiagramNode node)
node
- The DiagramNode
whose container you need to find.
ContainerNode
that contains the specified node,
or null if the node is not contained.public Pen getHighlightPen()
Pen
used to draw the container frame lines
when an item is dragged over the container.
public void setHighlightPen(Pen value)
Pen
used to draw the container frame lines
when an item is dragged over the container.
public float getMargin()
public void setMargin(float value)
public java.awt.geom.Dimension2D getMinimumSize()
public void setMinimumSize(java.awt.geom.Dimension2D value)
public java.lang.String getCaption()
public void setCaption(java.lang.String value)
public java.awt.Color getCaptionColor()
public void setCaptionColor(java.awt.Color value)
public float getCaptionHeight()
public void setCaptionHeight(float value)
public TextFormat getCaptionFormat()
public void setCaptionFormat(TextFormat value)
public boolean getFolded()
public void setFolded(boolean value)
public boolean getFoldable()
public void setFoldable(boolean value)
public boolean getAutoShrink()
public void setAutoShrink(boolean value)
public boolean getVisible()
getVisible
in class DiagramItem
true
if the item is visible,
otherwise false
.public void setVisible(boolean value)
setVisible
in class DiagramItem
value
- true
if the item should be visible,
otherwise false
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |