net.tmachine.gpg.hue
Class BaseHUD

java.lang.Object
  extended bynet.tmachine.gpg.hue.BaseHUD
All Implemented Interfaces:
java.util.EventListener, HUD, java.awt.event.MouseListener, java.awt.event.MouseMotionListener
Direct Known Subclasses:
ShapeCreator, ShapeRenderer, ShapeShifter, ShapeShifter2

public abstract class BaseHUD
extends java.lang.Object
implements HUD

Provides most of the common methods etc for HUD implementations Subclasses should set the "name" variable in their constructor.


Field Summary
protected  boolean isActive
           
protected  boolean isVisible
           
protected  HUDManager manager
           
protected  java.lang.String name
           
 
Constructor Summary
BaseHUD()
           
 
Method Summary
 java.lang.String getName()
          Each HUD should have a unique user-readable name; must be unique, since it is used as a key in Maps
 boolean isActive()
          Simply returns the value of the active flag
 void isActive(boolean b)
          Used by the HUD-manager to inform the HUD it is no longer active, i.e.
 boolean isVisible()
          Simply returns the value of the visibility flag
 void isVisible(boolean b)
          Used by the HUD-manager to inform this HUD when it has been made visible or hidden
 void mouseClicked(java.awt.event.MouseEvent e)
           
 void mouseDragged(java.awt.event.MouseEvent e)
           
 void mouseEntered(java.awt.event.MouseEvent e)
           
 void mouseExited(java.awt.event.MouseEvent e)
           
 void mouseMoved(java.awt.event.MouseEvent e)
           
 void mousePressed(java.awt.event.MouseEvent e)
           
 void mouseReleased(java.awt.event.MouseEvent e)
           
 void setManager(HUDManager am)
          Callback when added to a HUD manager to give the HUD a reference it can use to control or delegate to other HUDs etc
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.tmachine.gpg.hue.HUD
paint
 

Field Detail

name

protected java.lang.String name

isVisible

protected boolean isVisible

isActive

protected boolean isActive

manager

protected HUDManager manager
Constructor Detail

BaseHUD

public BaseHUD()
Method Detail

setManager

public void setManager(HUDManager am)
Description copied from interface: HUD
Callback when added to a HUD manager to give the HUD a reference it can use to control or delegate to other HUDs etc

Specified by:
setManager in interface HUD
Parameters:
am -

getName

public java.lang.String getName()
Description copied from interface: HUD
Each HUD should have a unique user-readable name; must be unique, since it is used as a key in Maps

Specified by:
getName in interface HUD
Returns:
the value of the name variable

isVisible

public void isVisible(boolean b)
Description copied from interface: HUD
Used by the HUD-manager to inform this HUD when it has been made visible or hidden

Specified by:
isVisible in interface HUD
Parameters:
b - true if HUD is now visible, false otherwise

isVisible

public boolean isVisible()
Description copied from interface: HUD
Simply returns the value of the visibility flag

Specified by:
isVisible in interface HUD
Returns:

isActive

public void isActive(boolean b)
Description copied from interface: HUD
Used by the HUD-manager to inform the HUD it is no longer active, i.e. even if it is visible it will NOT receive input events

Specified by:
isActive in interface HUD
Parameters:
b -

isActive

public boolean isActive()
Description copied from interface: HUD
Simply returns the value of the active flag

Specified by:
isActive in interface HUD
Returns:

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Specified by:
mouseClicked in interface java.awt.event.MouseListener

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

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Specified by:
mouseReleased in interface java.awt.event.MouseListener

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent e)
Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e)
Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener

toString

public java.lang.String toString()