borland Packages Class Hierarchy dbswing Package
java.lang.Object +----java.awt.Component +----java.awt.Container +----javax.swing.JComponent +----javax.swing.text.JTextComponent +----javax.swing.JTextField +----com.borland.dbswing.JdbNavField
Variables Constructors Properties Methods Event Listeners
Implements ColumnAware, DataSetAware, ImageObserver, MenuContainer, Serializable, Accessible, Scrollable, SwingConstants
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.
JdbTextField
public static final String locateEnterAction = "locate-enter"Name of action which invokes Locate on
JdbNavField
's current text.
public static final String locateNextAction = "locate-next"Name of action which invokes Locate for the subsequent row containing
JdbNavField
's current text.
public static final String locatePreviousAction = "locate-previous"Name of action which invokes Locate for the previous row containing
JdbNavField
's current text.
public JdbNavField()Constructs a
JdbNavField
, calling the null
constructor of its superclass.
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.
columns
public JdbNavField(String text)Constructs a
JdbNavField
that initially displays the specified text, calling the constructor of its superclass that takes a String
.
text
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.
text
columns
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.
doc
text
columns
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
.
public boolean isCaseSensitive() public void setCaseSensitive(boolean caseSensitive)Returns and sets whether the search is case sensitive.
public String getColumnName() public void setColumnName(String columnName)Returns and sets the column name of the
DataSet
in which the navigation occurs.
public DataSet getDataSet() public void setDataSet(DataSet dataSet)Returns and sets the
DataSet
in which the navigation occurs.
public void addNotify()Calls the
addNotify()
method of the superclass and opens the DataSet
.
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.
protected Document createDefaultModel()Returns a new
JdbNavFieldDocument
, which is an inner class, defined in JdbNavField
, that extends PlainDocument
.
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.
public synchronized void addActionListener(java.awt.event.ActionListener ) public synchronized void removeActionListener(java.awt.event.ActionListener )
public void addAncestorListener(javax.swing.event.AncestorListener ) public void removeAncestorListener(javax.swing.event.AncestorListener )
public void addCaretListener(javax.swing.event.CaretListener ) public void removeCaretListener(javax.swing.event.CaretListener )
public synchronized void addComponentListener(java.awt.event.ComponentListener ) public synchronized void removeComponentListener(java.awt.event.ComponentListener )
public synchronized void addContainerListener(java.awt.event.ContainerListener ) public synchronized void removeContainerListener(java.awt.event.ContainerListener )
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 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 addVetoableChangeListener(java.beans.VetoableChangeListener ) public synchronized void removeVetoableChangeListener(java.beans.VetoableChangeListener )