com.sas.awt
Class TextArea

com.sas.awt.TextArea
All Implemented Interfaces:
VisualInterface, com.sas.beans.PropertyChangeSource, com.sas.beans.VetoableChangeSource, com.sas.collection.ContentsChangedListener, com.sas.ComponentInterface, com.sas.lang.StringDataInterface, com.sas.LinkPropertiesInterface, com.sas.ModelInterface, com.sas.PublicClonable, ValidatorInterface, com.sas.ViewDefaultModelInterface, com.sas.ViewInterface, MultipleValueEventSourceInterface, java.awt.image.ImageObserver, java.awt.MenuContainer, java.beans.PropertyChangeListener, java.io.ObjectInputValidation, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.accessibility.Accessible
Direct Known Subclasses:
WordWrapTextArea

public class TextArea
implements com.sas.collection.ContentsChangedListener, com.sas.PublicClonable, ValidatorInterface, com.sas.ViewDefaultModelInterface, com.sas.lang.StringDataInterface

TextArea is a component for creating a multi-line area that can set and display text. It can be set to not accept keystrokes through the setEditable method. The TextArea can be created with a specified number of rows and columns. Vertical and horizontal scrollbars will be attached unless specified differently during construction of the TextArea.

Creation:

  1. Create a TextArea

    TextArea textArea1 = new TextArea(); textArea1.initialize();

  2. Create a TextArea with the specified text

    TextArea textArea1 = new TextArea("text");
    textArea1.initialize();

    where text is the text that will appear in the textArea

  3. Create a TextArea with the specified text, rows, and columns

    TextArea textArea1 = new TextArea("text", rows, columns);
    textArea1.initialize();

    where:

  4. Create a TextArea with the specified text, rows, columns, and scrollbar visibility

    TextArea textArea1 = new TextArea("text", rows, columns, scrollbarVisibility);
    textArea1.initialize();

    where:



    NOTE: As mentioned previously, the textArea will be created with both horizontal and vertical scrollbars if the scrollbarVisibility is not specified during the creation of the textArea. This value cannot be changed later (.ie no setScrollbarVisibility() method exists)

Default Size:
Required Interfaces:
The TextArea requires a model that implements either com.sas.lang.StringDataInterface or com.sas.collection.StaticOrderedCollectionInterface. A default model (that implements com.sas.lang.StringDataInterface) is automatically created and attached to the TextArea when the TextArea is initially constructed.

Events:
The TextArea sends a TextEvent when any change occurs to the displayed text.

Notes

See Also:
Serialized Form

Field Summary
protected  int caretRowBeforeDoubleClick
           
protected  int currentCaretRow
           
protected  java.lang.String currentCaretRowText
           
protected  int currentRowCount
           
protected  com.sas.lang.StringData defaultModel
           
protected  com.sas.util.transforms.TransformInterface displayTransform
           
protected  com.sas.util.transforms.TransformInterface inputTransform
           
protected  com.sas.util.transforms.TransformInterface outputTransform
           
static java.lang.String RB_KEY
           
 
Constructor Summary
TextArea()
          Default constructor
TextArea(int rows, int columns)
          Create a TextArea with the specified rows and columns
TextArea(java.lang.String text)
          Create a TextArea with the specified text
TextArea(java.lang.String text, int rows, int columns)
          Create a TextArea with the specified text, rows and columns
TextArea(java.lang.String text, int rows, int columns, int scrollbars)
          Create a TextArea with the specified text, rows, columns and scrollbar visibility
 
Method Summary
 void append(java.lang.String str)
          Appends the given text to the end of the string.
 void attachModel(com.sas.ModelInterface model)
          Attaches a model to the component.
 java.lang.Object clone()
          Clones the component
 void contentsChanged(com.sas.collection.ContentsChangedEvent evt)
          Called when the contents of the Model have changed.
protected  int countRows()
          Returns the number of rows in the textArea
 void delete(int start, int end)
          Deletes text from the indicated start to end position.
 void deselectAll()
          Deselects the selected text in the TextArea.
 void detachModel(com.sas.ModelInterface model)
          Detaches the current model and attaches the default model if the model is set to null
 int getCaretRow()
          Returns the row the caret is currently on
