public class CompositeNode extends DiagramNode implements ComponentHost
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 |
|---|
CompositeNode()
Initializes a new instance of the CompositeNode class.
|
CompositeNode(CompositeNode prototype)
Initializes a new instance of the CompositeNode class using the specified diagram item as a prototype.
|
CompositeNode(Diagram diagram)
Initializes a new instance of the CompositeNode class with default values supplied form the specified Diagram.
|
| Modifier and Type | Method and Description |
|---|---|
void |
applyEffects(ComponentBase component,
java.lang.Object parameters,
EffectPhase phase) |
void |
arrangeComponents(android.graphics.RectF availableSpace,
android.graphics.Canvas g2d)
Invokes when the components within this node are being arranged.
|
boolean |
containsComponent(ComponentBase component)
Checks whether the specified component is contained in this node.
|
android.graphics.Point |
docToComponent(android.graphics.PointF docPoint,
ComponentBase component)
Converts a point from document coordinates to the local coordinate space of a component inside this node.
|
void |
drawLocal(android.graphics.Canvas g2d,
RenderOptions options)
Draws the node on the specified Graphics2D surface.
|
void |
drawShadowLocal(android.graphics.Canvas g2d,
RenderOptions options)
Draws the shadow of this node on the specified Graphics2D surface.
|
ComponentBase |
findComponent(java.lang.String name)
Returns the child component with the specified name or null, if the component was not found.
|
android.graphics.RectF |
getBounds()
DiagramNode.getBounds override
|
java.lang.Object |
getClipboard(ComponentBase source,
java.lang.Class<?> dataType) |
ComponentBase |
getComponentAt(android.graphics.PointF point)
Returns the component at the specified point, expressed in document coordinates.
|
java.util.List<ComponentBase> |
getComponents()
Gets a list with the root components contained in the node.
|
ComponentBase |
getFocusedComponent() |
protected android.graphics.Region |
getRgnInRect(android.graphics.RectF rc)
Creates a java.awt.Shape object specifying the node shape
for a specified bounding rectangle.
|
protected android.graphics.Region |
getRgnInRect(android.graphics.RectF rc,
boolean inLocal)
Creates a java.awt.Shape object specifying the node shape
for a specified bounding rectangle.
|
com.mindfusion.diagramming.builders.CompositeNodeBuilder |
init()
Returns a CompositeNodeBuilder object used to configure this CompositeNode instance.
|
void |
invalidate() |
void |
invalidate(android.graphics.RectF bounds) |
void |
invalidateLayout()
Invalidates the component layout, causing rearrangement of content.
|
void |
invalidateLayout(ComponentBase component) |
protected void |
loadFromXml(org.w3c.dom.Element xmlElement,
XmlPersistContext context)
DiagramNode.loadFromXml override
|
protected void |
onMeasureUnitChanged()
Called when the diagram's MeasureUnit changes.
|
protected void |
onUpdateBounds()
DiagramNode.onUpdateBounds override
|
android.graphics.PointF |
pointToComponent(android.graphics.PointF point)
For internal use.
|
void |
readExternal(java.io.ObjectInput in)
Implements Externalizable
|
protected void |
saveToXml(org.w3c.dom.Element xmlElement,
XmlPersistContext context)
DiagramNode.saveToXml override
|
protected boolean |
serializeComponents()
Invoked to query whether the underlying component structure should be automatically serialized.
|
void |
setClipboard(ComponentBase source,
java.lang.Object data) |
void |
setFocusedComponent(ComponentBase value) |
static com.mindfusion.diagramming.builders.CompositeNodeBuilder |
with()
Returns a CompositeNodeBuilder object used to configure and create new CompositeNode instances.
|
void |
writeExternal(java.io.ObjectOutput out)
Implements Externalizable
|
allowCreate, allowModify, allowModifyImpl, attachTo, attachTo, attachTo, cancelModify, completeCreate, completeModify, constraintsInfringed, containsPoint, containsPoint, createConnectionPoint, createProperties, createState, detach, draw, drawShadow, getAllIncomingLinks, getAllLinks, getAllOutgoingLinks, getAllowIncomingLinks, getAllowOutgoingLinks, getAnchorPattern, getCenter, getConstraints, getEffects, getEnabledHandles, getExpandable, getExpanded, getHandlesStyle, getIncomingLinks, getLocalBounds, getLocalBoundsD, getLocalCenter, getMasterGroup, getObstacle, getOutgoingLinks, getRepaintRect, getRotatedBounds, getRotationAngle, groupContains, hitTestHandle, move, moveTo, nodesIntersect, onDragOut, onDragOver, onDropOver, onModify, onRemove, onRotationAngleChanged, parentConstraintsInfringed, putExpandable, rectFromPoints, resize, resizeToFitImage, restoreProperties, restoreState, saveProperties, saveState, scaleElements, setAllowIncomingLinks, setAllowOutgoingLinks, setAnchorPattern, setBounds, setBounds, setBounds, setBoundsDirect, setConstraints, setEnabledHandles, setExpandable, setExpanded, setExpandedFlag, setHandlesStyle, setObstacle, setReflexive, setRotationAngle, shouldRenderAnchors, startCreate, startModify, updateCreate, updateLinkPositions, updateModifyclone, getBrush, getEffectiveBrush, getEffectiveFont, getEffectivePen, getEffectiveShadowBrush, getEffectiveTextBrush, getFont, getHyperLink, getId, getIgnoreLayout, getLayerIndex, getLayoutTraits, getLocked, getMeasureUnit, getParent, getPen, getPrintable, getRuntimeIndex, getSelected, getShadowBrush, getShadowOffsetX, getShadowOffsetY, getStyle, getSubordinateGroup, getTag, getTextBrush, getTextPadding, getToolTip, getValue, getVisible, getWeight, getZIndex, hasSubordinates, onAdd, onChangeFont, onChangeTextPadding, onChildModified, onClick, onDoubleClick, onLoad, onStyleChanged, putSelected, query, repaint, repaint, repaint, setBrush, setDiagramDirty, setFont, setHyperLink, setId, setIgnoreLayout, setLayerIndex, setLocked, setPen, setPrintable, setSelected, setShadowBrush, setShadowOffsetX, setShadowOffsetY, setStyle, setTag, setTextBrush, setTextPadding, setToolTip, setVisible, setWeight, setZIndex, shouldRender, zBottom, zLevelDown, zLevelUp, zToppublic CompositeNode()
public CompositeNode(Diagram diagram)
diagram - The Diagram from which to obtain default values for the node properties.public CompositeNode(CompositeNode prototype)
prototype - The item to use as a prototype. The properties of the new item are initialized from the property values of this item.public static com.mindfusion.diagramming.builders.CompositeNodeBuilder with()
CompositeNodeBuilder instance.public com.mindfusion.diagramming.builders.CompositeNodeBuilder init()
CompositeNodeBuilder instance.public 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 boolean serializeComponents()
protected void saveToXml(org.w3c.dom.Element xmlElement,
XmlPersistContext context)
saveToXml in class DiagramNodexmlElement - An Element the item's data should be stored into.context - An XmlPersistContext object providing 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 DiagramNodexmlElement - An XmlElement containing the item's data.context - An XmlPersistContext object providing contextual
information about the serialization process and some helper serialization methodsjavax.xml.transform.TransformerExceptionXmlExceptionpublic void drawLocal(android.graphics.Canvas g2d,
RenderOptions options)
drawLocal in class DiagramNodeg2d - The Canvas surface to draw the node on.options - Provides options for the drawing operation.public void drawShadowLocal(android.graphics.Canvas g2d,
RenderOptions options)
drawShadowLocal in class DiagramNodeg2d - The Canvas object where the shadow should be rendered.options - Provides options for the drawing operation.protected android.graphics.Region getRgnInRect(android.graphics.RectF rc)
rc - The target rectangle.protected android.graphics.Region getRgnInRect(android.graphics.RectF rc,
boolean inLocal)
rc - The target rectangle.inLocal - true if the shape's coordinate should be relative to the node.protected void onUpdateBounds()
onUpdateBounds in class DiagramNodepublic void arrangeComponents(android.graphics.RectF availableSpace,
android.graphics.Canvas g2d)
public void invalidateLayout()
invalidateLayout in interface ComponentHostpublic ComponentBase findComponent(java.lang.String name)
name - The name of the component to search for.public boolean containsComponent(ComponentBase component)
component - The component to check.public ComponentBase getComponentAt(android.graphics.PointF point)
point - A PointF specifying the point to test, expressed in document coordinates.protected void onMeasureUnitChanged()
DiagramItemonMeasureUnitChanged in class DiagramItempublic ComponentBase getFocusedComponent()
getFocusedComponent in interface ComponentHostpublic void invalidate()
invalidate in interface ComponentHostpublic void invalidate(android.graphics.RectF bounds)
invalidate in interface ComponentHostpublic void invalidateLayout(ComponentBase component)
invalidateLayout in interface ComponentHostpublic void setFocusedComponent(ComponentBase value)
setFocusedComponent in interface ComponentHostpublic java.lang.Object getClipboard(ComponentBase source, java.lang.Class<?> dataType)
getClipboard in interface ComponentHostpublic void setClipboard(ComponentBase source, java.lang.Object data)
setClipboard in interface ComponentHostpublic void applyEffects(ComponentBase component, java.lang.Object parameters, EffectPhase phase)
applyEffects in interface ComponentHostpublic android.graphics.PointF pointToComponent(android.graphics.PointF point)
public android.graphics.Point docToComponent(android.graphics.PointF docPoint,
ComponentBase component)
docPoint - The point to convert.component - The target component.public java.util.List<ComponentBase> getComponents()
public android.graphics.RectF getBounds()
getBounds in interface ComponentHostgetBounds in class DiagramNodeRectF object
representing the node bounds.