filenet.vw.api
Class VWTextAnnotationDefinition
- java.lang.Object
-
- filenet.vw.api.VWTextAnnotationDefinition
-
- All Implemented Interfaces:
- IVWPastable, java.io.Serializable, java.lang.Cloneable
public final class VWTextAnnotationDefinition extends java.lang.Object implements java.io.Serializable, java.lang.Cloneable, IVWPastable
Represents a text annotation in a map. Text annotations are typically comments or similar documentation that a user can associate with one or more steps (VWMapNode objects) or routes (VWRouteDefinition objects) in a map. Associations from annotations to map nodes or routes are defined using the VWAssociationDefinition class. Text annotations can also stand alone, and do not have to be associated with map nodes or routes.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method and Description VWAssociationDefinitioncreateAssociation(int targetId, int targetType)Creates, in the map that contains this annotation, an assocation from this text annotation to a map node (step) or route.voiddeleteAllAssociations()Delete all associations from this text annotation.voiddeleteAssociation(int targetId, int targetType)Deletes a specified assocation from this text annotation.VWAssociationDefinition[]getAllAssociations()Gets all associations from this text annotation.VWAssociationDefinitiongetAssociation(int targetId, int targetType)Gets a specified assocation from this text annotation.java.awt.ColorgetBgColor()Gets the color display attributes of this annotation.java.awt.DimensiongetDimension()Gets the display dimension attribute of this annotation.intgetId()Gets the value of the id property associated with this annotation.java.awt.PointgetLocation()Gets the value of the location property associated with this annotation.java.lang.StringgetMessage()Gets the value of the message property associated with this annotation.java.lang.StringgetName()Gets the value of the name property associated with this annotation.booleanisMinimized()Indicates whether this annotation is displayed as minimized.voidsetBgColor(java.awt.Color color)Sets the color display attribute of this annotation.voidsetDimension(java.awt.Dimension dim)Sets the display dimension attribute of this annotation.voidsetLocation(java.awt.Point location)Sets the value of the location property associated with this annotation.voidsetMessage(java.lang.String message)Sets the value of the message property associated with this annotation.voidsetMinimized(boolean minimized)Enables the minimized display of this annotation.voidsetName(java.lang.String name)Sets the value of the name property associated with this annotation.java.lang.StringtoString()Gets the String representation of this instance.voidtoXML(java.lang.StringBuffer theBuffer)voidtoXPDL(java.lang.String indentA, java.lang.StringBuffer theBuffer)voidvalidate(java.util.Vector EDefVector)
-
-
-
Method Detail
-
getId
public int getId() throws VWExceptionGets the value of the id property associated with this annotation.- Returns:
- An integer identifying the id.
- Throws:
VWException
-
getLocation
public java.awt.Point getLocation() throws VWExceptionGets the value of the location property associated with this annotation.- Returns:
- A Point object identifying the location of this annotation; null if there is no value set.
- Throws:
VWException
-
setLocation
public void setLocation(java.awt.Point location) throws VWExceptionSets the value of the location property associated with this annotation.- Parameters:
location- A Point object specifying the location of this annotation.- Throws:
VWException
-
getMessage
public java.lang.String getMessage() throws VWExceptionGets the value of the message property associated with this annotation.- Returns:
- A String containing the message.
- Throws:
VWException
-
setMessage
public void setMessage(java.lang.String message) throws VWExceptionSets the value of the message property associated with this annotation.- Parameters:
message- A String containing he message to set.- Throws:
VWException
-
getName
public java.lang.String getName() throws VWExceptionGets the value of the name property associated with this annotation.- Returns:
- A String containing the name.
- Throws:
VWException
-
setName
public void setName(java.lang.String name) throws VWExceptionSets the value of the name property associated with this annotation.- Parameters:
name- A String containing the name to set.- Throws:
VWException
-
toXML
public void toXML(java.lang.StringBuffer theBuffer) throws VWExceptionDeprecated. UseVWWorkflowDefinition.write(java.io.OutputStream)orVWWorkflowDefinition.writeToFile(String).Appends an XML string that represents this instance to the buffer specified by the theBuffer parameter.Warning: This XML string is nonextensible, and cannot be modified in any way.
- Parameters:
theBuffer- A StringBuffer that will be appended with the XML content.- Throws:
VWException- Thrown if the theBuffer parameter is null.- See Also:
VWWorkflowDefinition
-
toXPDL
public void toXPDL(java.lang.String indentA, java.lang.StringBuffer theBuffer) throws VWExceptionDeprecated. UseVWWorkflowCollectionDefinition.write(java.io.OutputStream)orVWWorkflowCollectionDefinition.writeToFile(String).Appends an XPDL String that represents this instance to the buffer specified by the theBuffer parameter.Warning: This XPDL String is nonextensible, and cannot be modified in any way.
- Parameters:
indentA- A String specifying the initial indentation for this XPDL section.theBuffer- A StringBuffer that will be appended with the XPDL content.- Throws:
VWException- Thrown when the theBuffer parameter is null.- See Also:
VWWorkflowCollectionDefinition
-
toString
public java.lang.String toString()
Gets the String representation of this instance.- Overrides:
toStringin classjava.lang.Object- Returns:
- A String containing the id and the message text.
-
validate
public void validate(java.util.Vector EDefVector) throws VWExceptionValidates this instance, appending any validation errors found to the specified Vector. Although this method does not return a value,EDefVectorwill be updated to contain any validation errors found.- Parameters:
EDefVector- A Vector to which will be added a VWValidationError object for each validation error found. This can be null; in this case, a new Vector is used.Note: Because validate methods having EDefVector in the signature also occur on other classes, the existing Vector can contain validation errors from previous validation calls.
- Throws:
VWException- Thrown if an error occurs during the validation.- See Also:
VWValidationError
-
createAssociation
public VWAssociationDefinition createAssociation(int targetId, int targetType) throws VWException
Creates, in the map that contains this annotation, an assocation from this text annotation to a map node (step) or route.- Parameters:
targetType- An integer identifying the target type of the assocation. Valid target types are defined in theVWAssociationTargetTypeclass.targetId- An integer identifying either a step (VWMapNode) or route (VWRouteDefinition) id, depending on the target type. The target id should be a valid id for a route or step that exists in the map containing this annotation.- Returns:
- A VWAssociationDefinition object specifying the newly created association definition.
- Throws:
VWException- Thrown under these conditions:- The association already exists
- The step or route id specified in targetId does not exist
- The targetType parameter is invalid
- See Also:
VWAssociationTargetType,VWMapDefinition,VWMapNode,VWAssociationDefinition,VWTextAnnotationDefinition,VWRouteDefinition,VWAssociationDefinition.getTargetId(),VWAssociationDefinition.getTargetType()
-
deleteAssociation
public void deleteAssociation(int targetId, int targetType) throws VWExceptionDeletes a specified assocation from this text annotation. This method does not throw an exception if the specified association does not exist.- Parameters:
targetType- An integer identifying the target type of the assocation. UseVWAssociationDefinition.getTargetTypeto get the target type.targetId- An integer identifying the association to be deleted. UseVWAssociationDefinition.getTargetIdto get the target id.- Throws:
VWException- See Also:
VWAssociationTargetType,VWMapDefinition,VWMapNode,VWAssociationDefinition,VWTextAnnotationDefinition,VWRouteDefinition,VWAssociationDefinition.getTargetId(),VWAssociationDefinition.getTargetType()
-
deleteAllAssociations
public void deleteAllAssociations() throws VWExceptionDelete all associations from this text annotation.- Throws:
VWException
-
getAllAssociations
public VWAssociationDefinition[] getAllAssociations() throws VWException
Gets all associations from this text annotation.- Returns:
- An array of VWAssociationDefinition objects specifying the associations.
- Throws:
VWException- See Also:
VWAssociationDefinition,VWAssociationTargetType
-
getAssociation
public VWAssociationDefinition getAssociation(int targetId, int targetType) throws VWException
Gets a specified assocation from this text annotation. This method will not throw an exception if the specified association does not exist.- Parameters:
targetType- An integer identifying the target type of the assocation. UseVWAssociationDefinition.getTargetTypeto get the target type.targetId- An integer identifying the association. UseVWAssociationDefinition.getTargetIdto get the target id.- Returns:
- A VWAssociationDefinition object containing the association.
- Throws:
VWException- Thrown if the specified association is not found.- See Also:
VWAssociationTargetType,VWMapDefinition,VWMapNode,VWAssociationDefinition,VWTextAnnotationDefinition,VWRouteDefinition,VWAssociationDefinition.getTargetId(),VWAssociationDefinition.getTargetType()
-
getDimension
public java.awt.Dimension getDimension()
Gets the display dimension attribute of this annotation. This is persisted to a PEP file, and may be used by the UI when displaying this text annotation.- Returns:
- A Dimension object for the dimension attribute of this annotation, or null if undefined.
-
setDimension
public void setDimension(java.awt.Dimension dim)
Sets the display dimension attribute of this annotation. This is persisted to a PEP file, and may be used by the UI when displaying this text annotation. This can be null.- Parameters:
dim- A Dimension object for the dimension to set, or null if unused.
-
isMinimized
public boolean isMinimized()
Indicates whether this annotation is displayed as minimized. This is persisted to a PEP file, and may be used by the UI when displaying this text annotation.- Returns:
- A boolean value of true if this annotation is minimized; otherwise false.
-
setMinimized
public void setMinimized(boolean minimized)
Enables the minimized display of this annotation. This is persisted to a PEP file, and may be used by the UI when displaying this text annotation.- Parameters:
minimized- A boolean value of true if this annotation is to be minimized; otherwise false.
-
getBgColor
public java.awt.Color getBgColor()
Gets the color display attributes of this annotation. This is persisted to a PEP file, and may be used by the UI when displaying this text annotation.- Returns:
- A Color object specifying the color attribute for this annotation, or null if undefined.
-
setBgColor
public void setBgColor(java.awt.Color color)
Sets the color display attribute of this annotation. This is persisted to a PEP file, and may be used by the UI when displaying this text annotation. This can be null.- Parameters:
color- A Color object specifying the color attribute for this annotation, or null if unused.
-
-