static int getDefaultHeight()
          Returns the default height for instances of this class
static int getDefaultWidth()
          Returns the default width for instances of this class
 com.sas.util.transforms.TransformInterface getDisplayTransform()
          Returns the display transform.
 ErrorHandlerInterface getErrorHandler()
          Returns the name of the errorHandler or null if none if set
static com.sas.beans.ExtendedBeanInfo getExtendedBeanInfo()
          Returns the ExtendedBeanInfo for this class.
 com.sas.util.transforms.TransformInterface getInputTransform()
          Returns the input transform.
 com.sas.util.transforms.TransformInterface getOutputTransform()
          Returns the output transform.
 java.util.Vector getRequiredInterfaces()
          Returns the required interfaces Vector for this component.
 java.lang.String getRowText(int row)
          Returns the text in a row
 ValidationInterface getValidator()
          Returns the name of the validator or null if none if set
protected  void handleError()
          Internal routine for displaying an error message when text fails the validation rules
 void insert(java.lang.String str, int pos)
          Inserts the specified text at the specified position.
 boolean isAutoHighlight()
          Returns the value of the autoHighlight property.
 boolean isDefaultModelAttached()
          Returns whether the default model is attached.
 boolean isKeystrokeUpdate()
          Returns the value of the keystrokeUpdate property.
 boolean isSelectRowText()
          Returns the value of the selectRowText property.
 boolean isValid()
          Internal routine that checks if a validator is set.
protected  void processFocusEvent(java.awt.event.FocusEvent e)
          Processes focus events occurring on this component.Subclasses should always call super so that events are delivered to any FocusListeners.
protected  void processKeyEvent(java.awt.event.KeyEvent e)
          Processes key events occurring on this component.
protected  void processMouseEvent(java.awt.event.MouseEvent e)
          Processes mouse events occurring on this component.
protected  void processMouseMotionEvent(java.awt.event.MouseEvent e)
          Processes mouse motion events occurring on this component.
 void propertyChange(java.beans.PropertyChangeEvent event)
          Processes a PropertyChangeEvent sent by the model.
 void refresh()
          Sets the text from text obtained from the attached model.
 void refresh(com.sas.ModelInterface Model)
          Sets the text from text obtained from the attached model
 void replaceRange(java.lang.String str, int start, int end)
          Replaces text from the indicated start to end position with the new text specified.
 void select(int selectionStart, int selectionEnd)
          Selects the text found between the specified start and end positions.
 void selectAll()
          Selects all the text in the TextArea
 void setAutoHighlight(boolean value)
          Sets the specified boolean to indicate whether or not all text in the component will be selected when the component receives focus.
 void setCaretPosition(int position)
          Sets the caret position
 void setColumns(int columns)
          Sets the number of columns for the TextArea
static void setDefaultHeight(int newDefaultHeight)
          Sets the default height of the component.
 void setDefaultValues()
          Sets the initial values to the default values.
static void setDefaultWidth(int newDefaultWidth)
          Sets the default width of the component.
 void setDisplayTransform(com.sas.util.transforms.TransformInterface displayTransform)
          Sets the display transform.
 void setEditable(boolean t)
          Sets the specified boolean to indicate whether or not the TextArea is editable (accepts keystokes).
 void setErrorHandler(ErrorHandlerInterface errorHandler)
          Sets the errorHandler for the textArea.
 void setInputTransform(com.sas.util.transforms.TransformInterface inputTransform)
          Sets the input Transform.
 void setKeystrokeUpdate(boolean value)
          Sets the specified boolean to indicate whether an event is sent whenever a character is typed in the TextArea.
 void setOutputTransform(com.sas.util.transforms.TransformInterface outputTransform)
          Sets the output Transform.
 void setRows(int rows)
          Sets the number of rows for the TextArea.
 void setSelectionEnd(int selectionEnd)
          Sets the selection end to the specified position.
 void setSelectionStart(int selectionStart)
          Sets the selection start to the specified position.
 void setSelectRowText(boolean value)
          Sets the value of the selectRowText property.
 void setText(java.lang.String text)
          Sets the text of this TextArea to the specified text.
