|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.awt.dnd.DragGestureRecognizer
|
+--canvas.DefaultListener
Provides an infrastructure for listening for mouse, keyboard, and drag-and-drop events.
| Field Summary | |
static boolean |
debug
|
static canvas.DragComponent |
involvedInDrop
|
| Fields inherited from class java.awt.dnd.DragGestureRecognizer |
component, dragGestureListener, dragSource, events, sourceActions |
| Constructor Summary | |
DefaultListener(Component component)
Conststructs a new DefaultListener for the given component |
|
| Method Summary | |
protected void |
addDragListener()
This method is called by a DragComponent's addDragListener() method, you should not need to use it. |
protected void |
addMouseListener()
This method is called by a DragComponent's addMouseListener() method, you should not need to use it. |
void |
charKeyPressed(char c)
|
void |
downKeyPressed()
This method should be overridden in a subclass to obtain functionality for "down" key presses. |
void |
enterKeyPressed()
This method should be overridden in a subclass to obtain functionality for "enter" key presses. |
void |
leftKeyPressed()
This method should be overridden in a subclass to obtain functionality for "left" key presses. |
void |
mouseClickedAt(int x,
int y)
This method should be overridden in a subclass to obtain functionality for Mouse Clicks within the associated component. |
void |
mouseDraggedTo(int x,
int y)
This method is called whenever the mouse is dragged, and the dragListener is not enabled, it should be overridden to obtain functionality. |
void |
mouseMovedTo(int x,
int y)
This method should be overridden in a subclass to obtain functionality for Mouse Movements within the associated component. |
void |
mousePressedAt(int x,
int y)
This method should be overridden in a subclass to obtain functionality for Mouse Presses within the associated component. |
void |
mouseReleasedAt(int x,
int y)
This method should be overridden in a subclass to obtain functionality for when the mouse is released. |
void |
registerKeyActions()
This method is called by the DragComponent's addKeyboardListener() method, you should not need to use this method. |
protected void |
registerListeners()
This method is called every time setComponent() is called, you should not need to use this method. |
protected void |
removeDragListener()
This method is called by a DragComponent's removeDragListener() method, you should not need to use it. |
void |
removeKeyboardListener()
This method is called by the DragComponent's removeKeyboardListener() method, you should not need to use this method. |
protected void |
removeMouseListener()
This method is called by a DragComponent's removeMouseListener() method, you should not need to use it. |
void |
rightKeyPressed()
This method should be overridden in a subclass to obtain functionality for "right" key presses. |
static void |
setDebug(boolean d)
Sets the debug boolean. |
void |
spacebarPressed()
This method should be overridden in a subclass to obtain functionality for spacebar presses. |
protected void |
unregisterListeners()
This method will remove all of the listeners from the component this DefaultListener is associated with. |
void |
upKeyPressed()
This method should be overridden in a subclass to obtain functionality for "up" key presses. |
| Methods inherited from class java.awt.dnd.DragGestureRecognizer |
addDragGestureListener, appendEvent, fireDragGestureRecognized, getComponent, getDragSource, getSourceActions, getTriggerEvent, removeDragGestureListener, resetRecognizer, setComponent, setSourceActions |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static boolean debug
public static canvas.DragComponent involvedInDrop
| Constructor Detail |
public DefaultListener(Component component)
component - The Component that this listener will be associated with| Method Detail |
public static void setDebug(boolean d)
protected void addMouseListener()
protected void removeMouseListener()
protected void registerListeners()
registerListeners in class DragGestureRecognizerprotected void addDragListener()
protected void removeDragListener()
protected void unregisterListeners()
unregisterListeners in class DragGestureRecognizer
public void mouseDraggedTo(int x,
int y)
x - the x-coordinate of the movey - the y-coordinate of the move
public void mouseMovedTo(int x,
int y)
x - the x-coordinate of the movey - the y-coordinate of the move
public void mouseClickedAt(int x,
int y)
x - the x-coordinate of the clicky - the y-coordinate of the click
public void mousePressedAt(int x,
int y)
x - the x-coordinate of the pressy - the y-coordinate of the press
public void mouseReleasedAt(int x,
int y)
x - the x-coordinate of the releasey - the y-coordinate of the releasepublic void charKeyPressed(char c)
public void upKeyPressed()
public void downKeyPressed()
public void leftKeyPressed()
public void rightKeyPressed()
public void enterKeyPressed()
public void spacebarPressed()
public void registerKeyActions()
public void removeKeyboardListener()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||