|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
NGP.Containers.Panel
NGP.Containers.DrawingPanel
CSE115.Fly.AbstractRoom
| Nested Class Summary |
| Nested classes inherited from class javax.swing.JPanel |
JPanel.AccessibleJPanel |
| Nested classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
| Nested classes inherited from class java.awt.Container |
Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
protected Vector |
shapeList
For maintaining a list of shapes |
| Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface NGP.Colorable |
DEFAULT_GRAY |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
AbstractRoom(Container _container)
Initializes the class variables and registers itself as its own mouse listener |
|
| Method Summary | |
void |
addToShapeList(Shape shape)
Adds a shape to the internal list of shapes |
abstract void |
invokeAction(Graphic shape1,
Graphic shape2)
|
void |
mouseClicked(MouseEvent e)
Called when mouse is clicked within the DrawingPanel Calls abstract method mouseClickedInRoom |
abstract void |
mouseClickedInRoom(Point p)
|
void |
mouseDragged(MouseEvent e)
Called when the mouse is dragged within the DrawingPanel Calls abstract method mouseMovedInRoom |
void |
mouseEntered(MouseEvent e)
Called when the mouse enters the DrawingPanel Calls abstract method mouseEnteredRoom |
abstract void |
mouseEnteredRoom(Point p)
|
void |
mouseExited(MouseEvent e)
Called when the mouse exits the DrawingPanel Calls abstract method mouseExitedRoom |
abstract void |
mouseExitedRoom(Point p)
|
void |
mouseMoved(MouseEvent e)
Called when the mouse moves within the DrawingPanel Calls abstract method mouseMovedInRoom |
abstract void |
mouseMovedInRoom(Point p)
|
void |
mousePressed(MouseEvent e)
Do nothing method |
void |
mouseReleased(MouseEvent e)
Do nothing method |
Shape |
selectShape()
Selects a shape randomly from the internal list |
void |
shapeOverlapAction(Graphic shape1,
Graphic shape2)
Calls invokeAction() on two shapes if they overlap |
| Methods inherited from class NGP.Containers.DrawingPanel |
addGraphic, lowerGraphic, paintComponent, paintGraphics, raiseGraphic, randomPoint, removeAllGraphics, removeGraphic, saveAsJPEG |
| Methods inherited from class NGP.Containers.Panel |
getColor, getDimension, isFocusTraversable, setColor, setDimension |
| Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface NGP.Container |
add, remove |
| Field Detail |
protected Vector shapeList
| Constructor Detail |
public AbstractRoom(Container _container)
| Method Detail |
public void mouseClicked(MouseEvent e)
mouseClicked in interface MouseListenerpublic void mouseEntered(MouseEvent e)
mouseEntered in interface MouseListenerpublic void mouseExited(MouseEvent e)
mouseExited in interface MouseListenerpublic void mousePressed(MouseEvent e)
mousePressed in interface MouseListenerpublic void mouseReleased(MouseEvent e)
mouseReleased in interface MouseListenerpublic void mouseDragged(MouseEvent e)
mouseDragged in interface MouseMotionListenerpublic void mouseMoved(MouseEvent e)
mouseMoved in interface MouseMotionListenerpublic void addToShapeList(Shape shape)
shape - the shape to be addedpublic Shape selectShape()
public void shapeOverlapAction(Graphic shape1,
Graphic shape2)
shape1 - first shapeshape2 - second shape
public abstract void invokeAction(Graphic shape1,
Graphic shape2)
public abstract void mouseEnteredRoom(Point p)
public abstract void mouseExitedRoom(Point p)
public abstract void mouseMovedInRoom(Point p)
public abstract void mouseClickedInRoom(Point p)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||