Class com.symantec.itools.vcafe.openapi.VisualProperty
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.symantec.itools.vcafe.openapi.VisualProperty

Object
   |
   +----com.symantec.itools.vcafe.openapi.VisualProperty

public abstract class VisualProperty
extends Object
The API used to represent a property of a VisualObject. A plug-in can obtain a list of these objects from a VisualObject's getProperties method. A plug-in can use the methods in this class to update the property value and other attributes. The implementation of all of VisualProperty's abstract methods first calls checkValidity(). Any method could therefore throw an InvalidVisualPropertyException. This exception extends RuntimeException, so doesn't have to be explicity declared or caught. A VisualProperty can become invalid if it's VisualObject is removed from its project, or its project is closed, and the corresponding VisualObjectListener message is ignored, for example.

Version:
1.0
Author:
Symantec Internet Tools Division
Since:
VCafe 3.0
See Also:
getProperties, InvalidVisualPropertyException

Variable Index

 o DEFAULT_OBJECT_REFERENCED
Indicates an object reference type property currently references the default VisualObject.
 o NO_OBJECT_REFERENCED
Indicates an object reference type property currently references no object (ie is "null").

Constructor Index

 o com.symantec.itools.vcafe.openapi.VisualProperty()

Method Index

 o appendValueString(String)
Appends a new element with the given value to this property (for arrays).
 o checkValidity()
Checks that this VisualProperty corresponds to a valid property in its VisualObject.
 o equals(VisualProperty)
Determines if one VisualProperty is equivalent to another.
 o getEnum(int)
Gets the value of an enumeration element (for enumerations).
 o getEnumKey(int)
 o getExceptions()
Gets the exceptions that setting this property can throw.
 o getFirstChild()
Gets the first child property of this property (for folders).
 o getGetterName()
Gets the name of the method used to get the value of this property.
 o getInternalPropertyName()
Gets the (internal, unique) name of this property.
 o getJavaInitializationString()
This method is intended for use when generating Java code to set the value of the property.
 o getLevel()
Gets the nesting level of this property (for grouped properties).
 o getName()
Gets the (human readable) name of this property.
 o getNthValueString(int)
Gets the value of an array element (for arrays).
 o getNumEnum()
Gets the number of String values this property enumerates (for enumerations).
 o getNumValues()
Gets the number of array elements this property has (for arrays).
 o getPropertyEditorName()
Gets the class name of the eidtor used to view and edit this property.
 o getPropertyType()
Gets the class of this property's value.
 o getReferencedVisualObject()
Gets the VisualObject the value of this property refers to, or null.
 o getReferencedVisualObjectID()
Gets the id of the VisualObject the value of this property refers to.
 o getSetterName()
Gets the name of the method used to set the value of this property.
 o getSetterParameterType()
Gets the class name of the the setter method's parameter.
 o getSibling()
Gets the sibling property of this property (for grouped properties).
 o getValue()
Gets an Object representation this property's value.
 o getValueString()
Gets a String representation of this property's value.
 o getVisualObject()
Gets the VisualObject that owns this property.
 o isArray()
Determines whether this is an array type property.
 o isBound()
 o isConstrained()
 o isCopyable()
Determines whether this property can be copied.
 o isCustom()
 o isCustomEditor()
Determines whether editing the value of this property requires a custom editor.
 o isDefault()
Determines if this property is currently set to its default value.
 o isEditable()
Determines whether the value of this property is editable.
 o isEnumerated()
Determines whether this is an enumerated type property.
 o isFolder()
Determines whether this is a folder type property.
 o isInvisible()
Determines whether this property is displayed in the Property List.
 o isMapped()
 o isObjectReferenceProperty()
Determines whether this is an object reference type property.
 o isPaintable()
 o isUserGroup()
 o isValid()
Determines if this VisualProperty corresponds to a valid property in its VisualObject.
 o setArrayEmpty()
Sets the number of array elements a property has to zero (for arrays).
 o setInvisible(boolean)
Sets whether this property is displayed in the Property List.
 o setNthValueString(int, String)
Sets the value of an array element (for arrays).
 o setReferencedVisualObjectID(int)
Sets the value of this property to a reference to a VisualObject.
 o setValueString(String)
Set this property's value, given a String representation of the new value.
 o toString()
Gets a String that represents this object.
 o unloadPropertyObject()
If the custom property has a reference to a java object, it will be released.

Variables

 o DEFAULT_OBJECT_REFERENCED
public static final int DEFAULT_OBJECT_REFERENCED
Indicates an object reference type property currently references the default VisualObject.

See Also:
getReferencedVisualObjectID, NO_OBJECT_REFERENCED
 o NO_OBJECT_REFERENCED
