borland Packages Class Hierarchy dbswing Package
java.lang.Object +----java.awt.Component +----java.awt.Container +----javax.swing.JComponent +----javax.swing.JSlider +----com.borland.dbswing.JdbSlider
Variables Constructors Properties Methods Event Listeners
Implements DBDataBinder, ColumnAware, DataSetAware, ImageObserver, MenuContainer, Serializable, Accessible, SwingConstants
JdbSlider
is a data-aware subclass of
javax.swing.JSlider
. It adds the following properties:
dataSet
- The DataSet
to which the slider value is assigned.
columnName
- The numeric Column
of the specified DataSet
to which the value is assigned.
unknownDataValueMode
- The policy for synchronizing slider state when an out-of-range DataSet
data value is encountered.
JdbSlider
sets its background
, foreground
, and font
properties from those defined on Column
columnName
, if one is defined, unless these properties are explicitly set on the JdbSlider
itself.
JdbSlider
can be bound to a column with an integral value only (such as int, short, and so on). In some cases it may be feasible to coerce non-integral data from a server table to an integer type, but be sure this doesn't create problems when you save changes back to the server.
JdbSlider
cannot display a null
column value differently than a minimum value. You should consider forcing every row in the DataSet
to have a value in the slider's Column
by setting the Column
's default
property. Don't try to use the slider's initial value for this; the slider is set to this value only once, not for every new, empty row.
DBSliderDataBinder
protected DBSliderDataBinder dataBinderThe
DBButtonDataBinder
that makes this a data-aware component.
public JdbSlider()Creates a
JdbSlider
by calling the constructor of this
class which takes four int
values as parameters. Passes default values of HORIZONTAL, 0, 100, and 50 to the other constructor.
public JdbSlider(int orientation)Creates a
JdbSlider
and specifies whether the slider is oriented horizontally or vertically. This constructor calls the constructor of this
class which takes four int
values as parameters. It passes that constructor the specified orientation
, along with default values of 0, 100, and 50.
orientation
public JdbSlider(int min, int max)Creates a
JdbSlider
and specifies the minimum and maximum values supported by the slider. Calls the constructor of this
class which takes four int
values as parameters. Passes the specified minimum and maximum values, along with default values of HORIZONTAL for the orientation
and 50 for the value
, to that constructor.
min
max
public JdbSlider(int min, int max, int value)Creates a
JdbSlider
and specifies the minimum and maximum values supported by the slider and sets its initial position. Calls the constructor of this
class which takes four int
values as parameters. Passes the specified min
, max
, and value
, along with a default orientation
of HORIZONTAL to that constructor.
min
max
value
public JdbSlider(int orientation, int min, int max, int value)Creates a
JdbSlider
and specifies its orientation, specifies the minimum and maximum values supported by the slider, and sets its initial position, by calling the constructor of its superclass which takes these four parameters. This constructor is called by most of the other JdbSlider
constructors.
orientation
min
max
value
public JdbSlider(BoundedRangeModel model)Creates a
JdbSlider
that gets its orientation, minimum and maximum supported values, and its current position from the specified model. Calls the constructor of its superclass which takes a BoundedRangeModel
as a parameter. This is the only constructor of JdbSlider
which does not invoke the constructor of this
class that takes four int
values as parameters.
model
BoundedRangeModel
that contains the orientation, minimum and maximum supported values, and the current position of the slider.
public String getColumnName() public void setColumnName(String columnName)Returns and sets the column name of the
DataSet
from which values are to be read and to which values are to be written.
dataSet
public DataSet getDataSet() public void setDataSet(DataSet dataSet)Returns and sets the
DataSet
from which values are read and to which values are written.
columnName
public int getUnknownDataValueMode() public void setUnknownDataValueMode(int mode)Returns and sets the policy for setting slider position when synchronizing a slider with a
DataSet
value outside its bounded model's range. These are the possible mode
values:
DataSet
value is less than the slider's minimum value, the slider is set to the minimum value; if the value is greater than the slider's maximum value, the slider is set to the maximum value.
DataSet
is cleared.
public void addAncestorListener(javax.swing.event.AncestorListener ) public void removeAncestorListener(javax.swing.event.AncestorListener )
public void addChangeListener(javax.swing.event.ChangeListener ) public void removeChangeListener(javax.swing.event.ChangeListener )
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 )