megamek.client.ui.swing
Class AbstractPhaseDisplay

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by megamek.client.ui.swing.AbstractPhaseDisplay
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, BoardViewListener, GameListener, Distractable
Direct Known Subclasses:
ChatLounge, StatusBarPhaseDisplay

public abstract class AbstractPhaseDisplay
extends javax.swing.JPanel
implements BoardViewListener, GameListener, Distractable

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
protected  javax.swing.JButton butDone
           
protected  ClientGUI clientgui
           
protected  DistractableAdapter distracted
           
 
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 java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
protected AbstractPhaseDisplay()
           
 
Method Summary
 void boardHexHighlighted(BoardViewEvent b)
          Sent when Hex is highlighted.
 void finishedMovingUnits(BoardViewEvent b)
          Sent when moving units is finished.
 void firstLOSHex(BoardViewEvent b)
          Sent when firstLOS is set.
 void gameBoardChanged(GameBoardChangeEvent e)
           
 void gameBoardNew(GameBoardNewEvent e)
           
 void gameEnd(GameEndEvent e)
           
 void gameEntityChange(GameEntityChangeEvent e)
           
 void gameEntityNew(GameEntityNewEvent e)
           
 void gameEntityNewOffboard(GameEntityNewOffboardEvent e)
           
 void gameEntityRemove(GameEntityRemoveEvent e)
           
 void gameMapQuery(GameMapQueryEvent e)
           
 void gameNewAction(GameNewActionEvent e)
           
 void gamePhaseChange(GamePhaseChangeEvent e)
           
 void gamePlayerChange(GamePlayerChangeEvent e)
           
 void gamePlayerChat(GamePlayerChatEvent e)
           
 void gamePlayerConnected(GamePlayerConnectedEvent e)
           
 void gamePlayerDisconnected(GamePlayerDisconnectedEvent e)
           
 void gameReport(GameReportEvent e)
           
 void gameSettingsChange(GameSettingsChangeEvent e)
           
 void gameTurnChange(GameTurnChangeEvent e)
           
 void hexCursor(BoardViewEvent b)
          Sent when BoardView 'cursor' is set to Hex.
 void hexMoused(BoardViewEvent b)
          Sent when user clicks, double clicks or drags hex.
 void hexSelected(BoardViewEvent b)
          Sent when Hex is selected.
 boolean isIgnoringEvents()
          Determine if the listener is currently distracted.
 void ready()
           
 void secondLOSHex(BoardViewEvent b, Coords c)
          Sent when secondLOS is set.
 void setIgnoringEvents(boolean distracted)
          Specify if the listener should be distracted.
 void unitSelected(BoardViewEvent b)
          Sent when Unit is selected.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface megamek.common.util.Distractable
removeAllListeners
 

Field Detail

distracted

protected DistractableAdapter distracted

butDone

protected javax.swing.JButton butDone

clientgui

protected ClientGUI clientgui
Constructor Detail

AbstractPhaseDisplay

protected AbstractPhaseDisplay()
Method Detail

isIgnoringEvents

public boolean isIgnoringEvents()
Determine if the listener is currently distracted.

Specified by:
isIgnoringEvents in interface Distractable
Returns:
true if the listener is ignoring events.

setIgnoringEvents

public void setIgnoringEvents(boolean distracted)
Specify if the listener should be distracted.

Specified by:
setIgnoringEvents in interface Distractable
Parameters:
distracted - true if the listener should ignore events false if the listener should pay attention again. Events that occured while the listener was distracted NOT going to be processed.

hexMoused

public void hexMoused(BoardViewEvent b)
Description copied from interface: BoardViewListener
Sent when user clicks, double clicks or drags hex.

Specified by:
hexMoused in interface BoardViewListener
Parameters:
b - an event

hexSelected

public void hexSelected(BoardViewEvent b)
Description copied from interface: BoardViewListener
Sent when Hex is selected.

