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
Use the LocatorControl
component (available from the JBCL tab of the JBuilder Component Palette)
to implement an interactive search in your application. You enter the value to search for in the
LocatorControl
and the locate is performed in the associated DataSet
.
When searching in String
columns, the search is incremental. The locate is performed in the
associated DataSet
as each character is typed into the component. The locate is not case-sensitive
and allows for a partial match. For example, for a table of film directors where the only names that start
with the letter "R" are "Reynolds", "Robbins", and "Rodriguez", typing "r" would first take you to "Reynolds". Then typing "o" would result in "ro" in the LocatorControl
and take you to the first name that starts with "ro": "Robbins". Then typing "d" would take you to "Rodriguez".
The LocatorControl
is usually used in conjunction with another data-aware control using the
same DataSet
, such as a GridControl
.
If so, the current match is highlighted in the UI control as the incremental search is performed.
If the column is not a character column, such as a number or time, no partial locate is performed as keys are typed. A locate is performed only when the Enter key is typed.
You can specify the column to search in, or use the default locate column. If a
columnName
is assigned
to the LocatorControl
, that column is used for the search only; the LocatorControl
does
not display data from that column, nor does it update the column with the value typed into it. If no
column is assigned to the columnName
property, the LocatorControl
uses the column indicated by the cursor's
lastColumnVisited
property for
the search.
If you include a com.borland.jbcl.control.StatusBar
in your application, messages generated from the locate operation are displayed on the StatusBar
.
For an example on locating data using a LocatorControl
in your application, see the
Locating data with the LocatorControl
topic in the Database Application Developer's Guide.
public LocatorControl()
Constructs a LocatorControl
component.
public boolean isCaseSensitive() public void setCaseSensitive(boolean caseSensitive)Stores whether the locate is effected with or without case-sensitivity. This property defaults to
CASE_INSENSITIVE
as defined in
com.borland.dx.dataset.Locate
variables.
protected void postText()
This overriding method does nothing; this prevents the value in the LocatorControl
from being posted to the data item in the DataSet
.
Overrides: com.borland.jbcl.view.TextFieldView.postText()
protected void processKeyEvent(KeyEvent e)
Overrides: com.borland.jbcl.view.TextFieldView.processKeyEvent(java.awt.event.KeyEvent)
protected void updateText()This overriding method does nothing; this prevents the value in the associated
Column
of the DataSet
from being displayed in the LocatorControl
.
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 )