jbcl.control Package
java.lang.Object +----java.awt.Component +----java.awt.TextComponent +----java.awt.TextField +----com.borland.jbcl.view.TextFieldView +----com.borland.jbcl.control.TextFieldControl +----com.borland.jbcl.control.LocatorControl
Variables Constructors Properties Methods Event Listeners
Implements AccessListener, ColumnAware, DataChangeListener, DataSetAware, SingletonModel, SingletonModelListener, WritableSingletonModel, BlackBox, SingletonModelView, ImageObserver, MenuContainer, Serializable, EventListener
The TextFieldControl
is a graphical user interface
element for displaying and editing a string. It is designed to
function similarly to java.awt.TextField
but provides the greater flexibility of model-view composition.
It is also a data-aware control.
Specify the data set that contains the field to be edited with
the dataSet
property and specify the column with the columnName
property. Setting the text
property to a new value
modifies the field in the data set.
If the readOnly
property inherited from TextFieldView
,
is true, the data in the control cannot be edited.
While a TextFieldControl
displays a single line of
text, a TextAreaControl
displays plays multiple lines of text and is scrollable, and is
therefore more suitable for displaying large amounts of text. If
you need to display a specified string only and don't need a
composite or data-aware control, consider using the
TextControl
component instead. If you need to display data other than just
text, consider the FieldControl
component.
public TextFieldControl()
public String getColumnName() public void setColumnName(String newColumnName)Stores the name of the
Column
in the DataSet
that contains
the data to display in the TextFieldControl
.
public DataSet getDataSet() public void setDataSet(DataSet newDataSet)Specifies a
com.borland.dx.dataset.DataSet
object that provides the data to display in the TextFieldControl
.
public void setModel(SingletonModel sm)
Checks for recursive model creation, then calls
super.setModel(), which is jbcl.view.TextFieldView.setModel()
.
public void setText(String text)
Determines the string that appears in the control. If the dataSet
and columnName
properties are set, setting the text
property edits the field in the data set.
public void addNotify()
Overrides: java.awt.TextField.addNotify()
protected void postText()Writes the text to the data item.
Overrides: com.borland.jbcl.view.TextFieldView.postText()
protected void processKeyEvent(KeyEvent e)
Calls super.processKeyEvent(e), posts the text, then does the
following actions in the DataSet
that supplies the TextFieldControl
:
Overrides: com.borland.jbcl.view.TextFieldView.processKeyEvent(KeyEvent)
protected void updateText()
Modifies the text in the field.
Overrides: com.borland.jbcl.view.TextFieldView.updateText()
public synchronized void addActionListener(java.awt.event.ActionListener ) public synchronized void removeActionListener(java.awt.event.ActionListener )
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 addInputMethodListener(java.awt.event.InputMethodListener ) public synchronized void removeInputMethodListener(java.awt.event.InputMethodListener )
public synchronized void addKeyListener(java.awt.event.KeyListener ) public synchronized void removeKeyListener(java.awt.event.KeyListener )
public void addModelListener(SingletonModelListener l) public void removeModelListener(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 addPropertyChangeListener(java.beans.PropertyChangeListener ) public synchronized void removePropertyChangeListener(java.beans.PropertyChangeListener )
public synchronized void addTextListener(java.awt.event.TextListener ) public synchronized void removeTextListener(java.awt.event.TextListener )