SilverStream
Application Server 3.5

com.sssw.rt.form
Class AgcTextArea

java.lang.Object
 |
 +--java.awt.Component
       |
       +--java.awt.TextComponent
             |
             +--java.awt.TextArea
                   |
                   +--com.sssw.rt.atlas.AtTextArea
                         |
                         +--com.sssw.rt.form.AgcTextArea
All Implemented Interfaces:
AgiControl, AgiHelpInfo, ImageObserver, MenuContainer, Serializable

public class AgcTextArea
extends com.sssw.rt.atlas.AtTextArea
implements AgiControl

A text editor that creates and maintains multi-line text that requires no special formatting like bold, italic, or underline.

Properties:
Background Color, Control Type, Data Column, Editable, Enabled, Font Name, Font Size, Font Style, Height, Help Page, Horizontal Scrollbar, Left, Line Wrap, Line Wrap style, Name, Text Color, Tool Tip, Top, Validation Rules, Vertical Scrollbar, Visible, Width
Events:
focusGained, focusLost, keyPressed, keyReleased, keyTyped, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, textValueChanged, validationFailed, validationTest, valueChanged
See Also:
Serialized Form

Fields inherited from class java.awt.TextArea
SCROLLBARS_BOTH, SCROLLBARS_HORIZONTAL_ONLY, SCROLLBARS_NONE, SCROLLBARS_VERTICAL_ONLY
 
Fields inherited from class java.awt.TextComponent
textListener
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface com.sssw.rt.form.AgiControl
IMAGE_MODE_CENTERED, IMAGE_MODE_NORMAL, IMAGE_MODE_STRETCH, IMAGE_MODE_TILED
 
Constructor Summary
AgcTextArea()
           
 
Method Summary
 Color getBackgroundColor()
          Deprecated. use Component.getBackground().
 boolean getEditable()
          Deprecated. use TextComponent.isEditable().
 boolean getEmptyStringIsNull()
          Returns true if the "value" of any empty text control should be null, instead of the empty String.
 AgoFontIdentifier getFontIdentifier()
          Returns the SilverStream font object (AgoFontIdentifier) for the control's text.
 Color getTextColor()
          Deprecated. use Component.getForeground().
 void setBackgroundColor(Color backgroundcolor)
          Deprecated. use Component.setBackground(Color).
 void setEmptyStringIsNull(boolean b)
          If set to true, then the value of an empty text control is null, instead of the empty String.
 void setFontIdentifier(AgoFontIdentifier fontidentifier)
          Assigns the SilverStream font object (AgoFontIdentifier) to the control's text.
 void setTextColor(Color color)
          Deprecated. use Component.setForeground(Color).
 
Methods inherited from class com.sssw.rt.atlas.AtTextArea
deliverMouseEvent, deliverMouseMoveEvent, doAtCommand, enableAtCommands, getHelper, getToolTipText, getToolTipText, grabFocus, isFocusTraversable, isRequestFocusEnabled, preprocessKeyEvent, processEvent, requestFocus, setRequestFocusEnabled, setToolTipText
 
Methods inherited from class java.awt.TextArea
addNotify, append, appendText, getColumns, getMinimumSize, getMinimumSize, getPreferredSize, getPreferredSize, getRows, getScrollbarVisibility, insert, insertText, minimumSize, minimumSize, paramString, preferredSize, preferredSize, replaceRange, replaceText, setColumns, setRows
 
Methods inherited from class java.awt.TextComponent
addTextListener, getCaretPosition, getSelectedText, getSelectionEnd, getSelectionStart, getText, isEditable, processTextEvent, removeNotify, removeTextListener, select, selectAll, setCaretPosition, setEditable, setSelectionEnd, setSelectionStart, setText
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent, prepareImage, prepareImage, print, printAll, processComponentEvent, processFocusEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods implemented from interface com.sssw.rt.form.AgiControl
getBackgroundImage, getBackgroundImageMode, getComponent, getHelpInfo, setBackgroundImage, setBackgroundImageMode, setHelpInfo
 

Constructor Detail

AgcTextArea

public AgcTextArea()
Method Detail

getEmptyStringIsNull

public boolean getEmptyStringIsNull()
Returns true if the "value" of any empty text control should be null, instead of the empty String. The value is what gets written to the database, for a data-bound control. Default is false. Note that getText() still returns the empty String, regardless of this setting.

setEmptyStringIsNull

public void setEmptyStringIsNull(boolean b)
If set to true, then the value of an empty text control is null, instead of the empty String.

getFontIdentifier

public AgoFontIdentifier getFontIdentifier()
Returns the SilverStream font object (AgoFontIdentifier) for the control's text.
Usage:

