ContainerProperties

Inheritance: java.lang.Object

public class ContainerProperties

ContainerProperties for shape. Implements the Microsoft Visio structured-diagram container model:

| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| /// Container identity, style and behavior are stored in User-defined cells: /// msvStructureType ("Container" / "List"), msvSDContainerStyle, msvSDHeadingStyle, /// msvSDContainerMargin, msvSDContainerLocked, msvSDContainerResize. ///                                                                   |
| /// Membership is stored in the Layout section's Relationships cell, exactly as Microsoft /// Visio persists it: the container keeps SUM(DEPENDSON(1, Sheet.N!SheetRef(),...)) /// (category 2 for lists) and each member keeps SUM(DEPENDSON(4, Sheet.N!SheetRef())) /// pointing back to the container. /// |

|

Constructors

ConstructorDescription
ContainerProperties(Shape parentShape)Constructor.

Methods

MethodDescription
addMember(Shape shape)Add Member to container Writes the same Relationships cells Microsoft Visio writes when a shape is dropped onto a container: DEPENDSON(4, Sheet.N!
clearMembers()clear members Removes the container’s member references and the matching DEPENDSON(4,…) reference on every member.
equals(Object arg0)
getClass()
getContainerStyle()ContainerStyle The value of the msvSDContainerStyle cell.
getContainerType()ContainerType Stored in the msvStructureType cell as “Container” or “List”, so the type survives save/reload.
getHeadingStyle()HeadingStyle The value of the msvSDHeadingStyle cell: 0 = no heading, 1 - 4 = heading styles.
getLockMembership()LockMembership The value of the msvSDContainerLocked cell.
getMargin()ContainerMargin The value of the msvSDContainerMargin cell.
getMemberShapes()get member shapes Reads the container’s own DEPENDSON(1,…) references (DEPENDSON(2,…) for lists).
getResizeAsNeeded()ResizeAsNeeded The value of the msvSDContainerResize cell: false = do not resize the container to fit its members, true = resize as needed.
getShape()Parent shape
hashCode()
notify()
notifyAll()
removeMember(Shape shape)RemoveMember
setContainerStyle(int value)For the description of this property, please see getContainerStyle()
setContainerType(int value)For the description of this property, please see getContainerType()
setHeadingStyle(int value)For the description of this property, please see getHeadingStyle()
setLockMembership(boolean value)For the description of this property, please see getLockMembership()
setMargin(double value)For the description of this property, please see getMargin()
setResizeAsNeeded(boolean value)For the description of this property, please see getResizeAsNeeded()
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

ContainerProperties(Shape parentShape)

public ContainerProperties(Shape parentShape)

Constructor.

Parameters:

ParameterTypeDescription
parentShapeShape

addMember(Shape shape)

public void addMember(Shape shape)

Add Member to container Writes the same Relationships cells Microsoft Visio writes when a shape is dropped onto a container: DEPENDSON(4, Sheet.N!SheetRef()) on the member and DEPENDSON(1, Sheet.N!SheetRef()) on the container (DEPENDSON(2,…) for lists). A shape belongs to a single container in Visio, so existing container membership is removed first, unless the previous container is locked.

Parameters:

ParameterTypeDescription
shapeShapeshape to add

clearMembers()

public void clearMembers()

clear members Removes the container’s member references and the matching DEPENDSON(4,…) reference on every member. Does nothing when LockMembership is set.

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getContainerStyle()

public int getContainerStyle()

ContainerStyle The value of the msvSDContainerStyle cell. Microsoft Visio itself only stores this number; the visual appearance is calculated by the container master’s formulas when the document is opened in Visio, so no shape re-creation is required on change.

Returns: int

getContainerType()

public int getContainerType()

ContainerType Stored in the msvStructureType cell as “Container” or “List”, so the type survives save/reload. When the type changes, existing membership references are moved between the container category (1) and the list category (2) of the Relationships cell.

Returns: int

getHeadingStyle()

public int getHeadingStyle()

HeadingStyle The value of the msvSDHeadingStyle cell: 0 = no heading, 1 - 4 = heading styles.

Returns: int

getLockMembership()

public boolean getLockMembership()

LockMembership The value of the msvSDContainerLocked cell. When set, AddMember, RemoveMember and ClearMembers do nothing, matching the behavior of Microsoft Visio, which prevents membership changes on a locked container.

Returns: boolean

getMargin()

public double getMargin()

ContainerMargin The value of the msvSDContainerMargin cell. The unit is defined by the cell’s unit attribute; the value is written as a plain number.

Returns: double

getMemberShapes()

public ShapeCollection getMemberShapes()

get member shapes Reads the container’s own DEPENDSON(1,…) references (DEPENDSON(2,…) for lists). Unlike the DependsOnShapes inverse lookup this resolves shape names with spaces and parentheses, so it also works for documents written by Microsoft Visio.

Returns: ShapeCollection - shapecollection

getResizeAsNeeded()

public boolean getResizeAsNeeded()

ResizeAsNeeded The value of the msvSDContainerResize cell: false = do not resize the container to fit its members, true = resize as needed.

Returns: boolean

getShape()

public Shape getShape()

Parent shape

Returns: Shape

hashCode()

public native int hashCode()

Returns: int

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

removeMember(Shape shape)

public void removeMember(Shape shape)

RemoveMember

Parameters:

ParameterTypeDescription
shapeShapeshape to remove

setContainerStyle(int value)

public void setContainerStyle(int value)

For the description of this property, please see getContainerStyle()

Parameters:

ParameterTypeDescription
valueint

setContainerType(int value)

public void setContainerType(int value)

For the description of this property, please see getContainerType()

Parameters:

ParameterTypeDescription
valueint

setHeadingStyle(int value)

public void setHeadingStyle(int value)

For the description of this property, please see getHeadingStyle()

Parameters:

ParameterTypeDescription
valueint

setLockMembership(boolean value)

public void setLockMembership(boolean value)

For the description of this property, please see getLockMembership()

Parameters:

ParameterTypeDescription
valueboolean

setMargin(double value)

public void setMargin(double value)

For the description of this property, please see getMargin()

Parameters:

ParameterTypeDescription
valuedouble

setResizeAsNeeded(boolean value)

public void setResizeAsNeeded(boolean value)

For the description of this property, please see getResizeAsNeeded()

Parameters:

ParameterTypeDescription
valueboolean

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int