protected  boolean setTextOnModel(java.lang.String text)
          Internal routine that checks if a validator is set.
 void setValidator(ValidationInterface validator)
          Sets the validator for the textArea.
protected  com.sas.collection.OrderedCollection transformStrings(java.lang.String text)
          Parses a string into an ordered collection of objects
 void updateCaretPosition()
          Updates the caret position
protected  void updateOrderedCollectionModel(java.lang.String text)
          Updates the ordered collection model
 
Methods inherited from class com.sas.awt.TextAreaVisualComponent
addLink, addPropertyChangeListener, addVetoableChangeListener, anyPropertyChangeListeners, attachView, computePreferredSize, detachView, dumpComponent, firePropertyChange, firePropertyChange, fireVetoableChange, getBackgroundColor, getBorder, getComponentDescription, getComponentSupportInfo, getEventMethod, getEventValues, getFont, getForegroundColor, getHeight, getHorizontalPosition, getLinkInfo, getMinimumSize, getModelInterface, getPreferredSize, getPrePainter, getVerticalPosition, getViewInterfaceSupportInfo, getVisualInterfaceSupportInfo, getWidth, initialize, initializeComponent, isDesignTime, isEnabled, isFocus, isLinked, isTransparent, isVisible, paint, queryLinks, queryLinks, removeAllLinks, removeInterfaceTraps, removeLink, removePropertyChangeListener, removeVetoableChangeListener, setBackgroundColor, setBorder, setBounds, setComponentDescription, setComponentSupportInfo, setEnabled, setFocus, setFont, setForegroundColor, setHeight, setHorizontalPosition, setLinkInfo, setModelInterface, setPreferredSize, setPrePainter, setRequiredInterfaces, setTransparent, setVerticalPosition, setViewInterfaceSupportInfo, setVisible, setVisualInterfaceSupportInfo, setWidth, superGetFont, superGetMinimumSize, superGetPreferredSize, superIsEnabled, superIsVisible, superPaint, superSetBounds, superSetEnabled, superSetFont, superSetVisible, superUpdate, supportsListenerInterface, supportsRequiredInterfaces, trapInterfaceEvents, update, validateObject
 

Field Detail

displayTransform

protected com.sas.util.transforms.TransformInterface displayTransform

inputTransform

protected com.sas.util.transforms.TransformInterface inputTransform

outputTransform

protected com.sas.util.transforms.TransformInterface outputTransform

currentCaretRow

protected transient int currentCaretRow

currentCaretRowText

protected transient java.lang.String currentCaretRowText

currentRowCount

protected transient int currentRowCount

caretRowBeforeDoubleClick

protected transient int caretRowBeforeDoubleClick

defaultModel

protected com.sas.lang.StringData defaultModel

RB_KEY

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

TextArea

public TextArea()
Default constructor


TextArea

public TextArea(java.lang.String text)
Create a TextArea with the specified text

Parameters:
text - text

TextArea

public TextArea(int rows,
                int columns)
Create a TextArea with the specified rows and columns

Parameters:
rows - number of rows
columns - number of columns

TextArea

public TextArea(java.lang.String text,
                int rows,
                int columns)
Create a TextArea with the specified text, rows and columns

Parameters:
text - text
rows - number of rows
columns - number of columns

TextArea

public TextArea(java.lang.String text,
                int rows,
                int columns,
                int scrollbars)
Create a TextArea with the specified text, rows, columns and scrollbar visibility

