borland Packages  Class Hierarchy  dbswing Package 

JdbNavField component

java.lang.Object
   +----java.awt.Component
           +----java.awt.Container
                   +----javax.swing.JComponent
                           +----javax.swing.text.JTextComponent
                                   +----javax.swing.JTextField
                                           +----com.borland.dbswing.JdbNavField

About the JdbNavField component

Variables  Constructors  Properties  Methods  Event Listeners

Implements ColumnAware, DataSetAware, ImageObserver, MenuContainer, Serializable, Accessible, Scrollable, SwingConstants

Note: This is a feature of JBuilder Professional and Enterprise.

JdbNavField is a JTextField with built-in row locating functionality when its DataSet property is set. If its columnName property is set, it locates data in that column only. If the columnName property is not set, it locates data in the DataSet column that had focus last in a JdbTable. If no column had focus in a JdbTable, the first column in the DataSet that supports locate operations is chosen. Unlike JdbTextField, JdbNavField never writes to a DataSet column.

If the column searched is of type String, the search occurs incrementally as characters are typed. If the search string is all lowercase, then the search is case insensitive. If the search string is mixed case, then the search is case sensitive.

If the column searched is not of type String, the search doesn't occur until the Enter key is pressed.

To search for prior and next matches, use the up and down arrow keys, respectively. If a JdbStatusLabel is present, it displays current usage information about the JdbNavField, such as whether or not a matching column value was found.

See also: JdbTextField


JdbNavField variables

Variables implemented in this class

Variables implemented in java.awt.Component

Variables implemented in javax.swing.JComponent

Variables implemented in javax.swing.JTextField

Variables implemented in javax.swing.text.JTextComponent

JdbNavField constructors

JdbNavField properties

*Read-only properties **Write-only properties

Properties implemented in this class

Properties implemented in java.awt.Component

Properties implemented in java.awt.Container

Properties implemented in java.lang.Object

Properties implemented in javax.swing.JComponent

Properties implemented in javax.swing.JTextField

Properties implemented in javax.swing.text.JTextComponent

JdbNavField methods

Methods implemented in this class

Methods implemented in java.awt.Component

Methods implemented in java.awt.Container

Methods implemented in java.lang.Object

Methods implemented in javax.swing.JComponent

Methods implemented in javax.swing.JTextField

Methods implemented in javax.swing.text.JTextComponent

JdbNavField event listeners


JdbNavField variables

locateEnterAction

  public static final String locateEnterAction = "locate-enter"
Name of action which invokes Locate on JdbNavField's current text.

locateNextAction

  public static final String locateNextAction = "locate-next"
Name of action which invokes Locate for the subsequent row containing JdbNavField's current text.

locatePreviousAction

  public static final String locatePreviousAction = "locate-previous"
Name of action which invokes Locate for the previous row containing JdbNavField's current text.

JdbNavField constructors

JdbNavField()

  public JdbNavField()
Constructs a JdbNavField, calling the null constructor of its superclass.

JdbNavField(int)

  public JdbNavField(int columns)
Constructs a JdbNavField that displays the specified number of character columns, calling the constructor of its superclass that takes an int.

Note that the columns parameter is not related to the rows and columns of a DataSet, and is only a request for the desired width of the control. Depending on the font you use, you may see many more characters in the control than the value of columns leads you to expect.

Not all layouts will respect this requested width. FlowLayout will, for example, but BorderLayout won't. XYLayout will as long as you don't resize the control.

Parameters:

columns
The number of visible character columns the field can display; independent of the width of the field.

JdbNavField(java.lang.String)

  public JdbNavField(String text)
Constructs a JdbNavField that initially displays the specified text, calling the constructor of its superclass that takes a String.

Parameters:

text
The text that initially displays in the field.

JdbNavField(java.lang.String, int)

  public JdbNavField(String text, int columns)
Constructs a JdbNavField of the specified width that initially displays the specified text, calling the constructor of its superclass that takes a String and an int.

Note that the columns parameter is not related to the rows and columns of a DataSet, and is only a request for the desired width of the control. Depending on the font you use, you may see many more characters in the control than the value of columns leads you to expect.

Not all layouts will respect this requested width. FlowLayout will, for example, but BorderLayout won't. XYLayout will as long as you don't resize the control.