public static final int NO_OBJECT_REFERENCED
Indicates an object reference type property currently references no object (ie is "null").

See Also:
getReferencedVisualObjectID, DEFAULT_OBJECT_REFERENCED

Constructors

 o VisualProperty
public VisualProperty()

Methods

 o appendValueString
public abstract void appendValueString(String pValue)
Appends a new element with the given value to this property (for arrays).

Parameters:
pValue - String representation of the new value.
See Also:
isArray
 o checkValidity
public void checkValidity() throws InvalidVisualPropertyException
Checks that this VisualProperty corresponds to a valid property in its VisualObject. Note that the implementation of all of VisualProperty's abstract methods first call checkValidity(). Any method could therefore throw an InvalidVisualPropertyException.

Throws: InvalidVisualPropertyException
when its VisualObject has been removed from its project, or its project has been closed, for example
See Also:
isValid
 o equals
public abstract boolean equals(VisualProperty other)
Determines if one VisualProperty is equivalent to another.

Parameters:
other - the VisualProperty to compare with.
Returns:
true if the two VisualProperties refer to the same property in the same VisualObject, false otherwise.
 o getEnum
public abstract java.lang.String getEnum(int index)
Gets the value of an enumeration element (for enumerations).

Parameters:
the - zero-based enumeration index.
Returns:
the element value.
See Also:
isEnumerated
 o getEnumKey
public abstract int getEnumKey(int index)
 o getExceptions
public abstract java.lang.String getExceptions()
Gets the exceptions that setting this property can throw. The returned value is a comma-delimited String like: "java.lang.NullPointerException,java.lang.NumberFormatException".

Returns:
a String of exceptions.
 o getFirstChild
public abstract com.symantec.itools.vcafe.openapi.VisualProperty getFirstChild()
Gets the first child property of this property (for folders).

Returns:
this property's first child.
See Also:
isFolder
 o getGetterName
public abstract java.lang.String getGetterName()
Gets the name of the method used to get the value of this property.

Returns:
the name of the method used to get the property value.
See Also:
getSetterName, getPropertyType
 o getInternalPropertyName
public abstract java.lang.String getInternalPropertyName()
Gets the (internal, unique) name of this property.

Returns:
the unique name for this property.
 o getJavaInitializationString
public abstract java.lang.String getJavaInitializationString()
This method is intended for use when generating Java code to set the value of the property. It returns a fragment of Java code that can be used to initialize a variable with the current property value. Example results are: "2", "new Color(127,127,34)", "Color.orange", etc.

Returns:
a fragment of Java code representing an initializer for the current value.
 o getLevel
public abstract int getLevel()
Gets the nesting level of this property (for grouped properties).

Returns:
this property's nesting level.
 o getName
public abstract java.lang.String getName()
Gets the (human readable) name of this property.

Returns:
the name of this property.
 o getNthValueString
public abstract java.lang.String getNthValueString(int index)
Gets the value of an array element (for arrays).

Parameters:
index - the zero-based element index.
Returns:
the value as a String.
See Also:
isArray
 o getNumEnum
public abstract int getNumEnum()
Gets the number of String values this property enumerates (for enumerations).

Returns:
the number of elements.
See Also:
isEnumerated
 o getNumValues
public abstract int getNumValues()
Gets the number of array elements this property has (for arrays).

Returns:
the size of the array.
See Also:
isArray
 o getPropertyEditorName
public abstract java.lang.String getPropertyEditorName()
Gets the class name of the eidtor used to view and edit this property.

Returns:
the editor's class name.
 o getPropertyType
public abstract com.symantec.itools.vcafe.openapi.dtreflect.DTClass getPropertyType()
Gets the class of this property's value.

Returns:
the class of this property's value.
See Also:
getGetterName, getSetterName
 o getReferencedVisualObject
public abstract com.symantec.itools.vcafe.openapi.VisualObject getReferencedVisualObject()
Gets the VisualObject the value of this property refers to, or null.

Returns:
the VisualObject the value of this property refers to, or null.
See Also:
getReferencedVisualObjectID
 o getReferencedVisualObjectID
public abstract int getReferencedVisualObjectID()
Gets the id of the VisualObject the value of this property refers to.

Returns:
the object ID of the VisualObject this property refers to or DEFAULT_OBJECT_REFERENCED or NODEFAULT_OBJECT_REFERENCED.
See Also:
DEFAULT_OBJECT_REFERENCED, NO_OBJECT_REFERENCED, setReferencedVisualObjectID, getReferencedVisualObject, getObjectID
 o getSetterName
public abstract java.lang.String getSetterName()
Gets the name of the method used to set the value of this property.

