borland Packages  Class Hierarchy  dbswing Package 

JdbSlider component

java.lang.Object
   +----java.awt.Component
           +----java.awt.Container
                   +----javax.swing.JComponent
                           +----javax.swing.JSlider
                                   +----com.borland.dbswing.JdbSlider

About the JdbSlider component

Variables  Constructors  Properties  Methods  Event Listeners

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

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

JdbSlider is a data-aware subclass of javax.swing.JSlider. It adds the following properties:

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.

See also: DBSliderDataBinder


JdbSlider variables

Variables implemented in this class

Variables implemented in java.awt.Component

Variables implemented in javax.swing.JComponent

Variables implemented in javax.swing.JSlider

JdbSlider constructors

JdbSlider 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.JSlider

JdbSlider methods

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.JSlider

JdbSlider event listeners


JdbSlider variables

dataBinder

  protected DBSliderDataBinder dataBinder
The DBButtonDataBinder that makes this a data-aware component.

JdbSlider constructors

JdbSlider()

  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.

JdbSlider(int)

  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.

Parameters:

orientation
Determines whether the slider is oriented horizontally or vertically. Valid values are HORIZONTAL and VERTICAL.

JdbSlider(int, int)

  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.

Parameters:

min
The minimum value supported by the slider.
max
The maximum value supported by the slider.

JdbSlider(int, int, int)

  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.

Parameters:

min
The minimum value supported by the slider.
max
The maximum value supported by the slider.
value
Sets the slider's initial position.

JdbSlider(int, int, int, int)

  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.

Parameters:

orientation
Determines whether the slider is oriented horizontally or vertically. Valid values are HORIZONTAL and VERTICAL.
min
The minimum value supported by the slider.
max
The maximum value supported by the slider.
value
Sets the slider's initial position.

JdbSlider(javax.swing.BoundedRangeModel)

  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.

Parameters:

model
The BoundedRangeModel that contains the orientation, minimum and maximum supported values, and the current position of the slider.

JdbSlider properties

columnName

 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.

See also: dataSet

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.

See also: columnName

unknownDataValueMode

 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:


JdbSlider event listeners

This component is a source for the following event sets.

ancestor

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

change

 public void addChangeListener(javax.swing.event.ChangeListener )
 public void removeChangeListener(javax.swing.event.ChangeListener )

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 )