borland Packages Class Hierarchy jbcl.view Package Index
java.lang.Object +----java.awt.Component +----java.awt.TextComponent +----java.awt.TextArea +----borland.jbcl.view.TextAreaView +----borland.jbcl.control.TextAreaControl
Variables Constructors Properties Methods Event Listeners
Implements SingletonModelListener, SingletonModelView, ImageObserver, MenuContainer, Serializable, EventListener
The TextAreaView component is a view element for developing new composite components that display multiple lines of text in a scrolling region. It requires a SingletonModel data model and a SingletonViewManager view manager.
Set the data in the text area view using the text property. The readOnly property determines whether the text can be edited; it if is true, the text cannot be edited.
To save the data in the view, call the postText() method. If postOnLostFocus is true, the text is posted to the model when the view loses the focus.
protected transient SingletonModel model
protected transient SingletonModelMulticaster modelMulticaster
protected boolean postOnFocusLost
protected int preferredHeight
protected int preferredWidth
protected boolean readOnly
protected transient WritableSingletonModel writeModel
public TextAreaView()Constructs a TextAreaView.
public SingletonModel getModel() public void setModel(borland.jbcl.model.SingletonModel sm)
Specifies the model object that manages the component's data item.
public boolean isPostOnFocusLost() public void setPostOnFocusLost(boolean post)
Specifies whether changes to the data displayed in the component are posted to the model whenever the component loses focus.
public int getPreferredHeight() public void setPreferredHeight(int preferredHeight)Determines the preferred height of the text area view.
public Dimension getPreferredSize()Returns the preferred size of the text area view.
public int getPreferredWidth() public void setPreferredWidth(int preferredWidth)Determines the preferred width of the text area view.
public boolean isReadOnly() public void setReadOnly(boolean ro)
Specifies whether the user may change the data displayed in the component at runtime. The readOnly property also returns true if the model is not writable.
public void setText(java.lang.String text)Sets the text that appears in the text area view.
public WritableSingletonModel getWriteModel()A read-only property that specifies the model object used for writing data. writeModel is null if readOnly is true or the model is not writable.
public void append(java.lang.String text)
Overrides: java.awt.TextArea.append(java.lang.String) Appends the specified text to the TextAreaView. Specify the text to be appended as the value of the text parameter.
protected void postText()
Posts (writes) data displayed in the component to the data item.
protected void processFocusEvent(java.awt.event.FocusEvent e)
Handles the posting of changed data when the component loses focus, if postOnFocusLost is true.
protected void processKeyEvent(java.awt.event.KeyEvent e)
Handles the the following keys when they are released:
protected void setSuperText(java.lang.String text)
protected void updateText()Refreshes the display of the data in the component from the data item.
public synchronized void addComponentListener(java.awt.event.ComponentListener ) public synchronized void removeComponentListener(java.awt.event.ComponentListener )
public synchronized void addFocusListener(java.awt.event.FocusListener ) public synchronized void removeFocusListener(java.awt.event.FocusListener )
public synchronized void addKeyListener(java.awt.event.KeyListener ) public synchronized void removeKeyListener(java.awt.event.KeyListener )
public void addModelListener(borland.jbcl.model.SingletonModelListener l) public void removeModelListener(borland.jbcl.model.SingletonModelListener l)
public synchronized void addMouseListener(java.awt.event.MouseListener ) public synchronized void removeMouseListener(java.awt.event.MouseListener )
public synchronized void addMouseMotionListener(java.awt.event.MouseMotionListener ) public synchronized void removeMouseMotionListener(java.awt.event.MouseMotionListener )
public synchronized void addTextListener(java.awt.event.TextListener ) public void removeTextListener(java.awt.event.TextListener )