borland Packages Class Hierarchy dbswing Package
java.lang.Object +----java.awt.Component +----java.awt.Container +----javax.swing.JComponent +----javax.swing.JScrollPane +----com.borland.dbswing.TableScrollPane
Variables Constructors Properties Methods Event Listeners
Implements ImageObserver, MenuContainer, Serializable, Accessible, ScrollPaneConstants
TableScrollPane
is an extension of JScrollPane
designed specifically for use with a JTable
. It differs visually from a JScrollPane
in that its vertical and horizontal scrollbars, if present, extend all the way to the scrollpane's top and left edges, respectively, leaving no space for an upper-right and lower-left corner component.
It also adds the following properties to enhance JScrollPane
behavior:
paintDuringVerticalDrag
- Enables or disables painting of the scrollpane's viewport while the vertical scrollbar's thumb is being dragged. The default value is true
. Set paintDuringVerticalDrag
to false
to disable painting.
autoVerticalScrollSpeedUp
- Dynamically increases the vertical scroll increment the longer a vertical scrollbar arrow button is pressed. Its default value is true
. Set autoVerticalScrollSpeedUp
to false
to always scroll by a constant increment.
public TableScrollPane()Creates a
TableScrollPane
with no parameters. It contains a vertical or horizontal scrollbar if needed. Calls the constructor of this
class that takes a Component
and two int
values (representing the vertical and horizontal scrollbar policies) as parameters. Passes null
, VERTICAL_SCROLLBAR_AS_NEEDED
, and HORIZONTAL_SCROLLBAR_AS_NEEDED
to the other constructor.
public TableScrollPane(int vsbPolicy, int hsbPolicy)Creates a
TableScrollPane
. Calls the constructor of this
class that takes a Component
and two int
values (representing the vertical and horizontal scrollbar policies) as parameters. Passes null
, vsbPolicy
, and hsbPolicy
to the other constructor.
The vsbPolicy
and hsbPolicy
parameters specify when the scrollbars are displayed.
vsbPolicy
VERTICAL_SCROLLBAR_AS_NEEDED
, VERTICAL_SCROLLBAR_NEVER
, or
VERTICAL_SCROLLBAR_ALWAYS
.
hsbPolicy
HORIZONTAL_SCROLLBAR_AS_NEEDED
, HORIZONTAL_SCROLLBAR_NEVER
, or
HORIZONTAL_SCROLLBAR_ALWAYS
.
public TableScrollPane(Component view)Creates a
TableScrollPane
, with the specified component. It contains a vertical or horizontal scrollbar if needed. Calls the constructor of this
class that takes a Component
and two int
values (representing the vertical and horizontal scrollbar policies) as parameters. Passes the specified Component
, along with VERTICAL_SCROLLBAR_AS_NEEDED
and HORIZONTAL_SCROLLBAR_AS_NEEDED
to the other constructor.
view
public TableScrollPane(Component view, int vsbPolicy, int hsbPolicy)Creates a
TableScrollPane
, with the specified component.
The vsbPolicy
and hsbPolicy
parameters specify when the scrollbars are displayed.
view
vsbPolicy
VERTICAL_SCROLLBAR_AS_NEEDED
, VERTICAL_SCROLLBAR_NEVER
, or
VERTICAL_SCROLLBAR_ALWAYS
.
hsbPolicy
HORIZONTAL_SCROLLBAR_AS_NEEDED
, HORIZONTAL_SCROLLBAR_NEVER
, or
HORIZONTAL_SCROLLBAR_ALWAYS
.
public boolean isAutoVerticalScrollSpeedUp() public void setAutoVerticalScrollSpeedUp(boolean verticalScrollSpeedUp)Returns and sets whether the vertical scroll increment size will dynamically increase the longer a vertical scrollbar arrow button is held down.
This property is true
by default. Set to false
to use a fixed increment size.
public boolean isPaintDuringVerticalDrag() public void setPaintDuringVerticalDrag(boolean paintVerticalDrag)Returns and sets whether painting of the scrollpane's viewport will be enabled while the vertical scrollbar's thumb is being dragged.
This property is true
by default. Set to false
to disable painting during scrolling.
public JScrollBar createVerticalScrollBar()Creates a vertical scroll bar for the table scroll pane.
public void addAncestorListener(javax.swing.event.AncestorListener ) public void removeAncestorListener(javax.swing.event.AncestorListener )
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 )