public class DragScrollListener extends Object implements MouseListener, MouseMotionListener
Modifier and Type | Field and Description |
---|---|
static int |
DRAGABLE_HORIZONTAL_SCROLL_BAR |
static int |
DRAGABLE_VERTICAL_SCROLL_BAR |
Constructor and Description |
---|
DragScrollListener(Component c) |
Modifier and Type | Method and Description |
---|---|
void |
mouseClicked(MouseEvent e)
Empty implementation
|
void |
mouseDragged(MouseEvent e)
MouseDragged implementation.
|
void |
mouseEntered(MouseEvent e)
Empty implementation
|
void |
mouseExited(MouseEvent e)
Empty implementation
|
void |
mouseMoved(MouseEvent e)
Empty
|
void |
mousePressed(MouseEvent e)
Mouse pressed implementation
|
void |
mouseReleased(MouseEvent e)
Mouse released implementation.
|
void |
setAnimationTiming(int timing)
Sets how frequently the animation will occur in milliseconds.
|
void |
setDamping(double damping)
Sets the animation damping.
|
void |
setDraggableElements(int mask)
Sets the Draggable elements - the Horizontal or Vertical Direction.
|
void |
setScrollingIntensity(int intensity)
Sets the scrolling intensity - the default value being 5.
|
public static final int DRAGABLE_HORIZONTAL_SCROLL_BAR
public static final int DRAGABLE_VERTICAL_SCROLL_BAR
public DragScrollListener(Component c)
public void setDraggableElements(int mask)
can use a bitmasked 'or' (HORIZONTAL_SCROLL_BAR | VERTICAL_SCROLL_BAR ).
mask
- One of HORIZONTAL_SCROLL_BAR, VERTICAL_SCROLL_BAR, or HORIZONTAL_SCROLL_BAR | VERTICAL_SCROLL_BARpublic void setScrollingIntensity(int intensity)
inverse relationship to intensity (1 has the biggest difference, higher numbers having
less impact).
intensity
- The new intensity value (Note the inverse relationship).public void setAnimationTiming(int timing)
value is 30 milliseconds. 60+ will get a bit flickery.
timing
- The timing, in milliseconds.public void setDamping(double damping)
damping
- The new valuepublic void mouseEntered(MouseEvent e)
mouseEntered
in interface MouseListener
public void mouseExited(MouseEvent e)
mouseExited
in interface MouseListener
public void mousePressed(MouseEvent e)
mousePressed
in interface MouseListener
public void mouseReleased(MouseEvent e)
is necessary and launches the appropriate times.
mouseReleased
in interface MouseListener
public void mouseClicked(MouseEvent e)
mouseClicked
in interface MouseListener
public void mouseDragged(MouseEvent e)
mouseDragged
in interface MouseMotionListener
public void mouseMoved(MouseEvent e)
mouseMoved
in interface MouseMotionListener
Copyright © 2014–2016 European Space Agency (ESA). All rights reserved.