Parameters:
text - text
rows - number of rows
columns - number of columns
scrollbars - an integer that specifies the scrollbars for the textArea (TextArea.SCROLLBARS_BOTH, TextArea.HORIZONTAL_ONLY, (TextArea.NONE, TextArea.VERTICAL_ONLY)
Method Detail

getDefaultWidth

public static int getDefaultWidth()
Returns the default width for instances of this class

Returns:
the default width in pixels
See Also:
setDefaultWidth(int)

setDefaultWidth

public static void setDefaultWidth(int newDefaultWidth)
Sets the default width of the component. The default width will be used by webAF when creating this component.

Parameters:
newDefaultWidth - the new default width in pixels
See Also:
getDefaultWidth()

getDefaultHeight

public static int getDefaultHeight()
Returns the default height for instances of this class

Returns:
the default height in pixels
See Also:
setDefaultHeight(int)

setDefaultHeight

public static void setDefaultHeight(int newDefaultHeight)
Sets the default height of the component. The default height will be used by webAF when creating this component.

Parameters:
newDefaultHeight - the new default height in pixels
See Also:
getDefaultHeight()

getExtendedBeanInfo

public static com.sas.beans.ExtendedBeanInfo getExtendedBeanInfo()
Returns the ExtendedBeanInfo for this class.

Returns:
ExtendedBeanInfo for this class

append

public void append(java.lang.String str)
Appends the given text to the end of the string. Any text that is currently selected will be deselected if the text to be appended is not equal to null.

Overrides:
append in class java.awt.TextArea
Parameters:
str - text to append

attachModel

public void attachModel(com.sas.ModelInterface model)
Attaches a model to the component. Listens for PropertyChangeEvents from the model.

Specified by:
attachModel in interface com.sas.ViewInterface
Overrides:
attachModel in class TextAreaVisualComponent
Parameters:
model - model to attach
See Also:
ViewInterface.attachModel(com.sas.ModelInterface)

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Clones the component

Specified by:
clone in interface com.sas.PublicClonable
Overrides:
clone in class TextAreaVisualComponent
Returns:
new instance of the TextArea
Throws:
java.lang.CloneNotSupportedException - if the model attached to the component being cloned will not allow the clone to attach.

contentsChanged

public void contentsChanged(com.sas.collection.ContentsChangedEvent evt)
Called when the contents of the Model have changed.

Specified by:
contentsChanged in interface com.sas.collection.ContentsChangedListener
Parameters:
evt - ContentsChangedEvent from the Model

countRows

protected int countRows()
Returns the number of rows in the textArea

Returns:
number of rows in the textArea

delete

public void delete(int start,
                   int end)
Deletes text from the indicated start to end position. Any text that is currently selected will be deselected if the original (specified) start position is greater than zero. The start and end positions are zero based and are interchangeable (start position does not have to be greater than end position). If the original start position (specified start position > specified end position) is less than zero, the delete will not occur. If the end position is greater than the current text length or less than zero, the end position will be set to the current text length.

Parameters:
start - start position
end - end position

deselectAll

public void deselectAll()
Deselects the selected text in the TextArea.


detachModel

public void detachModel(com.sas.ModelInterface model)
Detaches the current model and attaches the default model if the model is set to null

Specified by:
detachModel in interface com.sas.ViewInterface
Overrides:
detachModel in class TextAreaVisualComponent
Parameters:
model - Model to detach
See Also:
ViewInterface.detachModel(com.sas.ModelInterface)

getCaretRow

public int getCaretRow()
Returns the row the caret is currently on

Returns:
row that the caret is currently on

getDisplayTransform

public com.sas.util.transforms.TransformInterface getDisplayTransform()
Returns the display transform.

Returns:
the display transform
See Also:
setDisplayTransform(com.sas.util.transforms.TransformInterface)

getErrorHandler

public ErrorHandlerInterface getErrorHandler()
Returns the name of the errorHandler or null if none if set

Specified by:
getErrorHandler in interface ValidatorInterface
Returns:
errorHandler name
See Also:
setErrorHandler(com.sas.util.errorhandlers.ErrorHandlerInterface)

getInputTransform

public com.sas.util.transforms.TransformInterface getInputTransform()
Returns the input transform.

Returns:
the input transform
See Also:
setInputTransform(com.sas.util.transforms.TransformInterface)

getOutputTransform

public com.sas.util.transforms.TransformInterface getOutputTransform()
Returns the output transform.

Returns:
the output transform
See Also:
setOutputTransform(com.sas.util.transforms.TransformInterface)

getRequiredInterfaces

public java.util.Vector getRequiredInterfaces()
Returns the required interfaces Vector for this component.

Specified by:
getRequiredInterfaces in interface com.sas.ViewInterface
Overrides:
getRequiredInterfaces in class TextAreaVisualComponent
Returns:
the required interfaces Vector for this component.
See Also:
ViewInterface.getRequiredInterfaces()

getRowText

public java.lang.String getRowText(int row)
Returns the text in a row

Parameters:
row - row to obtain text from
Returns:
row text

getValidator

public ValidationInterface getValidator()
Returns the name of the validator or null if none if set

Specified by:
getValidator in interface ValidatorInterface
Returns:
validator name
See Also:
setValidator(com.sas.util.validators.ValidationInterface)

handleError

protected void handleError()
Internal routine for displaying an error message when text fails the validation rules

See Also:
setValidator(com.sas.util.validators.ValidationInterface), setErrorHandler(com.sas.util.errorhandlers.ErrorHandlerInterface)

isSelectRowText

public boolean isSelectRowText()
Returns the value of the selectRowText property.

Returns:
value of the selectRowText property
See Also:
setSelectRowText(boolean)

isValid

public boolean isValid()
Internal routine that checks if a validator is set. If a validator is set, text is passed to the validator for validation.

Specified by:
isValid in interface ValidatorInterface
Overrides:
isValid in class java.awt.Component
See Also:
setValidator(com.sas.util.validators.ValidationInterface), setErrorHandler(com.sas.util.errorhandlers.ErrorHandlerInterface)

insert

public void insert(java.lang.String str,
                   int pos)
Inserts the specified text at the specified position. Any text that is currently selected will be deselected if the text to be inserted is not null. If the specified position is greater than the current text length, the text to be inserted will be appended to the current text. If the specified position is less than zero, the text to be inserted will be prepended to the current text.

Overrides:
insert in class java.awt.TextArea
Parameters:
str - text to insert
pos - position at which to insert

isAutoHighlight

public boolean isAutoHighlight()
Returns the value of the autoHighlight property. The autoHighlight property indicates whether or not all text in the component will be selected when the component receives focus.

Returns:
value of the autoHighlight property
See Also:
setAutoHighlight(boolean)

isDefaultModelAttached

public boolean isDefaultModelAttached()
Returns whether the default model is attached.

Specified by:
isDefaultModelAttached in interface com.sas.ViewDefaultModelInterface
Returns:
whether the default model is attached.

isKeystrokeUpdate

public boolean isKeystrokeUpdate()
Returns the value of the keystrokeUpdate property. The keystrokeUpdate property indicates whether an event is sent whenever a character is typed in the TextField.

Returns:
value of the keystrokeUpdate property
See Also:
setKeystrokeUpdate(boolean)

processFocusEvent

protected void processFocusEvent(java.awt.event.FocusEvent e)
Processes focus events occurring on this component.Subclasses should always call super so that events are delivered to any FocusListeners.

Overrides:
processFocusEvent in class java.awt.Component
Parameters:
e - event to be handled

processKeyEvent

protected void processKeyEvent(java.awt.event.KeyEvent e)
Processes key events occurring on this component. Subclasses should always call super so that events are delivered to any KeyListeners. but can still override this behavior by consuming the event.

Overrides:
processKeyEvent in class java.awt.Component
Parameters:
e - the key event.
See Also:
KeyListener, InputEvent.consume()

processMouseEvent

protected void processMouseEvent(java.awt.event.MouseEvent e)
Processes mouse events occurring on this component. Subclasses should always call super so that events are delivered to any MouseListeners, but can still override this behavior by consuming the event.

Overrides:
processMouseEvent in class java.awt.Component
Parameters:
e - the mouse event.
See Also:
MouseListener, InputEvent.consume()

processMouseMotionEvent

protected void processMouseMotionEvent(java.awt.event.MouseEvent e)
Processes mouse motion events occurring on this component. Subclasses should always call super so that events are delivered to any MouseMotionListeners, but can still override this behavior by consuming the event.

Overrides:
processMouseMotionEvent in class java.awt.Component
Parameters:
e - the mouseMotion event.
See Also:
MouseMotionListener, InputEvent.consume()

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent event)
Processes a PropertyChangeEvent sent by the model.

