com.sas.visuals
Class TextElement

com.sas.visuals.TextElement
All Implemented Interfaces:
com.sas.collection.PropertyBagChangedListener, com.sas.collection.PropertyBagChangedSource, com.sas.collection.PropertyBagInterface, com.sas.collection.StaticPropertyBagInterface, com.sas.DeepClonable, com.sas.PublicClonable, com.sas.util.Countable, java.beans.PropertyChangeListener, java.io.ObjectInputValidation, java.io.Serializable, java.lang.Cloneable, java.util.EventListener

public class TextElement

TextElement is a sub-class of com.sas.collection.PropertyBag that holds properties about an element of text. Not all of the properties have to be set for every TextElement instance. The properties are used to display the text in different colors, fonts, or underlined states. The actionCommand allows for a command to be sent for a specific TextElement. The TextElement is only used in the StyledLabelView right now.

See Also:
StyledLabelView, Serialized Form

Field Summary
static java.lang.String ACTION_COMMAND
           
static java.lang.String COLOR
           
static java.lang.String DISPLAY_LOCATION
           
static java.lang.String DISPLAY_SIZE
           
static java.lang.String FONT
           
static java.lang.String PARENT_ELEMENT
           
static java.lang.String SUB_ELEMENTS
           
static java.lang.String TEXT
           
static java.lang.String UNDERLINED
           
 
Constructor Summary
TextElement()
           
 
Method Summary
 java.lang.String getActionCommand()
          Get the value of the actionCommand property.
 java.awt.Color getColor()
          Get the value of the color property.
 java.awt.Point getDisplayLocation()
          Get the value of the displayLocation property.
 java.awt.Dimension getDisplaySize()
          Get the value of the displaySize property.
 java.awt.Font getFont()
          Get the value of the font property.
 TextElement getParentElement()
          Get the value of the parentElement property.
 com.sas.collection.OrderedCollectionInterface getSubElements()
          Get the value of the subElements property.
 java.lang.String getText()
          Get the value of the text property.
 boolean isActionCommandSet()
          Checks to see if the actionCommand property has been set.
 boolean isColorSet()
          Checks to see if the color property has been set.
 boolean isDisplayLocationSet()
          Checks to see if the displayLocation property has been set.
 boolean isDisplaySizeSet()
          Checks to see if the displaySize property has been set.
 boolean isFontSet()
          Checks to see if the font property has been set.
 boolean isParentElementSet()
          Checks to see if the parentElement property has been set.
 boolean isSubElementsSet()
          Checks to see if the subElements property has been set.
 boolean isTextSet()
          Checks to see if the text property has been set.
 boolean isUnderlined()
          Get the value of the underlined property.
 boolean isUnderlinedSet()
          Checks to see if the underlined property has been set.
 void setActionCommand(java.lang.String actionCommand)
          Sets the value of the actionCommand property.
 void setColor(java.awt.Color color)
          Set the value of the color property.
 void setDisplayLocation(java.awt.Point displayLocation)
          Set the value of the displayLocation property.
 void setDisplaySize(java.awt.Dimension displaySize)
          Set the value of the displaySize property.
 void setFont(java.awt.Font font)
          Sets the value of the font property.
 void setParentElement(TextElement parent)
          Set the value of the parentElement property.
 void setSubElements(com.sas.collection.OrderedCollectionInterface subElements)
          Set the value of the subElements property.
 void setText(java.lang.String text)
          Set the value of the text property.
 void setUnderlined(boolean underlined)
          Set the value of the underlined property.
 void unsetActionCommand()
          Clears the actionCommand property.
 void unsetColor()
          Clears the color property.
 void unsetDisplayLocation()
          Clears the displayLocation property.
 void unsetDisplaySize()
          Clears the displaySize property.
 void unsetFont()
          Clears the font property.
 void unsetParentElement()
          Clears the parentElement property.
 void unsetSubElements()
          Clears the subElements property.
 void unsetText()
          Clears the text property.
 void unsetUnderlined()
          Clears the underlined property.
 

Field Detail

TEXT

public static final java.lang.String TEXT
See Also:
Constant Field Values

PARENT_ELEMENT

public static final java.lang.String PARENT_ELEMENT
See Also:
Constant Field Values

SUB_ELEMENTS

public static final java.lang.String SUB_ELEMENTS
See Also:
Constant Field Values

DISPLAY_SIZE

public static final java.lang.String DISPLAY_SIZE
See Also:
Constant Field Values

DISPLAY_LOCATION

public static final java.lang.String DISPLAY_LOCATION
See Also:
Constant Field Values

FONT

public static final java.lang.String FONT
See Also:
Constant Field Values

COLOR

public static final java.lang.String COLOR
See Also:
Constant Field Values

UNDERLINED

public static final java.lang.String UNDERLINED
See Also:
Constant Field Values

ACTION_COMMAND

public static final java.lang.String ACTION_COMMAND
See Also:
Constant Field Values
Constructor Detail

TextElement

public TextElement()
Method Detail

getText

public java.lang.String getText()
Get the value of the text property. The text instance property specifies the text of the textElement.

Returns:
The value of the text property.

setText

public void setText(java.lang.String text)
Set the value of the text property. The text instance property specifies the text of the textElement.

Parameters:
newValue - The new value to assign the text property.

isTextSet

public boolean isTextSet()
Checks to see if the text property has been set.