Parameters:

text
The text that initially displays in the field.
columns
The number of visible character columns the field can display; independent of the width of the field.

JdbNavField(javax.swing.text.Document, java.lang.String, int)

  public JdbNavField(Document doc, String text, int columns)
Constructs a JdbNavField of the specified width that uses a storage text model and that initially displays the specified text, calling the constructor of its superclass that takes a Document, a String, and an int.

Note that the columns parameter is not related to the rows and columns of a DataSet, and is only a request for the desired width of the control. Depending on the font you use, you may see many more characters in the control than the value of columns leads you to expect.

Not all layouts will respect this requested width. FlowLayout will, for example, but BorderLayout won't. XYLayout will as long as you don't resize the control.

Parameters:

doc
The storage text model.
text
The text that initially displays in the field.
columns
The number of visible character columns the field can display; independent of the width of the field.

JdbNavField properties

actions

 public Action[] getActions()
Returns an array of Action objects. If you want to extend JdbNavField, call getActions() to get the array of Action objects for JdbNavField and combine it with your own array of Actions that specify the new actions you want to give your extended JdbNavField.

caseSensitive

 public boolean isCaseSensitive()
 public void setCaseSensitive(boolean caseSensitive)
Returns and sets whether the search is case sensitive.

columnName

 public String getColumnName()
 public void setColumnName(String columnName)
Returns and sets the column name of the DataSet in which the navigation occurs.

dataSet

 public DataSet getDataSet()
 public void setDataSet(DataSet dataSet)
Returns and sets the DataSet in which the navigation occurs.

JdbNavField methods

addNotify()

  public void addNotify()
Calls the addNotify() method of the superclass and opens the DataSet.

Overrides: javax.swing.JComponent.addNotify()

commonInit()

  protected void commonInit()
Used to initialize JdbNavField with the same defaults, regardless of the constructor used. A newly instantiated JdbNavField differs from a JTextField in that it has a non-blinking cursor, and slightly larger left and right margins.

createDefaultModel()

  protected Document createDefaultModel()
Returns a new JdbNavFieldDocument, which is an inner class, defined in JdbNavField, that extends PlainDocument.

Overrides: javax.swing.JTextField.createDefaultModel()

processInputMethodEvent(java.awt.event.InputMethodEvent)

  protected void processInputMethodEvent(InputMethodEvent e)
Processes input method events occurring on this component by dispatching them to any registered InputMethodListener objects. This method is not called unless input method events are enabled for this component.

Overrides: javax.swing.text.JTextComponent.processInputMethodEvent(java.awt.event.InputMethodEvent)


JdbNavField event listeners

This component is a source for the following event sets.

action

 public synchronized void addActionListener(java.awt.event.ActionListener )
 public synchronized void removeActionListener(java.awt.event.ActionListener )

ancestor

 public void addAncestorListener(javax.swing.event.AncestorListener )
 public void removeAncestorListener(javax.swing.event.AncestorListener )

caret

 public void addCaretListener(javax.swing.event.CaretListener )
 public void removeCaretListener(javax.swing.event.CaretListener )

component

 public synchronized void addComponentListener(java.awt.event.ComponentListener )
 public synchronized void removeComponentListener(java.awt.event.ComponentListener )

container

 public synchronized void addContainerListener(java.awt.event.ContainerListener )
 public synchronized void removeContainerListener(java.awt.event.ContainerListener )

focus

 public synchronized void addFocusListener(java.awt.event.FocusListener )
 public synchronized void removeFocusListener(java.awt.event.FocusListener )

inputMethod

 public synchronized void addInputMethodListener(java.awt.event.InputMethodListener )
 public synchronized void removeInputMethodListener(java.awt.event.InputMethodListener )

key

 public synchronized void addKeyListener(java.awt.event.KeyListener )
 public synchronized void removeKeyListener(java.awt.event.KeyListener )

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 )

propertyChange

 public synchronized void addPropertyChangeListener(java.beans.PropertyChangeListener )
 public synchronized void removePropertyChangeListener(java.beans.PropertyChangeListener )

vetoableChange

 public synchronized void addVetoableChangeListener(java.beans.VetoableChangeListener )
 public synchronized void removeVetoableChangeListener(java.beans.VetoableChangeListener )