Specified by:
propertyChange in interface java.beans.PropertyChangeListener
Overrides:
propertyChange in class TextAreaVisualComponent
Parameters:
event - The event from the model indicating what property changed
See Also:
PropertyChangeListener.propertyChange(java.beans.PropertyChangeEvent)

refresh

public void refresh()
Sets the text from text obtained from the attached model.


refresh

public void refresh(com.sas.ModelInterface Model)
Sets the text from text obtained from the attached model

Specified by:
refresh in interface com.sas.ViewInterface
Overrides:
refresh in class TextAreaVisualComponent
Parameters:
Model - attached model
See Also:
ViewInterface.refresh(com.sas.ModelInterface)

replaceRange

public void replaceRange(java.lang.String str,
                         int start,
                         int end)
Replaces text from the indicated start to end position with the new text specified. Any text that is currently selected will be deselected unless: the replacement text is not null, or the replacement text is equal to an empty string and the specified start position is less than zero. The start and end positions are zero based and are interchangeable (start position does not have to be greater than end position). If the specified start position is less than zero and the replacement text is not an empty string, then the replacement text will be prepended to the current string. If the end position is greater than the current text length or less than zero, the end position will be set to the current text length.

Overrides:
replaceRange in class java.awt.TextArea
Parameters:
str - replacement text
start - start position
end - end position

