|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjava.awt.event.MouseAdapter
ButtonMouseListener
class ButtonMouseListener
ButtonMouseListener is a class that manages operations that are performed when mouse actions are happened on buttons on the game window and dialogs.
| Field Summary | |
|---|---|
private java.awt.Cursor |
myCursor
Cursor object that is a shape of a cursor when it goes over the buttons. |
private MyDialog |
myDialog
MyDialog object that creates and has this listener. |
private PlusNumber |
plusNumber
PlusNumber object that is an owner of the MyDialog object. |
| Constructor Summary | |
|---|---|
ButtonMouseListener()
Default constructor that initialises attributes by caling a non-default constructor. |
|
ButtonMouseListener(MyDialog myDialog)
Constructor initialising all attributes. |
|
| Method Summary | |
|---|---|
void |
mouseEntered(java.awt.event.MouseEvent e)
Change the mouse cursor to a hand shape when the cursor enters on the "PASS" button on the game window or "OK" buttons on the dialogs. |
void |
mouseExited(java.awt.event.MouseEvent e)
Change the mouse cursor back to a normal arrow when the cursor leaves the "PASS" button on the game window or "OK" buttons on the dialogs. |
| Methods inherited from class java.awt.event.MouseAdapter |
|---|
mouseClicked, mouseDragged, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private MyDialog myDialog
private PlusNumber plusNumber
private java.awt.Cursor myCursor
| Constructor Detail |
|---|
public ButtonMouseListener(MyDialog myDialog)
myDialog - a MyDialog object, either AboutDialog or InstructionDialog.public ButtonMouseListener()
| Method Detail |
|---|
public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered in interface java.awt.event.MouseListenermouseEntered in class java.awt.event.MouseAdaptere - a mouse event happened on buttons, which is mouseover.public void mouseExited(java.awt.event.MouseEvent e)
mouseExited in interface java.awt.event.MouseListenermouseExited in class java.awt.event.MouseAdaptere - a mouse event happened on buttons, which is mouseout.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||