public class ControlNode extends 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, savedBoundsbrush, cycleDetected, cycleProtect, modifyDX, modifyDY, modifyHandle, modifying, pen, ptEnd, ptMdfLast, ptOrg, ptSavedEnd, ptSavedOrg, subordinateGroup| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
protected DiagramItemProperties |
createProperties()
DiagramItem.createProperties() override. |
protected void |
drawLocal(java.awt.Graphics2D g,
RenderOptions options)
|
java.awt.Component |
getControl()
Gets the java.awt.Component hosted inside this node.
|
MouseInputMode |
getMouseInputMode()
Gets whether mouse input is processed by the diagram or the hosted control.
|
ControlNodeBuilder |
init()
Returns a ControlNodeBuilder object used to configure this ControlNode instance.
|
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)
|
protected void |
onRemove()
DiagramItem.onRemove() override. |
protected void |
onUpdateBounds(java.awt.geom.Rectangle2D oldBounds)
|
void |
readExternal(java.io.ObjectInput in)
Implements Externalizable.
|
protected void |
restoreProperties(DiagramItemProperties props)
|
protected void |
saveProperties(DiagramItemProperties props)
|
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(MouseInputMode 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.
|
static ControlNodeBuilder |
with()
Returns a ControlNodeBuilder object used to configure and create new ControlNode instances.
|
void |
writeExternal(java.io.ObjectOutput out)
Implements Externalizable.
|
addLabel, addLabel, allowCreate, allowModify, allowModifyImpl, attachTo, attachTo, attachTo, cancelModify, completeCreate, completeModify, constraintsInfringed, containsPoint, containsPoint, createConnectionPoint, createState, detach, draw, drawShadow, drawShadowLocal, getAllIncomingLinks, getAllLinks, getAllOutgoingLinks, getAllowIncomingLinks, getAllowOutgoingLinks, getAnchorPattern, getBounds, getCenter, getConstraints, getContainer, getEffects, getEnabledHandles, getExpandable, getExpanded, getHandlesStyle, getIncomingLinks, getLabels, getLocalBounds, getLocalBoundsD, getLocalCenter, getMasterGroup, getMasterItem, getNearestBorderPoint, getObstacle, getOutgoingLinks, getRepaintRect, getRotatedBounds, getRotationAngle, groupContains, hitTestHandle, labelFromPoint, loadFromJson, move, moveTo, nodesIntersect, onDragOut, onDragOver, onDropOver, onModify, onRotationAngleChanged, parentConstraintsInfringed, putExpandable, rectFromPoints, removeLabel, resize, resizeToFitImage, restoreState, saveState, saveToJson, scaleElements, setAllowIncomingLinks, setAllowOutgoingLinks, setAnchorPattern, setBounds, setBounds, setBounds, setBoundsDirect, setConstraints, setEnabledHandles, setExpandable, setExpanded, setExpandedFlag, setHandlesStyle, setObstacle, setReflexive, setRotationAngle, shouldRenderAnchors, startCreate, startModify, updateCreate, updateLinkPositions, updateModifyas, clone, getBrush, getEffectiveBrush, getEffectiveFont, getEffectivePen, getEffectiveShadowBrush, getEffectiveTextBrush, getFont, getHyperLink, getId, getIgnoreLayout, getLayerIndex, getLayoutTraits, getLocked, getMeasureUnit, getOpacity, getParent, getPen, getPrintable, getRuntimeIndex, getSelected, getShadowBrush, getShadowOffsetX, getShadowOffsetY, getStyle, getSubordinateGroup, getTag, getTextBrush, getTextPadding, getToolTip, getValue, getVisible, getWeight, getZIndex, hasSubordinates, hitTest, onChangeFont, onChangeTextPadding, onChildModified, onClick, onDoubleClick, onMeasureUnitChanged, onStyleChanged, onStyleFontChanged, putSelected, query, repaint, repaint, repaint, setBrush, setDiagramDirty, setFont, setHyperLink, setId, setIgnoreLayout, setLayerIndex, setLocked, setOpacity, setPen, setPrintable, setSelected, setShadowBrush, setShadowOffsetX, setShadowOffsetY, setStyle, setTag, setTextBrush, setTextPadding, setToolTip, setWeight, setZIndex, shouldRender, zBottom, zLevelDown, zLevelUp, zToppublic 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.public static ControlNodeBuilder with()
ControlNodeBuilder instance.public ControlNodeBuilder init()
ControlNodeBuilder instance.public java.awt.Component getControl()
public void setControl(java.awt.Component value)
value - A java.awt.Component instance.public MouseInputMode getMouseInputMode()
MouseInputMode enumeration.public void setMouseInputMode(MouseInputMode value)
value - A member of the MouseInputMode enumeration.public void setVisible(boolean value)
setVisible in class DiagramItemvalue - 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 DiagramNodeg - A Graphics2D object where the link should be rendered.options - A RenderOptions object specifying options for the drawing operation.protected void onUpdateBounds(java.awt.geom.Rectangle2D oldBounds)
onUpdateBounds in class DiagramNodeprotected void onAdd()
DiagramItem.onAdd() override.onAdd in class DiagramItemprotected void onLoad(Diagram diagram)
onLoad in class DiagramItemprotected void onRemove()
DiagramItem.onRemove() override.onRemove in class DiagramNodepublic void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.ExternalizablewriteExternal in class DiagramNodejava.io.IOExceptionpublic void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.ExternalizablereadExternal in class DiagramNodejava.io.IOExceptionjava.lang.ClassNotFoundExceptionprotected void saveToXml(org.w3c.dom.Element xmlElement,
XmlPersistContext context)
saveToXml in class DiagramNodexmlElement - 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,
com.mindfusion.common.XmlException
loadFromXml in class DiagramNodexmlElement - An Element containing the item's data.context - Provides contextual information about the serialization
process and some helper serialization methods.javax.xml.transform.TransformerExceptioncom.mindfusion.common.XmlExceptionprotected DiagramItemProperties createProperties()
DiagramItem.createProperties() override.createProperties in class DiagramNodeprotected void saveProperties(DiagramItemProperties props)
saveProperties in class DiagramNodeprops - A DiagramItemProperties-derived object where
the item's properties should be saved.protected void restoreProperties(DiagramItemProperties props)
restoreProperties in class DiagramNodeprops - A DiagramItemProperties -derived object containing a
snapshot of the item's properties.