select

public void select(int selectionStart,
                   int selectionEnd)
Selects the text found between the specified start and end positions. Any text that is currently selected will be deselected. If the start position is greater than the end position, the select will not occur.

Overrides:
select in class java.awt.TextComponent
Parameters:
selectionStart - start position of the text
selectionEnd - end position of the text

selectAll

public void selectAll()
Selects all the text in the TextArea

Overrides:
selectAll in class java.awt.TextComponent

setAutoHighlight

public void setAutoHighlight(boolean value)
Sets the specified boolean to indicate whether or not all text in the component will be selected when the component receives focus. If set to true, all text will be selected when the component receives focus and deselected when the component loses focus

Parameters:
value - boolean value
See Also:
isAutoHighlight()

setCaretPosition

public void setCaretPosition(int position)
Sets the caret position

Overrides:
setCaretPosition in class java.awt.TextComponent
Parameters:
position - caret position
See Also:
TextComponent.getCaretPosition()

setColumns

public void setColumns(int columns)
Sets the number of columns for the TextArea

Overrides:
setColumns in class java.awt.TextArea
Parameters:
columns - number of columns
See Also:
TextArea.getColumns()

setDefaultValues

public void setDefaultValues()
Sets the initial values to the default values. This method is called by the Component constructors. The setDefaultValues method of each class is responsible for setting its own initial values.

Specified by:
setDefaultValues in interface VisualInterface
Specified by:
setDefaultValues in interface com.sas.ComponentInterface
Overrides:
setDefaultValues in class TextAreaVisualComponent
See Also:
ComponentInterface.setDefaultValues()

setDisplayTransform

public void setDisplayTransform(com.sas.util.transforms.TransformInterface displayTransform)
Sets the display transform. The display transform is used to transform the data prior to it being displayed.

Parameters:
transform - the new value for the displayTransform property
See Also:
getDisplayTransform()

setEditable

public void setEditable(boolean t)
Sets the specified boolean to indicate whether or not the TextArea is editable (accepts keystokes). If set to false, text in the TextArea can still be changed by using the setText() method.

Overrides:
setEditable in class java.awt.TextComponent
Parameters:
t - boolean value
See Also:
TextComponent.isEditable()

setErrorHandler

public void setErrorHandler(ErrorHandlerInterface errorHandler)
Sets the errorHandler for the textArea. Error handlers can display an appropriate error message when text fails validation rules specified by a validator. ErrorHandlers must implement the com.sas.util.errorhandlers.ErrorHandlerInterface.

Specified by:
setErrorHandler in interface ValidatorInterface
Parameters:
errorHandler - name of an errorHandler
See Also:
setValidator(com.sas.util.validators.ValidationInterface)

setKeystrokeUpdate

public void setKeystrokeUpdate(boolean value)
Sets the specified boolean to indicate whether an event is sent whenever a character is typed in the TextArea. Characters typed in the TextArea can be used for selecting an entry in a listbox or combobox that begins with the text typed in the TextArea. In addition to setting the keystrokeUpdate attribute to true,the keyboardSelectable attribute of the listbox/combobox must be set to true and a link must be established between the selectionPrefix attribute of the listbox/combobox (the source) and the keystrokeUpdate attribute (the target).

Parameters:
value - boolean value
See Also:
isKeystrokeUpdate()

setInputTransform

public void setInputTransform(com.sas.util.transforms.TransformInterface inputTransform)
Sets the input Transform. The inputTransform is used to transform the input to methods of the TextArea to the objects that are in the model.

Parameters:
the - new value for the inputTransform property
See Also:
getInputTransform()

setOutputTransform

public void setOutputTransform(com.sas.util.transforms.TransformInterface outputTransform)
Sets the output Transform. The outputTransform is used to transform the output from methods of the TextArea from the objects that are in the model.

Parameters:
transform - the new value for the outputTransform property
See Also:
getOutputTransform()

setRows

public void setRows(int rows)
Sets the number of rows for the TextArea.

Overrides:
setRows in class java.awt.TextArea
Parameters:
rows - number of rows
See Also:
TextArea.getRows()

setSelectionEnd

public void setSelectionEnd(int selectionEnd)
Sets the selection end to the specified position. The specified position is constrained to be at or after the current selection start. If the specified position is greater than the current text length, it will be set to the value of the current text length. Selection end is a zero-based property.

Overrides:
setSelectionEnd in class java.awt.TextComponent
Parameters:
selectionEnd - end position of the selected text
See Also:
TextComponent.getSelectionEnd()

setSelectionStart

public void setSelectionStart(int selectionStart)
Sets the selection start to the specified position. The specified position is constrained to be before or at the current selection end. Selection start is a zero-based property.If the specified position is less than zero, it will be set to zero.

Overrides:
setSelectionStart in class java.awt.TextComponent
Parameters:
selectionStart - start position of the selected text
See Also:
TextComponent.getSelectionStart()

setSelectRowText

public void setSelectRowText(boolean value)
Sets the value of the selectRowText property. If set to true, a mouse click or cursor movement to a new row will select all of the text in that row.

Parameters:
value - boolean value
See Also:
isSelectRowText()

setText

public void setText(java.lang.String text)
Sets the text of this TextArea to the specified text. If you add a listener for property changes on the text property, and you wish to change the text in the handler for the propertyChangeListener, you will need to change the model's text instead of issuing a setText(String).

Specified by:
setText in interface com.sas.lang.StringDataInterface
Overrides:
setText in class java.awt.TextComponent
Parameters:
text - text
See Also:
TextComponent.getText()

setTextOnModel

protected boolean setTextOnModel(java.lang.String text)
Internal routine that checks if a validator is set. If a validator is set, text is passed to the validator for validation. If the text passes the validation rules, the model is updated with the text.

See Also:
setValidator(com.sas.util.validators.ValidationInterface), setErrorHandler(com.sas.util.errorhandlers.ErrorHandlerInterface)

setValidator

public void setValidator(ValidationInterface validator)
Sets the validator for the textArea. If the text does not satisfy the criteria in the validator, an appropriate error message can be displayed if an error handler has been set through the setErrorHandler(errorHandler) method. Validators must implement the com.sas.util.validators.ValidationInterface.

Specified by:
setValidator in interface ValidatorInterface
Parameters:
validator - name of a validator
See Also:
getValidator()

transformStrings

protected com.sas.collection.OrderedCollection transformStrings(java.lang.String text)
Parses a string into an ordered collection of objects

Parameters:
text - string to be parsed
Returns:
orderedCollection

updateCaretPosition

public void updateCaretPosition()
Updates the caret position


updateOrderedCollectionModel

protected void updateOrderedCollectionModel(java.lang.String text)
Updates the ordered collection model

Parameters:
text - text to be added or text that will replace a current item



Copyright © 2009 SAS Institute Inc. All Rights Reserved.