borland Packages  Class Hierarchy  jbcl.view Package  Index 

TextFieldView component

java.lang.Object
   +----java.awt.Component
           +----java.awt.TextComponent
                   +----java.awt.TextField
                           +----borland.jbcl.view.TextFieldView
                                   +----borland.jbcl.control.TextFieldControl

About the TextFieldView component

Variables  Constructors  Properties  Methods  Event Listeners

Implements SingletonModelListener, SingletonModelView, ImageObserver, MenuContainer, Serializable, EventListener

The TextFieldView component is a view element for developing new composite components that display a single line of text.

The text displayed in the field comes from a SingletonModel data model.

To change the data in the field, set the text property. The readOnly property determines whether the text can be modified.


TextFieldView variables

Variables implemented in this class

Variables implemented in java.awt.Component

Variables implemented in java.awt.TextComponent

TextFieldView constructors

TextFieldView properties

*Read-only properties **Write-only properties

Properties implemented in this class

Properties implemented in java.awt.Component

Properties implemented in java.awt.TextComponent

Properties implemented in java.awt.TextField

Properties implemented in java.lang.Object

TextFieldView methods

Methods implemented in this class

Methods implemented in java.awt.Component

Methods implemented in java.awt.TextComponent

Methods implemented in java.awt.TextField

Methods implemented in java.lang.Object

TextFieldView event listeners


TextFieldView variables

locateOnly

  protected boolean locateOnly

model

  protected transient SingletonModel model

modelMulticaster

  protected transient SingletonModelMulticaster modelMulticaster

postOnFocusLost

  protected boolean postOnFocusLost

Specifies whether changes to the data displayed in the component are posted to the model whenever the component loses focus.

readOnly

  protected boolean readOnly

writeModel

  protected transient WritableSingletonModel writeModel

TextFieldView constructors

TextFieldView()

  public TextFieldView()

Constructs a TextFieldView. Calls java.awt.TextField(), then enables AWT focus and key events.


TextFieldView properties

model

 public SingletonModel getModel()
 public void setModel(borland.jbcl.model.SingletonModel sm)

Specifies the model object that manages the component's data item.

postOnFocusLost

 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.

readOnly

 public boolean isReadOnly()
 public void setReadOnly(boolean ro)

Specifies whether the user may change the data displayed in the component at runtime. readOnly also returns true if the model is not writable.

text

 public void setText(java.lang.String text)
Sets the text String that appears in the field view.

writeModel

 public WritableSingletonModel getWriteModel()

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.


TextFieldView methods

canSet(boolean)

  public boolean canSet(boolean startingEdit)
Determines if an edit session is beginning so the text in the field can be set. If canSet() returns true, the field can be edited; otherwise, it cannot.

Parameters:

startingEdit
Specify true, if editing should begin, or false if it should not.

postText()

  protected void postText()

Posts (writes) data displayed in the component to the data item in the model.

processFocusEvent(java.awt.event.FocusEvent)

  protected void processFocusEvent(java.awt.event.FocusEvent e)
Handles the posting of changed data when the component loses focus, if postOnFocusLost is true.

Parameters:

e
The FocusEvent that indicates focus was lost.

Overrides: java.awt.Component.processFocusEvent(java.awt.event.FocusEvent)

processKeyEvent(java.awt.event.KeyEvent)

  protected void processKeyEvent(java.awt.event.KeyEvent e)
Handles the the following keys when they are released:

Overrides: java.awt.Component.processKeyEvent(java.awt.event.KeyEvent)

setSuperText(java.lang.String)

  protected void setSuperText(java.lang.String text)

updateText()

  protected void updateText()

Refreshes the display of the data in the component from the data item.


TextFieldView event listeners

This component is a source for the following event sets. For information on the standard AWT event sets, see Standard Java events. For information on the JBCL event sets, see Events in JBCL.

action

 public synchronized void addActionListener(java.awt.event.ActionListener )
 public synchronized void removeActionListener(java.awt.event.ActionListener )

component

 public synchronized void addComponentListener(java.awt.event.ComponentListener )
 public synchronized void removeComponentListener(java.awt.event.ComponentListener )

focus

 public synchronized void addFocusListener(java.awt.event.FocusListener )
 public synchronized void removeFocusListener(java.awt.event.FocusListener )

key

 public synchronized void addKeyListener(java.awt.event.KeyListener )
 public synchronized void removeKeyListener(java.awt.event.KeyListener )

model

 public void addModelListener(borland.jbcl.model.SingletonModelListener l)
 public void removeModelListener(borland.jbcl.model.SingletonModelListener l)

mouse

 public synchronized void addMouseListener(java.awt.event.MouseListener )
 public synchronized void removeMouseListener(java.awt.event.MouseListener )

mouseMotion

 public synchronized void addMouseMotionListener(java.awt.event.MouseMotionListener )
 public synchronized void removeMouseMotionListener(java.awt.event.MouseMotionListener )

text

 public synchronized void addTextListener(java.awt.event.TextListener )
 public void removeTextListener(java.awt.event.TextListener )