The AgoFontIdentifier object consists of three parts: a Font Name, a Font Style and a Font Size. The Font Style can be one of these values:

  • AgoFontIdentifier.PLAIN
  • AgoFontIdentifier.BOLD
  • AgoFontIdentifier.ITALIC
  • AgoFontIdentifier.BOLD + AgoFontIdentifier.ITALIC

The Font Name can be one of these values: Dialog, SansSerif, Serif, Monospaced, Helvetica, TimesRoman, Courier, DialogInput, Zapfdingbats.

At runtime, Java translates this value to the appropriate font installed on the system.

The Font Size can be any integer.

Example:

The following code fragment illustrates how to construct a new AgoFontIdentifier object (called newFont) and how to call the getFontIdentifier() method:

  AgoFontIdentifier font;
  font = TextArea1.getFontIdentifier();
 
See Also:
AgcTextArea.setFontIdentifier(AgoFontIdentifier), Font Name property, Font Size property, Font Style property

setFontIdentifier

public void setFontIdentifier(AgoFontIdentifier fontidentifier)
Assigns the SilverStream font object (AgoFontIdentifier) to the control's text.
Parameters:
fontidentifier - specifies the AgoFontIdentifier object that assigns the font for the control
Usage:

The AgoFontIdentifier object consists of three parts: a Font Name, a Font Style and a Font Size. The Font Name can be one of these values: Dialog, SansSerif, Serif, Monospaced, Helvetica, TimesRoman, Courier, DialogInput, Zapfdingbats. At runtime, Java translates this value to the appropriate font installed on the system.

The Font Size can be any integer.

The Font Style can be one of these values:

  • AgoFontIdentifier.PLAIN
  • AgoFontIdentifier.BOLD
  • AgoFontIdentifier.ITALIC
  • AgoFontIdentifier.BOLD + AgoFontIdentifier.ITALIC
Example:

This code fragment illustrates how to construct a new AgoFontIdentifier object (called newFont) and how to call the setFontIdentifier() method:

  AgoFontIdentifier     newFont;
  String		   newName;
  int	           newSize;
  int		   newStyle;
 
  newName="TimesRoman";
  newSize=20;
  newStyle=AgoFontIdentifier.ITALIC;
  newFont=new AgoFontIdentifier(newName, newStyle, newSize);
 
  TextArea1.setFontIdentifier(newFont);
 
See Also:
AgcTextArea.getFontIdentifier(), Font Name property, Font Size property, Font Style property

getBackgroundColor

public Color getBackgroundColor()
Deprecated. use Component.getBackground().

(AgiControl) Get the Component Background Color. Returns the Color object associated with the control's background.
Example:

This example illustrates how to obtain the background Color of a control.

  Color bgColor;
  bgColor = TextArea1.getBackgroundColor();
 
See Also:
AgcTextArea.setBackgroundColor(Color)

setBackgroundColor

public void setBackgroundColor(Color backgroundcolor)
Deprecated. use Component.setBackground(Color).

Assigns the text area's background Color.
Parameters:
backgroundcolor - the instance of a java.awt.Color object or one of the Color constants, for example, Color.red.
Usage:

For controls that support it, the Transparent property must be false for the background Color to show.

Example:

The following example illustrates how to set the background Color on a control using one of the Color constants:

  TextArea1.setBackgroundColor(Color.white);
 
This example illustrates how to create a new Color and then use it to set the background Color:
  Color colLabelColor = new Color(247, 247, 222);
 TextArea1.setBackgroundColor(colLabelColor);
 
See Also:
AgcTextArea.getBackgroundColor()

getEditable

public boolean getEditable()
Deprecated. use TextComponent.isEditable().

Returns a boolean that indicates whether or not the user can edit the control's text.
Usage:

When getEditable returns true, the user can edit the text. If the control is enabled but not editable, the user cannot change the value of the text, but can select, copy, and scroll the text.

Example:

The following code fragment illustrates how to use the getEditable() method.

  boolean editable;
  editable = TextArea1.getEditable();
 
See Also:
Editable property

getTextColor

public Color getTextColor()
Deprecated. use Component.getForeground().

Returns the java.awt.Color object of the Text Area text.
Example:

The following code fragment illustrates how to use the getTextColor() method.

  Color c;
  c = TextArea1.getTextColor();
 
See Also:
AgcTextArea.setTextColor(Color)

setTextColor

public void setTextColor(Color color)
Deprecated. use Component.setForeground(Color).

Assigns an instance of the java.awt.Color to the control's text.
Parameters:
color - specifies the instance of a java.awt.Color Object or one of the Color constants, for example, Color.red.
Example:

The following code fragment illustrates how to set the text Color to red.

 TextArea1.setTextColor(Color.red);
 
See Also:
AgcTextArea.getTextColor()

SilverStream
Application Server 3.5