Specified by:
hexSelected in interface BoardViewListener
Parameters:
b - an event

hexCursor

public void hexCursor(BoardViewEvent b)
Description copied from interface: BoardViewListener
Sent when BoardView 'cursor' is set to Hex.

Specified by:
hexCursor in interface BoardViewListener
Parameters:
b - an event

boardHexHighlighted

public void boardHexHighlighted(BoardViewEvent b)
Description copied from interface: BoardViewListener
Sent when Hex is highlighted.

Specified by:
boardHexHighlighted in interface BoardViewListener
Parameters:
b - an event

firstLOSHex

public void firstLOSHex(BoardViewEvent b)
Description copied from interface: BoardViewListener
Sent when firstLOS is set.

Specified by:
firstLOSHex in interface BoardViewListener
Parameters:
b - an event

secondLOSHex

public void secondLOSHex(BoardViewEvent b,
                         Coords c)
Description copied from interface: BoardViewListener
Sent when secondLOS is set.

Specified by:
secondLOSHex in interface BoardViewListener
Parameters:
b - an event

finishedMovingUnits

public void finishedMovingUnits(BoardViewEvent b)
Description copied from interface: BoardViewListener
Sent when moving units is finished.

Specified by:
finishedMovingUnits in interface BoardViewListener
Parameters:
b - an event

unitSelected

public void unitSelected(BoardViewEvent b)
Description copied from interface: BoardViewListener
Sent when Unit is selected.

Specified by:
unitSelected in interface BoardViewListener
Parameters:
b - an event

gamePlayerConnected

public void gamePlayerConnected(GamePlayerConnectedEvent e)
Specified by:
gamePlayerConnected in interface GameListener

gamePlayerDisconnected

public void gamePlayerDisconnected(GamePlayerDisconnectedEvent e)
Specified by:
gamePlayerDisconnected in interface GameListener

gamePlayerChange

public void gamePlayerChange(GamePlayerChangeEvent e)
Specified by:
gamePlayerChange in interface GameListener

gamePlayerChat

public void gamePlayerChat(GamePlayerChatEvent e)
Specified by:
gamePlayerChat in interface GameListener

gamePhaseChange

public void gamePhaseChange(GamePhaseChangeEvent e)
Specified by:
gamePhaseChange in interface GameListener

gameTurnChange

public void gameTurnChange(GameTurnChangeEvent e)
Specified by:
gameTurnChange in interface GameListener

gameReport

public void gameReport(GameReportEvent e)
Specified by:
gameReport in interface GameListener

gameEnd

public void gameEnd(GameEndEvent e)
Specified by:
gameEnd in interface GameListener

gameBoardNew

public void gameBoardNew(GameBoardNewEvent e)
Specified by:
gameBoardNew in interface GameListener

gameBoardChanged

public void gameBoardChanged(GameBoardChangeEvent e)
Specified by:
gameBoardChanged in interface GameListener

gameSettingsChange

public void gameSettingsChange(GameSettingsChangeEvent e)
Specified by:
gameSettingsChange in interface GameListener

gameMapQuery

public void gameMapQuery(GameMapQueryEvent e)
Specified by:
gameMapQuery in interface GameListener

gameEntityNew

public void gameEntityNew(GameEntityNewEvent e)
Specified by:
gameEntityNew in interface GameListener

gameEntityNewOffboard

public void gameEntityNewOffboard(GameEntityNewOffboardEvent e)
Specified by:
gameEntityNewOffboard in interface GameListener

gameEntityRemove

public void gameEntityRemove(GameEntityRemoveEvent e)
Specified by:
gameEntityRemove in interface GameListener

gameEntityChange

public void gameEntityChange(GameEntityChangeEvent e)
Specified by:
gameEntityChange in interface GameListener

gameNewAction

public void gameNewAction(GameNewActionEvent e)
Specified by:
gameNewAction in interface GameListener

ready

public void ready()