class Mouse extends Object implements MouseWheelListener, MouseListener, MouseMotionListener, KeyListener, javajs.api.GenericMouseInterface
Modifier and Type | Field and Description |
---|---|
private boolean |
isMouseDown |
private String |
keyBuffer |
private javajs.api.EventManager |
manager |
private int |
modifiersDown |
private int |
modifiersWhenPressed10 |
private Viewer |
vwr |
private boolean |
wheeling |
private int |
xWhenPressed |
private int |
yWhenPressed |
Constructor and Description |
---|
Mouse(double privateKey,
javajs.api.PlatformViewer vwr,
Object odisplay)
Mouse is the listener for all events.
|
Modifier and Type | Method and Description |
---|---|
private void |
addKeyBuffer(char ch) |
private static int |
applyLeftMouse(int modifiers) |
void |
clear() |
private void |
clearKeyBuffer() |
void |
dispose() |
void |
keyPressed(KeyEvent ke) |
void |
keyReleased(KeyEvent ke) |
void |
keyTyped(KeyEvent ke) |
private void |
mouseClicked(long time,
int x,
int y,
int modifiers,
int clickCount) |
void |
mouseClicked(MouseEvent e) |
private void |
mouseDragged(long time,
int x,
int y) |
void |
mouseDragged(MouseEvent e) |
private void |
mouseEntered(long time,
int x,
int y) |
void |
mouseEntered(MouseEvent e) |
private void |
mouseExited(long time,
int x,
int y) |
void |
mouseExited(MouseEvent e) |
private void |
mouseMoved(long time,
int x,
int y,
int modifiers) |
void |
mouseMoved(MouseEvent e) |
private void |
mousePressed(long time,
int x,
int y,
int modifiers,
boolean isPopupTrigger) |
void |
mousePressed(MouseEvent e) |
private void |
mouseReleased(long time,
int x,
int y,
int modifiers) |
void |
mouseReleased(MouseEvent e) |
private void |
mouseWheel(long time,
int rotation,
int modifiers) |
void |
mouseWheelMoved(MouseWheelEvent e) |
boolean |
processEvent(int id,
int x,
int y,
int modifiers,
long time) |
void |
processTwoPointGesture(float[][][] touches) |
private void |
sendKeyBuffer() |
private Viewer vwr
private javajs.api.EventManager manager
private String keyBuffer
private boolean isMouseDown
private boolean wheeling
private int modifiersDown
private int xWhenPressed
private int yWhenPressed
private int modifiersWhenPressed10
Mouse(double privateKey, javajs.api.PlatformViewer vwr, Object odisplay)
privateKey
- vwr
- odisplay
- public void clear()
clear
in interface javajs.api.GenericMouseInterface
public void dispose()
dispose
in interface javajs.api.GenericMouseInterface
public boolean processEvent(int id, int x, int y, int modifiers, long time)
processEvent
in interface javajs.api.GenericMouseInterface
public void mouseClicked(MouseEvent e)
mouseClicked
in interface MouseListener
public 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)
mouseReleased
in interface MouseListener
public void mouseDragged(MouseEvent e)
mouseDragged
in interface MouseMotionListener
public void mouseMoved(MouseEvent e)
mouseMoved
in interface MouseMotionListener
public void mouseWheelMoved(MouseWheelEvent e)
mouseWheelMoved
in interface MouseWheelListener
public void keyTyped(KeyEvent ke)
keyTyped
in interface KeyListener
public void keyPressed(KeyEvent ke)
keyPressed
in interface KeyListener
public void keyReleased(KeyEvent ke)
keyReleased
in interface KeyListener
private void clearKeyBuffer()
private void addKeyBuffer(char ch)
private void sendKeyBuffer()
private void mouseEntered(long time, int x, int y)
private void mouseExited(long time, int x, int y)
private void mouseClicked(long time, int x, int y, int modifiers, int clickCount)
time
- x
- y
- modifiers
- clickCount
- private void mouseMoved(long time, int x, int y, int modifiers)
private void mouseWheel(long time, int rotation, int modifiers)
private void mousePressed(long time, int x, int y, int modifiers, boolean isPopupTrigger)
time
- x
- y
- modifiers
- isPopupTrigger
- private void mouseReleased(long time, int x, int y, int modifiers)
private void mouseDragged(long time, int x, int y)
private static int applyLeftMouse(int modifiers)
public void processTwoPointGesture(float[][][] touches)
processTwoPointGesture
in interface javajs.api.GenericMouseInterface