|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mindfusion.diagramming.DiagramItem
com.mindfusion.diagramming.DiagramNode
com.mindfusion.diagramming.ControlNode
public class ControlNode
ControlNode is an adapter class that enables using any java.awt.Component -derived object as a diagram node.
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, modifyDX, modifyDY, modifyHandle, modifying, pen, ptEnd, ptMdfLast, ptOrg, ptSavedEnd, ptSavedOrg, subordinateGroup |
Constructor Summary | |
---|---|
ControlNode()
Initializes a new instance of the ControlNode class. |
|
ControlNode(ControlNode prototype)
Initializes a new instance of the ControlNode class using the specified control node as a prototype. |
|
ControlNode(Diagram parent)
Initializes a new instance of the ControlNode class
with default values supplied form the specified Diagram . |
|
ControlNode(DiagramView diagramView)
Initializes a new instance of the ControlNode class. |
|
ControlNode(DiagramView diagramView,
java.awt.Component control)
Initializes a new instance of the ControlNode class. |
Method Summary | |
---|---|
protected DiagramItemProperties |
createProperties()
DiagramItem.createProperties() override. |
protected void |
drawLocal(java.awt.Graphics2D g,
RenderOptions options)
DiagramItem.drawShadow(java.awt.Graphics2D, com.mindfusion.diagramming.RenderOptions) override. |
java.awt.Component |
getControl()
Gets the java.awt.Component hosted inside this node. |
int |
getMouseInputMode()
Gets whether mouse input is processed by the diagram or the hosted control. |
protected void |
loadFromXml(org.w3c.dom.Element xmlElement,
XmlPersistContext context)
Loads the item content from an XML element. |
protected void |
onAdd()
DiagramItem.onAdd() override. |
protected void |
onLoad(Diagram diagram)
DiagramItem.onLoad(com.mindfusion.diagramming.Diagram) override. |
protected void |
onRemove()
DiagramItem.onRemove() override. |
protected void |
onUpdateBounds()
DiagramNode.onUpdateBounds() override. |
void |
readExternal(java.io.ObjectInput in)
Implements Externalizable. |
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 |
setControl(java.awt.Component value)
Sets the java.awt.Component that should be hosted inside this node. |
void |
setMouseInputMode(int value)
Sets whether mouse input is processed by the diagram or the hosted control. |
void |
setVisible(boolean value)
Sets a value indicating whether the node is visible. |
void |
writeExternal(java.io.ObjectOutput out)
Implements Externalizable. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ControlNode()
ControlNode
class.
public ControlNode(Diagram parent)
ControlNode
class
with default values supplied form the specified Diagram
.
parent
- The Diagram
from which to obtain default values for the node properties.public ControlNode(DiagramView diagramView)
ControlNode
class.
diagramView
- The DiagramView
that should become a parent of the hosted control.public ControlNode(ControlNode prototype)
ControlNode
class using the specified control node as a prototype.
prototype
- The node to use as a prototype. The properties of the new node are initialized from the property values of this node.public ControlNode(DiagramView diagramView, java.awt.Component control)
diagramView
- The DiagramView
that should become a parent of the hosted control.control
- The java.awt.Component that should be hosted inside this node.Method Detail |
---|
public java.awt.Component getControl()
public void setControl(java.awt.Component value)
value
- A java.awt.Component instance.public int getMouseInputMode()
MouseInputMode
enumeration.public void setMouseInputMode(int value)
value
- A member of the MouseInputMode
enumeration.public void setVisible(boolean value)
setVisible
in class DiagramItem
value
- true
if the node should be visible,
otherwise false
.protected void drawLocal(java.awt.Graphics2D g, RenderOptions options)
DiagramItem.drawShadow(java.awt.Graphics2D, com.mindfusion.diagramming.RenderOptions)
override. Draws the hosted control on the specified Graphics2D surface.
drawLocal
in class DiagramNode
g
- A Graphics2D
object where the link should be rendered.options
- A RenderOptions object specifying options for the drawing operation.
protected void onUpdateBounds()
DiagramNode.onUpdateBounds()
override.
onUpdateBounds
in class DiagramNode
protected void onAdd()
DiagramItem.onAdd()
override.
onAdd
in class DiagramItem
protected void onLoad(Diagram diagram)
DiagramItem.onLoad(com.mindfusion.diagramming.Diagram)
override.
onLoad
in class DiagramItem
protected void onRemove()
DiagramItem.onRemove()
override.
onRemove
in class DiagramNode
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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |