public class MouseAndKeyHandler extends AbstractMouseAndKeyHandler implements KeyListener, MouseListener, MouseWheelListener, MouseMotionListener, FocusListener
AbstractMouseAndKeyHandler.BehaviourEntry<T extends Behaviour>
buttonClicks, buttonDrags, DOUBLE_CLICK_INTERVAL, keyClicks, keyDrags, scrolls
Constructor and Description |
---|
MouseAndKeyHandler() |
Modifier and Type | Method and Description |
---|---|
void |
focusGained(FocusEvent e) |
void |
focusLost(FocusEvent e) |
void |
keyPressed(KeyEvent e) |
void |
keyReleased(KeyEvent e) |
void |
keyTyped(KeyEvent e) |
void |
mouseClicked(MouseEvent e) |
void |
mouseDragged(MouseEvent e) |
void |
mouseEntered(MouseEvent e) |
void |
mouseExited(MouseEvent e) |
void |
mouseMoved(MouseEvent e) |
void |
mousePressed(MouseEvent e) |
void |
mouseReleased(MouseEvent e) |
void |
mouseWheelMoved(MouseWheelEvent e) |
void |
setKeypressManager(KeyPressedManager keypressManager,
Component focusableOwner) |
void |
setKeypressManager(KeyPressedManager keypressManager,
Runnable focus) |
setBehaviourMap, setInputMap, update
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 mouseClicked(MouseEvent e)
mouseClicked
in interface MouseListener
public void mousePressed(MouseEvent e)
mousePressed
in interface MouseListener
public void mouseReleased(MouseEvent e)
mouseReleased
in interface MouseListener
public void mouseEntered(MouseEvent e)
mouseEntered
in interface MouseListener
public void mouseExited(MouseEvent e)
mouseExited
in interface MouseListener
public void keyPressed(KeyEvent e)
keyPressed
in interface KeyListener
public void setKeypressManager(KeyPressedManager keypressManager, Runnable focus)
keypressManager
- focus
- function that ensures that the component associated to this
MouseAndKeyHandler
is focused.public void setKeypressManager(KeyPressedManager keypressManager, Component focusableOwner)
keypressManager
- focusableOwner
- container of this MouseAndKeyHandler
. If key presses
are forwarded from the KeyPressedManager
while the
component does not have focus, then
Component.requestFocus()
.public void keyReleased(KeyEvent e)
keyReleased
in interface KeyListener
public void keyTyped(KeyEvent e)
keyTyped
in interface KeyListener
public void focusGained(FocusEvent e)
focusGained
in interface FocusListener
public void focusLost(FocusEvent e)
focusLost
in interface FocusListener
Copyright © 2015–2022 SciJava. All rights reserved.