borland.jbcl Packages borland.jbcl Class Hierarchy borland.jbcl.control
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, DataChangeListener, NavigationListener, SingletonModel, SingletonModelListener, WritableSingletonModel, BlackBox, SingletonView, MenuContainer, ImageObserver, Serializable, EventListener
Use the LocatorControl component to implement an interactive search in your application. 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.
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 for the search.
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.
If you include a 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 borland.jbcl.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: borland.jbcl.view.TextFieldView.postText()
protected void processKeyEvent(java.awt.event.KeyEvent e)
Overrides: 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: borland.jbcl.view.TextFieldView.updateText()
public synchronized void addActionListener(java.awt.event.ActionListener l) public synchronized void removeActionListener(java.awt.event.ActionListener l)
public synchronized void addComponentListener(java.awt.event.ComponentListener l) public synchronized void removeComponentListener(java.awt.event.ComponentListener l)
public synchronized void addFocusListener(java.awt.event.FocusListener l) public synchronized void removeFocusListener(java.awt.event.FocusListener l)
public synchronized void addKeyListener(java.awt.event.KeyListener l) public synchronized void removeKeyListener(java.awt.event.KeyListener l)
public void addModelListener(borland.jbcl.model.SingletonModelListener l) public void removeModelListener(borland.jbcl.model.SingletonModelListener l)
public synchronized void addMouseListener(java.awt.event.MouseListener l) public synchronized void removeMouseListener(java.awt.event.MouseListener l)
public synchronized void addMouseMotionListener(java.awt.event.MouseMotionListener l) public synchronized void removeMouseMotionListener(java.awt.event.MouseMotionListener l)
public synchronized void addTextListener(java.awt.event.TextListener l) public void removeTextListener(java.awt.event.TextListener l)