Class RichTextBusinessObject
java.lang.Object
com.jgraph.components.labels.RichTextBusinessObject
- All Implemented Interfaces:
Serializable, Cloneable
User object with a dynamic set of properties in a hashtable. The property
under
.
valueKey is used in toString() to represent the
object as a string. This object supports values of type
invalid reference
JGraphpadRichTextValue
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a business object with an empty string as its value.RichTextBusinessObject(Object value) Constructs a business object with the specified value. -
Method Summary
Modifier and TypeMethodDescriptionprotected StringchopString(String s, int max) A helper method that crops string to the specified length, adding 3 dots if there were more characters.clone()Returns a clone of the object.Returns the properties.getProperty(Object key) Returns the property under the specified key.Hook for subclassers to create a custom tooltip for this user object.getValue()Returns the value forvalueKey.booleanReturns true if the value is a component.booleanReturns true if the value is a rich text value.putProperty(Object key, Object value) Sets the property under the specified key.voidsetProperties(Map properties) Sets the properties.voidSets the value forvalueKey.toString()Returns the string representation of the value or an empty string if no value exists.
-
Field Details
-
valueKey
Key to use for converting this object to a string. -
properties
Holds the properties as (key, value) pairs.
-
-
Constructor Details
-
RichTextBusinessObject
public RichTextBusinessObject()Constructs a business object with an empty string as its value. -
RichTextBusinessObject
Constructs a business object with the specified value.- Parameters:
value- The value of the new object.
-
-
Method Details
-
getProperties
-
setProperties
Sets the properties.- Parameters:
properties- The properties to set.
-
setValue
-
getValue
-
isRichText
public boolean isRichText()Returns true if the value is a rich text value.- Returns:
- Returns true if value is rich text.
-
isComponent
public boolean isComponent()Returns true if the value is a component.- Returns:
- Returns true if value is a component.
-
putProperty
-
getProperty
-
getTooltip
Hook for subclassers to create a custom tooltip for this user object. This is used in.invalid reference
JGraphpadGraph#getToolTipForCell(Object)- Returns:
- Returns a tooltip for the user object.
-
chopString
-
toString
-
clone
Returns a clone of the object. Note: The properties are not cloned, only a clone of the containing map is used. As a special case, if the user object is a JSlider or a JTree then a new instance will be put in place of the old instance.
-