wheelsunh.etc
Class AbstractGraphic

java.lang.Object
  extended by wheelsunh.etc.AbstractGraphic
All Implemented Interfaces:
CustomGraphic
Direct Known Subclasses:
AbstractShape

public abstract class AbstractGraphic
extends java.lang.Object
implements CustomGraphic

Abstract class implementing CustomGraphic interface. For convenience, defines all the mouse interaction methods to do nothing so they don't all have to be defined every time a class implementing CustomGraphic is created. All subclasses must implement paint(java.awt.Graphics2D) and contains(java.awt.Point)!


Constructor Summary
AbstractGraphic()
           
 
Method Summary
 void mouseClicked(java.awt.event.MouseEvent e)
          Called when mouse is clicked over the graphic.
 void mouseDragged(java.awt.event.MouseEvent e)
          Called when mouse button is pressed and dragged over graphic.
 void mousePressed(java.awt.event.MouseEvent e)
          Called when a mouse button is pressed over the graphic.
 void mouseReleased(java.awt.event.MouseEvent e)
          Called when a mouse button is released over the graphic.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface wheelsunh.etc.CustomGraphic
contains, paint
 

Constructor Detail

AbstractGraphic

public AbstractGraphic()
Method Detail

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Called when a mouse button is pressed over the graphic.

Specified by:
mousePressed in interface CustomGraphic

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Called when a mouse button is released over the graphic.

Specified by:
mouseReleased in interface CustomGraphic

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Called when mouse is clicked over the graphic.

Specified by:
mouseClicked in interface CustomGraphic

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent e)
Called when mouse button is pressed and dragged over graphic.

Specified by:
mouseDragged in interface CustomGraphic