story.scheherazade.virgil
Class VirgilMouseListener
java.lang.Object
story.scheherazade.virgil.VirgilMouseListener
- All Implemented Interfaces:
- java.awt.event.MouseListener, java.util.EventListener
- Direct Known Subclasses:
- Virgil.LeftSideMouseListener, Virgil.SymbolicStackMouseListener
public abstract class VirgilMouseListener
- extends java.lang.Object
- implements java.awt.event.MouseListener
A MouseListener for Virgil buttons -- both those that use
VirgilButton and those that don't -- that takes care of responding
to mouse events. Requires concretizing classes to provide the
inner functionality -- what to do visually when the button is being
pressed, and what to do when the button is finally selected. This
class essentially boils down all the mouse events to just two
functions, what to do when clicked, and how to draw when the mouse
is hovering and pressed.
Method Summary |
abstract void |
clicked()
All concretizing classes must pass a function of what to do once
the user clicks the button. |
abstract Virgil |
getVirgil()
|
void |
mouseClicked(java.awt.event.MouseEvent e)
|
void |
mouseEntered(java.awt.event.MouseEvent e)
|
void |
mouseExited(java.awt.event.MouseEvent e)
|
void |
mousePressed(java.awt.event.MouseEvent e)
|
void |
mouseReleased(java.awt.event.MouseEvent e)
|
abstract void |
setClickedAppearance(boolean beingClicked)
All concretizing classes must include a function that repaints
the button depending on whether the user is hovering her mouse
over the button after pressing and holding the mouse button. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VirgilMouseListener
public VirgilMouseListener(boolean sendUniversalClick)
VirgilMouseListener
public VirgilMouseListener()
clicked
public abstract void clicked()
- All concretizing classes must pass a function of what to do once
the user clicks the button.
setClickedAppearance
public abstract void setClickedAppearance(boolean beingClicked)
- All concretizing classes must include a function that repaints
the button depending on whether the user is hovering her mouse
over the button after pressing and holding the mouse button.
mouseEntered
public void mouseEntered(java.awt.event.MouseEvent e)
- Specified by:
mouseEntered
in interface java.awt.event.MouseListener
mouseExited
public void mouseExited(java.awt.event.MouseEvent e)
- Specified by:
mouseExited
in interface java.awt.event.MouseListener
mousePressed
public void mousePressed(java.awt.event.MouseEvent e)
- Specified by:
mousePressed
in interface java.awt.event.MouseListener
mouseClicked
public void mouseClicked(java.awt.event.MouseEvent e)
- Specified by:
mouseClicked
in interface java.awt.event.MouseListener
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent e)
- Specified by:
mouseReleased
in interface java.awt.event.MouseListener
getVirgil
public abstract Virgil getVirgil()
Copyright © 2011 David K. Elson. All Rights Reserved.