public abstract class AutoScroll
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
_autoScrolling |
protected int |
_autoScrollInterval |
protected java.awt.Component |
_component |
protected boolean |
_hasEntered |
protected int |
_scrollDirection |
protected javax.swing.Timer |
_timer |
protected boolean |
_vertical |
static java.lang.String |
CLIENT_PROPERTY_AUTO_SCROLL |
static int |
SCROLL_DOWN |
static int |
SCROLL_LEFT |
static int |
SCROLL_RIGHT |
static int |
SCROLL_UP |
Modifier | Constructor and Description |
---|---|
protected |
AutoScroll(java.awt.Component component) |
protected |
AutoScroll(java.awt.Component component,
boolean vertical) |
Modifier and Type | Method and Description |
---|---|
abstract void |
autoScrolling(int direction) |
void |
autoScrollingEnded(int direction) |
void |
autoScrollingStarted(int direction) |
protected java.awt.event.MouseEvent |
convertMouseEvent(java.awt.event.MouseEvent e) |
static AutoScroll |
getAutoScroll(java.awt.Component component)
Gets the AutoScroll installed on the component.
|
int |
getAutoScrollInterval() |
int |
getScrollDirection() |
boolean |
isAutoScrolling() |
boolean |
isComponentSelfScrollable() |
boolean |
isEnabled()
Checks if the AutoScroll is enabled.
|
void |
mouseDragged(java.awt.event.MouseEvent e) |
void |
mouseMoved(java.awt.event.MouseEvent e) |
void |
mousePressed(java.awt.event.MouseEvent e) |
void |
mouseReleased(java.awt.event.MouseEvent e) |
void |
setAutoScrollInterval(int autoScrollInterval) |
void |
setComponentSelfScrollable(boolean scrollable) |
void |
setEnabled(boolean enabled)
Enables or disables the AutoScroll feature.
|
void |
startAutoScrolling(int direction) |
void |
stopAutoScrolling()
This protected method is implementation specific and should be private.
|
abstract void |
updateSelectionForEvent(java.awt.event.MouseEvent e,
boolean shouldScroll) |
public static final java.lang.String CLIENT_PROPERTY_AUTO_SCROLL
protected javax.swing.Timer _timer
protected boolean _autoScrolling
protected int _scrollDirection
protected boolean _hasEntered
public static final int SCROLL_UP
public static final int SCROLL_DOWN
public static final int SCROLL_LEFT
public static final int SCROLL_RIGHT
protected java.awt.Component _component
protected boolean _vertical
protected int _autoScrollInterval
protected AutoScroll(java.awt.Component component)
protected AutoScroll(java.awt.Component component, boolean vertical)
public int getAutoScrollInterval()
public void setAutoScrollInterval(int autoScrollInterval)
public boolean isEnabled()
public void setEnabled(boolean enabled)
enabled
- true or false.public void startAutoScrolling(int direction)
public void stopAutoScrolling()
public boolean isAutoScrolling()
public int getScrollDirection()
public boolean isComponentSelfScrollable()
public void setComponentSelfScrollable(boolean scrollable)
protected java.awt.event.MouseEvent convertMouseEvent(java.awt.event.MouseEvent e)
public void mouseReleased(java.awt.event.MouseEvent e)
public void mousePressed(java.awt.event.MouseEvent e)
public void mouseDragged(java.awt.event.MouseEvent e)
public void mouseMoved(java.awt.event.MouseEvent e)
public void autoScrollingStarted(int direction)
public void autoScrollingEnded(int direction)
public abstract void autoScrolling(int direction)
public abstract void updateSelectionForEvent(java.awt.event.MouseEvent e, boolean shouldScroll)
public static AutoScroll getAutoScroll(java.awt.Component component)
component
- the component