public abstract class DiagramNode extends DiagramItem
DiagramNode is an abstract base class from which the ShapeNode,
TableNode and ContainerNode classes derive. DiagramNode instances can
represent graph vertices, nodes in organizational or flow diagrams, entities in
ER diagrams, and so on.
Use the setBounds(android.graphics.RectF, boolean, boolean) method to set the location and size of a node. To
move a node without changing its size, call the moveTo(float, float) method. To
change only the size of a node, invoke the resize(float, float) method.
Constraints upon how users are allowed to modify a node can be set via the
setConstraints(com.mindfusion.diagramming.NodeConstraints) and setEnabledHandles(java.util.EnumSet<com.mindfusion.diagramming.NodeHandleType>) methods. The former
specifies constraints on the allowed move direction and node size. The latter
enables or disables specific manipulation handles of a node.
Relations between nodes are indicated by linking the nodes with DiagramLink
objects. Links are directional links, so each node has two collections
referring to links, which can be accessed via getIncomingLinks() and
getOutgoingLinks(). setAnchorPattern(com.mindfusion.diagramming.AnchorPattern) lets you define to which
points of a node incoming or outgoing links can be connected. You can specify
whether a node accepts incoming links via the setAllowIncomingLinks(boolean)
method, and outgoing links via the setAllowOutgoingLinks(boolean) method.
A user is allowed to expand or collapse the tree branch that starts from a
node if setExpandable(boolean) is called for that node. Use getExpanded()
to find out whether the branch starting from a node is expanded or not.
Nodes can be attached to other items, and be used as simple labels,
image-holders or other kinds of UI elements. The attachTo(com.mindfusion.diagramming.DiagramLink, com.mindfusion.diagramming.AttachToLink, int) method
creates a Group instance if necessary, and calls the group's
appropriate attachTo* method.
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
allowIncomingLinks |
protected boolean |
allowOutgoingLinks |
protected AnchorPattern |
anchorPattern |
protected com.mindfusion.diagramming.VisitorMethod |
AV_Cancel |
protected com.mindfusion.diagramming.VisitorMethod |
AV_EndModIncoming |
protected com.mindfusion.diagramming.VisitorMethod |
AV_EndModOutgoing |
protected com.mindfusion.diagramming.VisitorMethod |
AV_StartModIncoming |
protected com.mindfusion.diagramming.VisitorMethod |
AV_StartModOutgoing |
protected com.mindfusion.diagramming.VisitorMethod |
AV_UpdateIncoming |
protected com.mindfusion.diagramming.VisitorMethod |
AV_UpdateOutgoing |
protected com.mindfusion.diagramming.VisitorMethod |
AV_UpdIntscIncoming |
protected com.mindfusion.diagramming.VisitorMethod |
AV_UpdIntscOutgoing |
protected com.mindfusion.diagramming.VisitorMethod |
AV_UpdPosIncoming |
protected com.mindfusion.diagramming.VisitorMethod |
AV_UpdPosOutgoing |
protected android.graphics.RectF |
bounds |
protected java.util.EnumSet<NodeHandleType> |
enabledHandles |
protected HandlesStyle |
handlesStyle |
protected DiagramLinkList |
incomingLinks |
protected Group |
masterGroup |
protected boolean |
obstacle |
protected DiagramLinkList |
outgoingLinks |
protected android.graphics.RectF |
savedBounds |
brush, cycleDetected, cycleProtect, modifyDX, modifyDY, modifyHandle, modifying, pen, ptEnd, ptMdfLast, ptOrg, ptSavedEnd, ptSavedOrg, subordinateGroup| Constructor and Description |
|---|
DiagramNode()
Initializes a new instance of the DiagramNode class.
|
DiagramNode(Diagram parent)
Initializes a new DiagramNode instance by setting its properties to the default
values defined in the specified Diagram.
|
DiagramNode(DiagramNode prototype)
Initializes a new DiagramNode instance by copying its properties
from the specified prototype node.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
allowCreate(android.graphics.PointF current,
InteractionState ist)
|
protected boolean |
allowModify(android.graphics.PointF current,
InteractionState ist)
Invoked during interactive modification of items
to test whether the operation can be completed in
the current context.
|
protected boolean |
allowModifyImpl(android.graphics.PointF current,
InteractionState ist) |
void |
attachTo(DiagramLink link,
AttachToLink attType,
int index)
Attaches a node to a segment or point of the specified link.
|
void |
attachTo(DiagramNode node,
AttachToNode attType)
Attaches a node to a corner or side of another node.
|
void |
attachTo(DiagramNode node,
float percentX1,
float percentY1,
float percentX2,
float percentY2)
Attaches a node to another node, so that the attached node will always
cover a proportional part of the master node, specified in percents.
|
protected void |
cancelModify(InteractionState ist)
|
protected void |
completeCreate(android.graphics.PointF end)
|
protected void |
completeModify(android.graphics.PointF end,
InteractionState ist)
Invoked when the item modification has been completed.
|
protected boolean |
constraintsInfringed() |
boolean |
containsPoint(android.graphics.PointF point)
|
boolean |
containsPoint(android.graphics.PointF point,
float threshold)
Tests whether the specified point is inside this node or within the specified distance from its outlines.
|
protected ConnectionPoint |
createConnectionPoint(DiagramLink link,
android.graphics.PointF pt,
boolean incoming) |
protected DiagramItemProperties |
createProperties()
DiagramItem.createProperties() override. |
protected DiagramItemState |
createState()
DiagramItem.createState() override. |
void |
detach()
Detaches a node from its master group.
|
void |
draw(android.graphics.Canvas g,
RenderOptions options)
|
protected void |
drawLocal(android.graphics.Canvas g,
RenderOptions options)
Override in a derived class to provide implementation specific drawing for the node.
|
protected void |
drawShadow(android.graphics.Canvas g,
RenderOptions options)
|
protected void |
drawShadowLocal(android.graphics.Canvas graphics,
RenderOptions options)
Override in a derived class to provide implementation specific drawing for the shadow of the node.
|
DiagramLinkList |
getAllIncomingLinks()
Gets a collection of all links entering this node.
|
DiagramLinkList |
getAllLinks()
Gets all links connected to this node.
|
DiagramLinkList |
getAllOutgoingLinks()
Gets a collection of all links going out of this node.
|
boolean |
getAllowIncomingLinks()
Gets a value indicating whether users are allowed to draw
links to this node.
|
boolean |
getAllowOutgoingLinks()
Gets a value indicating whether users are allowed to draw links
from this node.
|
AnchorPattern |
getAnchorPattern()
Gets the anchor points to which link end points are aligned when
links connect to this node.
|
android.graphics.RectF |
getBounds()
Gets the node location and size.
|
android.graphics.PointF |
getCenter() |
NodeConstraints |
getConstraints()
Gets the movement and size constraints applied to a node.
|
java.util.List<NodeEffect> |
getEffects()
Gets a collection with all effects applied to this node.
|
java.util.EnumSet<NodeHandleType> |
getEnabledHandles()
Gets a combination of
NodeHandleType members identifying which manipulation
handles are enabled for a node. |
boolean |
getExpandable()
Gets a value indicating whether users are allowed to expand or collapse
the tree branch that starts from this node.
|
boolean |
getExpanded()
Gets a value indicating whether the tree branch that starts from a node is
expanded or collapsed.
|
HandlesStyle |
getHandlesStyle()
Gets a value indicating how the node adjustment handles behave and what do they look like.
|
DiagramLinkList |
getIncomingLinks()
Gets the links coming into a node.
|
protected android.graphics.RectF |
getLocalBounds() |
protected android.graphics.RectF |
getLocalBoundsD() |
android.graphics.PointF |
getLocalCenter() |
Group |
getMasterGroup()
Gets the hierarchical group in which this node is a subordinate item.
|
boolean |
getObstacle()
Gets a value indicating whether the link routing algorithm
should consider this node an obstacle.
|
DiagramLinkList |
getOutgoingLinks()
Gets the links going out from a node.
|
protected android.graphics.RectF |
getRepaintRect(boolean includeConnected)
Gets the repaint region for this item, taking into account
factors such as pen, selection handles and shadow.
|
static android.graphics.RectF |
getRotatedBounds(android.graphics.RectF rect,
android.graphics.PointF center,
double angle)
Gets the bounding rectangle of this node, when it is
rotated at the specified angle around the specified pivot.
|
float |
getRotationAngle()
Gets the rotation angle of this node.
|
protected boolean |
groupContains(DiagramNode node) |
AdjustmentHandle |
hitTestHandle(android.graphics.PointF point)
|
protected void |
loadFromXml(org.w3c.dom.Element xmlElement,
XmlPersistContext context)
Loads the item content from an XML element.
|
protected void |
move(float x,
float y) |
void |
moveTo(float x,
float y)
Moves a node to the specified location.
|
static boolean |
nodesIntersect(DiagramNode node1,
DiagramNode node2)
Determines whether two nodes intersect.
|
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.
|
protected void |
onModify(android.graphics.PointF mousePosition,
NodeHandleType adjustmentHandle)
Called when an item is modified
|
protected void |
onRemove()
Called when an item is removed from a Diagram, either by
the user, programmatically or via undo / redo.
|
protected void |
onRotationAngleChanged() |
protected void |
onUpdateBounds()
Invoked when the bounding rectangle of this node has changed.
|
protected boolean |
parentConstraintsInfringed() |
protected void |
putExpandable(boolean exp) |
void |
readExternal(java.io.ObjectInput in)
Implements Externalizable.
|
protected void |
rectFromPoints() |
void |
resize(float width,
float height)
Sets the size of a node.
|
protected void |
resizeToFitImage(android.graphics.Bitmap image) |
protected void |
restoreProperties(DiagramItemProperties props)
|
protected void |
restoreState(DiagramItemState state)
|
protected void |
saveProperties(DiagramItemProperties props)
|
protected void |
saveState(DiagramItemState state)
|
protected void |
saveToXml(org.w3c.dom.Element xmlElement,
XmlPersistContext context)
Saves the item content into an XML element.
|
protected void |
scaleElements(float scale)
Scales the node's elements by specified amount.
|
void |
setAllowIncomingLinks(boolean value)
Sets a value indicating whether users are allowed to draw links to this node.
|
void |
setAllowOutgoingLinks(boolean value)
Sets a value indicating whether users are allowed to draw links from this node.
|
void |
setAnchorPattern(AnchorPattern value)
Sets the anchor points to which link end points are aligned when
links connect to this node.
|
void |
setBounds(float x,
float y,
float w,
float h)
Sets the node location and size.
|
void |
setBounds(android.graphics.RectF value)
Sets the node location and size.
|
void |
setBounds(android.graphics.RectF rect,
boolean updateGroups,
boolean updateLinks)
Sets the location and size of this node.
|
void |
setBoundsDirect(android.graphics.RectF rc) |
void |
setConstraints(NodeConstraints value)
Sets constraints to the node size and movement direction.
|
void |
setEnabledHandles(java.util.EnumSet<NodeHandleType> value)
Sets a combination of
NodeHandleType members identifying which manipulation
handles are enabled for a node. |
void |
setExpandable(boolean value)
Sets a value indicating whether users are allowed to expand or collapse
the tree branch that starts from this node.
|
void |
setExpanded(boolean value)
Expands or collapses the tree branch that starts from a node.
|
void |
setExpandedFlag(boolean expanded)
Changes the "expanded" flag without actually expanding or collapsing
the tree branch that starts from a node.
|
void |
setHandlesStyle(HandlesStyle value)
Sets a value indicating how the node adjustment handles behave and what do they look like.
|
void |
setObstacle(boolean value)
Sets a value indicating whether the link routing algorithm
should consider this node an obstacle.
|
protected void |
setReflexive(DiagramLink link)
Invoked to let a node set the shape of a reflexive link connected to it.
|
void |
setRotationAngle(float value)
Sets the rotation angle of a node.
|
protected boolean |
shouldRenderAnchors(RenderOptions options)
Determines whether the node should render its anchor points.
|
protected void |
startCreate(android.graphics.PointF org)
|
protected void |
startModify(android.graphics.PointF org,
AdjustmentHandle handle,
InteractionState ist)
|
protected void |
updateCreate(android.graphics.PointF current)
|
protected void |
updateLinkPositions() |
protected void |
updateModify(android.graphics.PointF current,
InteractionState ist)
|
void |
writeExternal(java.io.ObjectOutput out)
Implements Externalizable.
|
clone, 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, onMeasureUnitChanged, 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, zTopprotected com.mindfusion.diagramming.VisitorMethod AV_UpdateOutgoing
protected com.mindfusion.diagramming.VisitorMethod AV_UpdateIncoming
protected com.mindfusion.diagramming.VisitorMethod AV_UpdPosOutgoing
protected com.mindfusion.diagramming.VisitorMethod AV_UpdPosIncoming
protected com.mindfusion.diagramming.VisitorMethod AV_UpdIntscOutgoing
protected com.mindfusion.diagramming.VisitorMethod AV_UpdIntscIncoming
protected com.mindfusion.diagramming.VisitorMethod AV_StartModOutgoing
protected com.mindfusion.diagramming.VisitorMethod AV_StartModIncoming
protected com.mindfusion.diagramming.VisitorMethod AV_EndModOutgoing
protected com.mindfusion.diagramming.VisitorMethod AV_EndModIncoming
protected com.mindfusion.diagramming.VisitorMethod AV_Cancel
protected DiagramLinkList incomingLinks
protected DiagramLinkList outgoingLinks
protected Group masterGroup
protected boolean obstacle
protected boolean allowIncomingLinks
protected boolean allowOutgoingLinks
protected android.graphics.RectF bounds
protected android.graphics.RectF savedBounds
protected AnchorPattern anchorPattern
protected java.util.EnumSet<NodeHandleType> enabledHandles
protected HandlesStyle handlesStyle
public DiagramNode()
public DiagramNode(Diagram parent)
parent - A Diagram instance whose default node
attributes are copied to this node.public DiagramNode(DiagramNode prototype)
prototype - A DiagramNode instance whose attributes are
copied to this node.protected void onRemove()
onRemove in class DiagramItemprotected ConnectionPoint createConnectionPoint(DiagramLink link, android.graphics.PointF pt, boolean incoming)
public NodeConstraints getConstraints()
NodeConstraints object.public void setConstraints(NodeConstraints value)
value - A NodeConstraints object.protected void updateLinkPositions()
public DiagramLinkList getAllOutgoingLinks()
DiagramLinkList containing all outgoing links.public DiagramLinkList getAllIncomingLinks()
DiagramLinkList containing all incoming links.public DiagramLinkList getAllLinks()
DiagramLinkList containing the links connected to this node.public DiagramLinkList getIncomingLinks()
DiagramLinkList containing the incoming links.public DiagramLinkList getOutgoingLinks()
DiagramLinkList containing the outgoing links.protected void setReflexive(DiagramLink link)
link - Reference to the link.protected boolean groupContains(DiagramNode node)
public Group getMasterGroup()
getMasterGroup in class DiagramItemGroup to which this node is attached.public void attachTo(DiagramLink link, AttachToLink attType, int index)
link - An DiagramLink to which to attach this node.attType - A member of the AttachToLink enumeration.index - Index of a point or segment to which to attach the node.public void attachTo(DiagramNode node, AttachToNode attType)
node - A DiagramNode to which to attach this node.attType - A member of the AttachToNode enumeration.public void attachTo(DiagramNode node, float percentX1, float percentY1, float percentX2, float percentY2)
node - A DiagramNode to which to attach this node.percentX1 - A float percent value specifying to what X position in the
master node to attach the left side of this node.percentY1 - A float percent value specifying to what Y position in the
master node to attach the top side of this node.percentX2 - A float percent value specifying to what X position in the
master node to attach the right side of this node.percentY2 - A float percent value specifying to what Y position in the
master node to attach the bottom side of this node.public void detach()
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.ExternalizablewriteExternal in class DiagramItemjava.io.IOExceptionpublic void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.ExternalizablereadExternal in class DiagramItemjava.io.IOExceptionjava.lang.ClassNotFoundExceptionprotected void saveToXml(org.w3c.dom.Element xmlElement,
XmlPersistContext context)
DiagramItemsaveToXml in class DiagramItemxmlElement - 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
DiagramItemloadFromXml in class DiagramItemxmlElement - 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 boolean getObstacle()
true if auto-routed links should go around
this node, otherwise false.public void setObstacle(boolean value)
value - true if auto-routed links should go around
this node, otherwise false.public void setBounds(android.graphics.RectF rect,
boolean updateGroups,
boolean updateLinks)
rect - A RectF specifying the node position.updateGroups - Specifies whether the position of child nodes attached to this one should be updated too.updateLinks - Specifies whether the position of links connected to this node should be updated too.public void setBoundsDirect(android.graphics.RectF rc)
public android.graphics.RectF getBounds()
getBounds in class DiagramItemRectF object
representing the node bounds.protected android.graphics.RectF getLocalBounds()
protected android.graphics.RectF getLocalBoundsD()
public void setBounds(android.graphics.RectF value)
value - A RectF object
representing the node bounds.public void setBounds(float x,
float y,
float w,
float h)
x - The new horizontal position of the node.y - The new vertical position of the node.w - The new width of the node.h - The new height of the node.public void moveTo(float x,
float y)
x - The new horizontal position of the node.y - The new vertical position of the node.protected void move(float x,
float y)
public void resize(float width,
float height)
width - The new width of this node.height - The new height of this node.public boolean containsPoint(android.graphics.PointF point)
DiagramItem.containsPoint(android.graphics.PointF) override. Checks whether this node
contains the specified point. This method is called during hit-testing to determine
if the pointer is over the node.containsPoint in class DiagramItempoint - The point to check.public boolean containsPoint(android.graphics.PointF point,
float threshold)
point - The point to check.threshold - Specifies the size of the area around the node
outlines where the point is still considered inside the node.public AdjustmentHandle hitTestHandle(android.graphics.PointF point)
DiagramItem.hitTestHandle(android.graphics.PointF) override. Determines whether a selection handle of this node is located at the specified point.hitTestHandle in class DiagramItempoint - A PointF instance specifying the location where to look for adjustment handles.NodeAdjustmentHandle instance representing the adjustment
handle found at the specified location, or null if there is none.public float getRotationAngle()
public void setRotationAngle(float value)
value - A float value specifying the node rotation angle.protected void onRotationAngleChanged()
public static android.graphics.RectF getRotatedBounds(android.graphics.RectF rect,
android.graphics.PointF center,
double angle)
public android.graphics.PointF getCenter()
public android.graphics.PointF getLocalCenter()
protected void rectFromPoints()
public void draw(android.graphics.Canvas g,
RenderOptions options)
DiagramItem.draw(android.graphics.Canvas, com.mindfusion.diagramming.RenderOptions) override. Draws this node on the specified Canvas surface.draw in class DiagramItemg - An android.graphics.Canvas instance.options - Provides options for the drawing operation.protected void drawLocal(android.graphics.Canvas g,
RenderOptions options)
g - The Canvas surface to draw the node on.options - Provides options for the drawing operation.protected void drawShadow(android.graphics.Canvas g,
RenderOptions options)
DiagramItem.drawShadow(android.graphics.Canvas, com.mindfusion.diagramming.RenderOptions) override. Draws the node's shadow on the specified Canvas surface.drawShadow in class DiagramItemg - An android.graphics.Canvas instance.options - Provides options for the drawing operation.protected void drawShadowLocal(android.graphics.Canvas graphics,
RenderOptions options)
graphics - The Canvas object where the shadow should be rendered.options - Provides options for the drawing operation.protected android.graphics.RectF getRepaintRect(boolean includeConnected)
DiagramItemgetRepaintRect in class DiagramItemincludeConnected - true if related items should be considered too; otherwise, false.protected boolean shouldRenderAnchors(RenderOptions options)
protected void startCreate(android.graphics.PointF org)
startCreate in class DiagramItemorg - The initial position of the pointer.protected void updateCreate(android.graphics.PointF current)
updateCreate in class DiagramItemcurrent - The current position of the pointer.protected boolean allowCreate(android.graphics.PointF current,
InteractionState ist)
DiagramItem.allowCreate(android.graphics.PointF, com.mindfusion.diagramming.InteractionState) override.allowCreate in class DiagramItemcurrent - The current pointer position.ist - An InteractionState object containing more information about the current state of the operation.protected void completeCreate(android.graphics.PointF end)
completeCreate in class DiagramItemend - The pointer position.protected void startModify(android.graphics.PointF org,
AdjustmentHandle handle,
InteractionState ist)
DiagramItem.startModify(android.graphics.PointF, com.mindfusion.diagramming.AdjustmentHandle, com.mindfusion.diagramming.InteractionState) override. Invoked when the user starts modifying this node interactively.startModify in class DiagramItemorg - The initial position of the pointer.handle - The adjustment handle used to modify this item.ist - An InteractionState object containing more information about the current state of the operation.protected boolean constraintsInfringed()
protected boolean parentConstraintsInfringed()
protected void updateModify(android.graphics.PointF current,
InteractionState ist)
DiagramItem.updateModify(android.graphics.PointF, com.mindfusion.diagramming.InteractionState) override. Invoked during interactive modification of this node.updateModify in class DiagramItemcurrent - The current position of the pointer.ist - An InteractionState object containing more information about the current state of the operation.protected boolean allowModify(android.graphics.PointF current,
InteractionState ist)
DiagramItemallowModify in class DiagramItemcurrent - The current pointer position.ist - An InteractionState object containing more information about the current state of the operation.protected boolean allowModifyImpl(android.graphics.PointF current,
InteractionState ist)
protected void onModify(android.graphics.PointF mousePosition,
NodeHandleType adjustmentHandle)
mousePosition - Specifies the mouse position.adjustmentHandle - The adjustment handle used to modify the node.protected void completeModify(android.graphics.PointF end,
InteractionState ist)
DiagramItemcompleteModify in class DiagramItemend - The pointer position.ist - An InteractionState object containing more information about the current state of the operation.protected void cancelModify(InteractionState ist)
DiagramItem.cancelModify(com.mindfusion.diagramming.InteractionState) override. Invoked when the interactive modification of this node has been canceled.cancelModify in class DiagramItemist - An InteractionState object containing more information about the current state of the operation.protected void onUpdateBounds()
protected void scaleElements(float scale)
scale - The value by which to multiply node elements' sizes.public java.util.EnumSet<NodeHandleType> getEnabledHandles()
NodeHandleType members identifying which manipulation
handles are enabled for a node. This effectively controls what kind of
modifications users are allowed to perform on this node.NodeHandleType members.public void setEnabledHandles(java.util.EnumSet<NodeHandleType> value)
NodeHandleType members identifying which manipulation
handles are enabled for a node. This effectively controls what kind of
modifications users are allowed to perform on this node.value - A set of NodeHandleType members.public AnchorPattern getAnchorPattern()
AnchorPattern object that defines
the anchor points for this node.public void setAnchorPattern(AnchorPattern value)
value - An AnchorPattern object that defines
the anchor points for this node.public static boolean nodesIntersect(DiagramNode node1, DiagramNode node2)
node1 - The first node.node2 - The second node.true if the nodes intersect, otherwise false.public boolean onDragOver(DiagramItem item)
item - The DiagramItem that is dragged over the node.public void onDragOut(DiagramItem item)
item - The DiagramItem that is dragged out of the node.public boolean onDropOver(DiagramItem item)
item - The DiagramItem that is dropped over the node.protected void resizeToFitImage(android.graphics.Bitmap image)
public void setExpandedFlag(boolean expanded)
expanded - The new value of the flag.protected void putExpandable(boolean exp)
public boolean getExpandable()
true if the tree branch that starts from this node
can be expanded or collapsed by users, otherwise false.public void setExpandable(boolean value)
value - true if the tree branch that starts from this node
can be expanded or collapsed by users, otherwise false.public boolean getExpanded()
true if the tree branch that starts from this node
is currently expanded, otherwise false.public void setExpanded(boolean value)
value - true if the tree branch that starts from
this node should be expanded, otherwise false.public boolean getAllowIncomingLinks()
true if incoming links can be drawn to this node,
otherwise false.public void setAllowIncomingLinks(boolean value)
value - true if incoming links can be drawn to this node,
otherwise false.public boolean getAllowOutgoingLinks()
true if outgoing links can be drawn from this node,
otherwise false.public void setAllowOutgoingLinks(boolean value)
value - true if outgoing links can be drawn from
this node, otherwise false.public HandlesStyle getHandlesStyle()
HandlesStyle enumeration.public void setHandlesStyle(HandlesStyle value)
value - A member of the HandlesStyle enumeration.protected DiagramItemState createState()
DiagramItem.createState() override.createState in class DiagramItemprotected void saveState(DiagramItemState state)
saveState in class DiagramItemprotected void restoreState(DiagramItemState state)
restoreState in class DiagramItemprotected DiagramItemProperties createProperties()
DiagramItem.createProperties() override.createProperties in class DiagramItemprotected void saveProperties(DiagramItemProperties props)
saveProperties in class DiagramItemprops - A DiagramItemProperties-derived object where
the item's properties should be saved.protected void restoreProperties(DiagramItemProperties props)
restoreProperties in class DiagramItemprops - A DiagramItemProperties -derived object containing a
snapshot of the item's properties.public java.util.List<NodeEffect> getEffects()