borland Packages  Class Hierarchy  jbcl.control Package  Index 

LocatorControl component

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

About the LocatorControl component

Variables  Constructors  Properties  Methods  Event Listeners

Implements AccessListener, ColumnAware, DataChangeListener, DataSetAware, NavigationListener, SingletonModel, SingletonModelListener, WritableSingletonModel, BlackBox, SingletonModelView, ImageObserver, MenuContainer, Serializable, EventListener

Use the LocatorControl component (available from the Data Express 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 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.


LocatorControl variables

Variables implemented in borland.jbcl.view.TextFieldView

Variables implemented in java.awt.Component

Variables implemented in java.awt.TextComponent

LocatorControl constructors

LocatorControl properties

*Read-only properties **Write-only properties

Properties implemented in this class

Properties implemented in borland.jbcl.control.TextFieldControl

Properties implemented in borland.jbcl.view.TextFieldView

Properties implemented in java.awt.Component

Properties implemented in java.awt.TextComponent

Properties implemented in java.awt.TextField

Properties implemented in java.lang.Object

LocatorControl methods

Methods implemented in this class

Methods implemented in borland.jbcl.control.TextFieldControl

Methods implemented in borland.jbcl.view.TextFieldView

Methods implemented in java.awt.Component

Methods implemented in java.awt.TextComponent

Methods implemented in java.awt.TextField

Methods implemented in java.lang.Object

LocatorControl event listeners


LocatorControl constructors

LocatorControl()

  public LocatorControl()

Constructs a LocatorControl component.


LocatorControl properties

caseSensitive

 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.

LocatorControl methods

postText()

  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()

processKeyEvent(java.awt.event.KeyEvent)

  protected void processKeyEvent(java.awt.event.KeyEvent e)

Overrides: borland.jbcl.view.TextFieldView.processKeyEvent(java.awt.event.KeyEvent)

updateText()

  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()


LocatorControl 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 )