Returns:
true if text has been set; false otherwise.

unsetText

public void unsetText()
Clears the text property. The text property will no longer be used.


getParentElement

public TextElement getParentElement()
Get the value of the parentElement property. The parentElement instance property specifies the parent of the textElement.

Returns:
The value of the parentElement property.

setParentElement

public void setParentElement(TextElement parent)
Set the value of the parentElement property. The parentElement instance property specifies the parent of the textElement.

Parameters:
newValue - The new value to assign the parentElement property.

isParentElementSet

public boolean isParentElementSet()
Checks to see if the parentElement property has been set.

Returns:
true if parentElement has been set; false otherwise.

unsetParentElement

public void unsetParentElement()
Clears the parentElement property. The parentElement property will no longer be used.


getSubElements

public com.sas.collection.OrderedCollectionInterface getSubElements()
Get the value of the subElements property. The subElements instance property specifies subElements of the textElement

Returns:
The value of the subElements property.

setSubElements

public void setSubElements(com.sas.collection.OrderedCollectionInterface subElements)
Set the value of the subElements property. The subElements instance property specifies subElements of the textElement

Parameters:
newValue - The new value to assign the subElements property.

isSubElementsSet

public boolean isSubElementsSet()
Checks to see if the subElements property has been set.

Returns:
true if subElements has been set; false otherwise.

unsetSubElements

public void unsetSubElements()
Clears the subElements property. The subElements property will no longer be used.


getDisplaySize

public java.awt.Dimension getDisplaySize()
Get the value of the displaySize property. The displaySize instance property specifies displaySize of the text in the textElement

Returns:
The value of the displaySize property.

setDisplaySize

public void setDisplaySize(java.awt.Dimension displaySize)
Set the value of the displaySize property. The displaySize instance property specifies displaySize of the text in the textElement

Parameters:
newValue - The new value to assign the displaySize property.

isDisplaySizeSet

public boolean isDisplaySizeSet()
Checks to see if the displaySize property has been set.

Returns:
true if displaySize has been set; false otherwise.

unsetDisplaySize

public void unsetDisplaySize()
Clears the displaySize property. The displaySize property will no longer be used.


getDisplayLocation

public java.awt.Point getDisplayLocation()
Get the value of the displayLocation property. The displayLocation instance property specifies the displayLocation of the text in the textElement.

Returns:
The value of the displayLocation property.

setDisplayLocation

public void setDisplayLocation(java.awt.Point displayLocation)
Set the value of the displayLocation property. The displayLocation instance property specifies the displayLocation of the text in the textElement.

Parameters:
newValue - The new value to assign the displayLocation property.

isDisplayLocationSet

public boolean isDisplayLocationSet()
Checks to see if the displayLocation property has been set.

Returns:
true if displayLocation has been set; false otherwise.

unsetDisplayLocation

public void unsetDisplayLocation()
Clears the displayLocation property. The displayLocation property will no longer be used.


getFont

public java.awt.Font getFont()
Get the value of the font property. The font instance property specifies the font of the text in the textElement.

Returns:
The value of the font property.

setFont

public void setFont(java.awt.Font font)
Sets the value of the font property. The font instance property specifies the font of the text in the textElement.

Parameters:
newValue - The new value to assign the font property.

isFontSet

public boolean isFontSet()
Checks to see if the font property has been set.

Returns:
true if font has been set; false otherwise.

unsetFont

public void unsetFont()
Clears the font property. The font property will no longer be used.


getColor

public java.awt.Color getColor()
Get the value of the color property. The color instance property specifies the color of the text in the textElement

Returns:
The value of the color property.

setColor

public void setColor(java.awt.Color color)
Set the value of the color property. The color instance property specifies the color of the text in the textElement

Parameters:
newValue - The new value to assign the color property.

isColorSet

public boolean isColorSet()
Checks to see if the color property has been set.

Returns:
true if color has been set; false otherwise.

unsetColor

public void unsetColor()
Clears the color property. The color property will no longer be used.


isUnderlined

public boolean isUnderlined()
Get the value of the underlined property. The underlined instance property specifies the underlined state of the text in the textElement.

Returns:
The value of the underlined property.

setUnderlined

public void setUnderlined(boolean underlined)
Set the value of the underlined property. The underlined instance property specifies the underlined state of the text in the textElement.

Parameters:
newValue - The new value to assign the underlined property.

isUnderlinedSet

public boolean isUnderlinedSet()
Checks to see if the underlined property has been set.

Returns:
true if underlined has been set; false otherwise.

unsetUnderlined

public void unsetUnderlined()
Clears the underlined property. The underlined property will no longer be used.


getActionCommand

public java.lang.String getActionCommand()
Get the value of the actionCommand property. The actionCommand instance property specifies the actionCommand for the textElement

Returns:
The value of the actionCommand property.

setActionCommand

public void setActionCommand(java.lang.String actionCommand)
Sets the value of the actionCommand property. The actionCommand instance property specifies the actionCommand for the textElement

Parameters:
newValue - The new value to assign the actionCommand property.

isActionCommandSet

public boolean isActionCommandSet()
Checks to see if the actionCommand property has been set.

Returns:
true if actionCommand has been set; false otherwise.

unsetActionCommand

public void unsetActionCommand()
Clears the actionCommand property. The actionCommand property will no longer be used.




Copyright © 2009 SAS Institute Inc. All Rights Reserved.