spacewar
Class Display

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Canvas
              |
              +--spacewar.Display
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable
Direct Known Subclasses:
Display1, Display2

class Display
extends java.awt.Canvas

The display aspects capture the look and feel of the in modular pluggable units. The model is that constructing a concrete subclass of Display attaches that kind of display to the game. It will Display the game as it goes along. A game can have any number of displays. Any of the displays will accept keyboard input.

See Also:
Serialized Form

Inner classes inherited from class java.awt.Canvas
java.awt.Canvas.AccessibleAWTCanvas
 
Inner classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.AWTTreeLock
 
Advice Summary
advice instanceof(game) && receptions(new(mode))
static afterReturning(Game, String)
 
 affects: spacewar.Game
advice instanceof(player) && receptions(new(..))
static afterReturning(Player)
 
 affects: spacewar.Player
advice setSizeCut(display)
static afterReturning(Display)
 
 affects: spacewar.Display, spacewar.Display1, spacewar.Display2
advice instanceof(Game) && receptions(void clockTick())
static after()
 
 affects: spacewar.Game

 
Crosscut Summary
setSizeCut(Display)
 

 
Field Summary
(package private)  SWFrame frame
          
(package private)  Game game
          
(package private)  java.awt.Graphics offGraphics
          
(package private)  java.awt.Image offImage
          
 
Fields inherited from class java.awt.Component
accessibleContext, actionListenerK, adjustmentListenerK, appContext, background, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, componentListener, componentListenerK, componentOrientation, containerListenerK, cursor, dropTarget, enabled, eventMask, focusListener, focusListenerK, font, foreground, graphicsConfig, hasFocus, height, hierarchyBoundsListener, hierarchyBoundsListenerK, hierarchyListener, hierarchyListenerK, incRate, inputMethodListener, inputMethodListenerK, isInc, isPacked, itemListenerK, keyListener, keyListenerK, LEFT_ALIGNMENT, locale, LOCK, metrics, minSize, mouseListener, mouseListenerK, mouseMotionListener, mouseMotionListenerK, newEventsOnly, ownedWindowK, parent, peer, peerFont, popups, prefSize, RIGHT_ALIGNMENT, textListenerK, TOP_ALIGNMENT, valid, visible, width, windowClosingException, windowListenerK, x, y
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
(package private) Display(Game g)
          
Advised by: spacewar.Display
 
Method Summary
(package private)  Game getGame()
          
(package private) static Pilot getPilot1()
          
(package private) static Pilot getPilot2()
          
(package private)  void noticeSizeChange()
          
 void paint(java.awt.Graphics g)
          
(package private)  void paintObjects(java.awt.Graphics g)
          
(package private)  void paintStatus(java.awt.Graphics g)
          
 void update(java.awt.Graphics g)
          
 
Methods inherited from class java.awt.Canvas
, addNotify, constructComponentName, getAccessibleContext, postsOldMouseEvents
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, areInputMethodsEnabled, bounds, checkGD, checkImage, checkImage, checkWindowClosingException, coalesceEvents, contains, contains, createChildHierarchyEvents, createHierarchyEvents, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, dispatchEventImpl, doLayout, enable, enable, enableEvents, enableInputMethods, eventEnabled, firePropertyChange, getAccessibleIndexInParent, getAccessibleStateSet, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen_NoTreeLock, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getPreferredSize, getSize, getSize, getToolkit, getToolkitImpl, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isEnabledImpl, isFocusTraversable, isLightweight, isOpaque, isRecursivelyVisible, isShowing, isValid, isVisible, keyDown, keyUp, layout, lightweightPaint, lightweightPrint, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, numListening, paintAll, paintHeavyweightComponents, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, printHeavyweightComponents, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, resetGC, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

 
Advice Detail

advice instanceof(game) && receptions(new(mode))

static afterReturning(Game, String)

 affects: spacewar.Game


advice instanceof(player) && receptions(new(..))

static afterReturning(Player)

 affects: spacewar.Player


advice setSizeCut(Display)

static afterReturning(Display)

 affects: spacewar.Display, spacewar.Display1, spacewar.Display2


advice instanceof(Game) && receptions(void clockTick())

static after()

 affects: spacewar.Game

 
Crosscut Detail

setSizeCut(Display)

Field Detail

game

Game game

frame

SWFrame frame

offImage

java.awt.Image offImage

offGraphics

java.awt.Graphics offGraphics
Constructor Detail

Display

Display(Game g)

Advised by: spacewar.Display
Method Detail

getGame

Game getGame()

getPilot1

static Pilot getPilot1()

getPilot2

static Pilot getPilot2()

noticeSizeChange

void noticeSizeChange()

paint

public void paint(java.awt.Graphics g)
Overrides:
paint in class java.awt.Canvas

update

public void update(java.awt.Graphics g)
Overrides:
update in class java.awt.Component

paintObjects

void paintObjects(java.awt.Graphics g)

paintStatus

void paintStatus(java.awt.Graphics g)