Returns:
the name of the method used to set the value of this property.
See Also:
getSetterParameterType, getGetterName, getPropertyType
 o getSetterParameterType
public abstract java.lang.String getSetterParameterType()
Gets the class name of the the setter method's parameter.

Returns:
the class name of the parameter in the setter method.
See Also:
getSetterParameterType, getPropertyType
 o getSibling
public abstract com.symantec.itools.vcafe.openapi.VisualProperty getSibling()
Gets the sibling property of this property (for grouped properties).

Returns:
this property's sibling.
 o getValue
public abstract java.lang.Object getValue()
Gets an Object representation this property's value. For example, if this property represents a VisualObject's font, a java.awt.Font object is returned.

Returns:
this property's value as an Object.
 o getValueString
public abstract java.lang.String getValueString()
Gets a String representation of this property's value.

Returns:
this property's value as a String.
 o getVisualObject
public abstract com.symantec.itools.vcafe.openapi.VisualObject getVisualObject()
Gets the VisualObject that owns this property.

Returns:
this property's VisualObject.
 o isArray
public abstract boolean isArray()
Determines whether this is an array type property.

Returns:
true if so, false otherwise.
 o isBound
public abstract boolean isBound()
 o isConstrained
public abstract boolean isConstrained()
 o isCopyable
public abstract boolean isCopyable()
Determines whether this property can be copied.

Returns:
true if so, false otherwise.
 o isCustom
public abstract boolean isCustom()
 o isCustomEditor
public abstract boolean isCustomEditor()
Determines whether editing the value of this property requires a custom editor.

Returns:
true if so, false otherwise.
 o isDefault
public abstract boolean isDefault()
Determines if this property is currently set to its default value.

Returns:
true if so, false otherwise.
 o isEditable
public abstract boolean isEditable()
Determines whether the value of this property is editable.

Returns:
true if the value is editable, false otherwise.
 o isEnumerated
public abstract boolean isEnumerated()
Determines whether this is an enumerated type property.

Returns:
true if so, false otherwise.
 o isFolder
public abstract boolean isFolder()
Determines whether this is a folder type property.

Returns:
true if so, false otherwise.
 o isInvisible
public abstract boolean isInvisible()
Determines whether this property is displayed in the Property List.

Returns:
true if not, false otherwise.
 o isMapped
public abstract boolean isMapped()
 o isObjectReferenceProperty
public abstract boolean isObjectReferenceProperty()
Determines whether this is an object reference type property. If true the value of this property is a reference to a VisualObject.

Returns:
true if so, false otherwise.
See Also:
getReferencedVisualObjectID, setReferencedVisualObjectID
 o isPaintable
public abstract boolean isPaintable()
 o isUserGroup
public abstract boolean isUserGroup()
 o isValid
public abstract boolean isValid()
Determines if this VisualProperty corresponds to a valid property in its VisualObject. A VisualProperty can become invalid if it's VisualObject is removed from its project, or its project is closed, and the corresponding VisualObjectListener message is ignored, for example.

Returns:
true if the this VisualProperty is still valid, false otherwise
See Also:
checkValidity
 o setArrayEmpty
public abstract void setArrayEmpty()
Sets the number of array elements a property has to zero (for arrays).

See Also:
isArray
 o setInvisible
public abstract void setInvisible(boolean invisible)
Sets whether this property is displayed in the Property List.

Parameters:
invisible - true if this property should not be displayed in the Property List.
 o setNthValueString
public abstract void setNthValueString(int index,
                                       String pValue)
Sets the value of an array element (for arrays).

Parameters:
index - the zero-based element index.
pValue - String representation of the new value.
See Also:
isArray
 o setReferencedVisualObjectID
public abstract void setReferencedVisualObjectID(int refVisualObjectID)
Sets the value of this property to a reference to a VisualObject.

Parameters:
refVisualObjectID - the object i of the VisualObject this property refers to or DEFAULT_OBJECT_REFERENCED or NODEFAULT_OBJECT_REFERENCED.
See Also:
DEFAULT_OBJECT_REFERENCED, NO_OBJECT_REFERENCED, getReferencedVisualObjectID, getReferencedVisualObject, getObjectID
 o setValueString
public abstract boolean setValueString(String pValue)
Set this property's value, given a String representation of the new value.

Parameters:
pValue - String representation of the new value.
Returns:
true if successfully set, false otherwise.
 o toString
public java.lang.String toString()
Gets a String that represents this object.

Returns:
the String.
Overrides:
toString in class Object
 o unloadPropertyObject
public abstract void unloadPropertyObject()
If the custom property has a reference to a java object, it will be released.


All Packages  Class Hierarchy  This Package  Previous  Next  Index