Process API

filenet.vw.api
Class VWTextAnnotationDefinition

java.lang.Object
  extended by filenet.vw.api.VWTextAnnotationDefinition
All Implemented Interfaces:
IVWPastable, java.io.Serializable, java.lang.Cloneable

public 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.

Since:
P8 4.0
See Also:
VWMapDefinition, VWMapNode, VWAssociationDefinition, VWTextAnnotationDefinition, VWRouteDefinition, VWAssociationDefinition.getTargetId(), VWAssociationDefinition.getTargetType(), Serialized Form

Method Summary
static java.lang.String _get_FILE_AUTHOR()
          For FileNet internal use only, do not call.
static java.lang.String _get_FILE_DATE()
          For FileNet internal use only, do not call.
static java.lang.String _get_FILE_REVISION()
          For FileNet internal use only, do not call.
 VWAssociationDefinition createAssociation(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.
 void deleteAllAssociations()
          Delete all associations from this text annotation.
 void deleteAssociation(int targetId, int targetType)
          Deletes a specified assocation from this text annotation.
 VWAssociationDefinition[] getAllAssociations()
          Gets all associations from this text annotation.
 VWAssociationDefinition getAssociation(int targetId, int targetType)
          Gets a specified assocation from this text annotation.
 java.awt.Color getBgColor()
          Gets the color display attributes of this annotation.
 java.awt.Dimension getDimension()
          Gets the display dimension attribute of this annotation.
 int getId()
          Gets the value of the id property associated with this annotation.
 java.awt.Point getLocation()
          Gets the value of the location property associated with this annotation.
 java.lang.String getMessage()
          Gets the value of the message property associated with this annotation.
 java.lang.String getName()
          Gets the value of the name property associated with this annotation.
 boolean isMinimized()
          Indicates whether this annotation is displayed as minimized.
 void setBgColor(java.awt.Color color)
          Sets the color display attribute of this annotation.
 void setDimension(java.awt.Dimension dim)
          Sets the display dimension attribute of this annotation.
 void setLocation(java.awt.Point location)
          Sets the value of the location property associated with this annotation.
 void setMessage(java.lang.String message)
          Sets the value of the message property associated with this annotation.
 void setMinimized(boolean minimized)
          Enables the minimized display of this annotation.
 void setName(java.lang.String name)
          Sets the value of the name property associated with this annotation.
 java.lang.String toString()
          Gets the String representation of this instance.
 void toXML(java.lang.StringBuffer theBuffer)
          Appends an XML string that represents this instance to the buffer specified by the theBuffer parameter.
 void toXPDL(java.lang.String indentA, java.lang.StringBuffer theBuffer)
          Appends an XPDL String that represents this instance to the buffer specified by the theBuffer parameter.
 void validate(java.util.Vector EDefVector)
          Validates this instance, appending any validation errors found to the specified Vector.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

_get_FILE_DATE

public static java.lang.String _get_FILE_DATE()
For FileNet internal use only, do not call.

Returns:
the file date

_get_FILE_AUTHOR

public static java.lang.String _get_FILE_AUTHOR()
For FileNet internal use only, do not call.

Returns:
the file author

_get_FILE_REVISION

public static java.lang.String _get_FILE_REVISION()
For FileNet internal use only, do not call.

Returns:
the file revision

getId

public int getId()
          throws VWException
Gets 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 VWException
Gets 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 VWException
Sets 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 VWException
Gets 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 VWException
Sets 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 VWException
Gets 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 VWException
Sets 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 VWException
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:
VWXMLUtil

toXPDL

public void toXPDL(java.lang.String indentA,
                   java.lang.StringBuffer theBuffer)
            throws VWException
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:
VWXMLUtil

toString

public java.lang.String toString()
Gets the String representation of this instance.

Overrides:
toString in class java.lang.Object
Returns:
A String containing the id and the message text.

validate

public void validate(java.util.Vector EDefVector)
              throws VWException
Validates this instance, appending any validation errors found to the specified Vector.

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 the VWAssociationTargetType class.
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 VWException
Deletes 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. Use VWAssociationDefinition.getTargetType to get the target type.
targetId - An integer identifying the association to be deleted. Use VWAssociationDefinition.getTargetId to get the target id.
Throws:
VWException
See Also:
VWAssociationTargetType, VWMapDefinition, VWMapNode, VWAssociationDefinition, VWTextAnnotationDefinition, VWRouteDefinition, VWAssociationDefinition.getTargetId(), VWAssociationDefinition.getTargetType()

deleteAllAssociations

public void deleteAllAssociations()
                           throws VWException
Delete 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. Use VWAssociationDefinition.getTargetType to get the target type.
targetId - An integer identifying the association. Use VWAssociationDefinition.getTargetId to 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.

Process API

© Copyright IBM Corporation 2002, 2008. All rights reserved.