public class Group
extends java.lang.Object
implements java.io.Externalizable
Constructor and Description |
---|
Group()
Used internally to implement serialization.
|
Group(Diagram diagram)
Initializes a new instance of the
Group class. |
Group(Group prototype)
Initializes a new instance of the
Group class. |
Modifier and Type | Method and Description |
---|---|
boolean |
attachProportional(DiagramNode node,
float left,
float top,
float right,
float bottom)
Adds a node to the group.
|
boolean |
attachToCorner(DiagramNode node,
int corner)
Adds a node to the group.
|
boolean |
attachToLinkPoint(DiagramNode node,
int point)
Adds a node to the group.
|
boolean |
attachToLinkSegment(DiagramNode node,
int segment)
Adds a node to the group.
|
boolean |
attachToLongestHSegment(DiagramNode node)
Adds a node to the group, maintaining its relative positions
to master link's longest horizontal segment
|
boolean |
attachToSideMiddle(DiagramNode node,
int side)
Attaches a node to the group, so that it will follow the middle
point of another node's side.
|
boolean |
detach(DiagramNode node)
Removes a node from the group.
|
DiagramNodeList |
getAttachedNodes()
Gets a list of the subordinated items in this group.
|
boolean |
getAutoDeleteItems()
Gets a value indicating whether the subordinated items in this group
will be deleted automatically when the group is destroyed.
|
boolean |
getExpandable()
Gets a value indicating whether expansion of a tree branch that contains
the master item of a group will propagate through its attached items.
|
boolean |
getFollowMasterContainment() |
GroupRotation |
getFollowMasterRotation()
Gets a value indicating whether the attached items in a group follow
the rotation of the group's master item.
|
DiagramLinkList |
getLinksToMove() |
DiagramItem |
getMainItem()
Gets the master item of this group.
|
java.lang.Object |
getTag()
Gets the custom data object assigned to this group.
|
boolean |
getVisible()
Gets a value indicating whether this group is visible.
|
void |
readExternal(java.io.ObjectInput in)
Implements Externalizable.
|
void |
setAutoDeleteItems(boolean value)
Sets a value indicating whether the subordinated items in this group
should be deleted automatically when the group is destroyed.
|
void |
setExpandable(boolean value)
Sets a value indicating whether expansion of a tree branch that contains
the master item of a group should propagate through its attached items.
|
void |
setFollowMasterContainment(boolean value) |
void |
setFollowMasterRotation(GroupRotation value)
Sets a value indicating whether the attached items in a group should
follow the rotation of the group's master item.
|
void |
setTag(java.lang.Object value)
Assigns a custom data object to this group.
|
void |
setVisible(boolean value)
Shows or hides all items in the group.
|
void |
writeExternal(java.io.ObjectOutput out)
Implements Externalizable.
|
public Group(Diagram diagram)
Group
class.public Group()
public boolean attachToLinkPoint(DiagramNode node, int point)
node
- The DiagramNode
to attach.point
- Index of the link control point to attach to.true
if the node is attached successfully,
otherwise false
.public boolean attachToLinkSegment(DiagramNode node, int segment)
node
- The DiagramNode
to attach.segment
- The link segment to attach to.true
if the node is attached successfully,
otherwise false
.public boolean attachToLongestHSegment(DiagramNode node)
node
- The DiagramNode
to attach.true
if the node is attached successfully,
otherwise false
.public boolean attachToCorner(DiagramNode node, int corner)
node
- The DiagramNode
to attach.corner
- The corner to attach to.true
if the node is attached successfully,
otherwise false
.public boolean attachToSideMiddle(DiagramNode node, int side)
node
- The DiagramNode
to attach.side
- The side to attach to.true
if the node is attached successfully,
otherwise false
.public boolean attachProportional(DiagramNode node, float left, float top, float right, float bottom)
node
- The DiagramNode
to attach.left
- A float percent value specifying to what X position in the
master node to attach the left side of this node.top
- A float percent value specifying to what Y position in the
master node to attach the top side of this node.right
- A float percent value specifying to what X position in the
master node to attach the right side of this node.bottom
- A float percent value specifying to what Y position in the
master node to attach the bottom side of this node.true
if the node is attached successfully,
otherwise false
.public boolean detach(DiagramNode node)
node
- The DiagramNode
that should be detached.true
if the node is detached,
otherwise false
.public DiagramNodeList getAttachedNodes()
DiagramItemList
containing the items attached to this group.public boolean getVisible()
true
if the group is visible,
otherwise false.
public void setVisible(boolean value)
value
- true
if the group should be visible,
otherwise false.
public boolean getAutoDeleteItems()
true
if the items will be deleted automatically,
otherwise false
.public void setAutoDeleteItems(boolean value)
value
- true
if the items should be deleted automatically,
otherwise false
.public boolean getExpandable()
true
if tree expansion propagates through
this group, otherwise false
.public void setExpandable(boolean value)
value
- true
if tree expansion should propagate through
this group, otherwise false
.public GroupRotation getFollowMasterRotation()
GroupRotation
enumeration.public void setFollowMasterRotation(GroupRotation value)
value
- A member of the GroupRotation
enumeration.public boolean getFollowMasterContainment()
public void setFollowMasterContainment(boolean value)
public java.lang.Object getTag()
Object
assigned to this group.public void setTag(java.lang.Object value)
DiagramListener.serializeTag(com.mindfusion.diagramming.SerializeTagEvent)
event.value
- An Object
containing custom data.public DiagramItem getMainItem()
DiagramItem
.public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
java.io.IOException
java.lang.ClassNotFoundException
public DiagramLinkList getLinksToMove()