borland Packages Class Hierarchy jbcl.control Package Index
java.lang.Object +----java.awt.Component +----java.awt.TextComponent +----java.awt.TextField +----borland.jbcl.view.TextFieldView +----borland.jbcl.control.TextFieldControl +----borland.jbcl.control.LocatorControl
Variables Constructors Properties Methods Event Listeners
Implements AccessListener, ColumnAware, DataChangeListener, DataSetAware, NavigationListener, 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 false, 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(java.lang.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(borland.jbcl.dataset.DataSet newDataSet)Specifies a borland.jbcl.dataset.DataSet object that provides the data to display in the TextFieldControl.
public void setModel(borland.jbcl.model.SingletonModel sm)
Checks for recursive model creation, then calls super.setModel(), which is jbcl.view.TextFieldView.setModel().
public void setText(java.lang.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: borland.jbcl.view.TextFieldView.postText()
protected void processKeyEvent(java.awt.event.KeyEvent e)
Calls super.processKeyEvent(e), posts the text, then does the following actions in the DataSet that supplies the TextFieldControl:
Overrides: borland.jbcl.view.TextFieldView.processKeyEvent(KeyEvent)
protected void updateText()
Modifies the text in the field.
Overrides: 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 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 )