|
|||||||||
| 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
rl.client.game.ui.GamePanel
rl.leviathan.client.game.ui.LeviathanGamePanel
public class LeviathanGamePanel
| Nested Class Summary | |
|---|---|
static class |
LeviathanGamePanel.PanelMode
|
| 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 | |
|---|---|
(package private) javax.swing.JMenuItem |
m_PlaceGameElementMenuItem
|
(package private) javax.swing.JMenuItem |
m_PlaceUnitMenuItem
|
(package private) javax.swing.JMenuItem |
m_RemoveGameElementMenuItem
|
(package private) javax.swing.JMenuItem |
m_RemoveUnitMenuItem
|
(package private) static long |
serialVersionUID
|
| 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 | |
|---|---|
LeviathanGamePanel(LeviathanGameClient gameClient)
|
|
| Method Summary | |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent ae)
|
void |
centerMapOnPoint(java.awt.Point p)
|
void |
clearStatusMessage()
|
void |
contextMenuRequested(java.awt.Point p)
|
void |
disconnected()
|
void |
elementCompletedFiring(GameElementIdentifier source,
boolean roundComplete)
|
void |
elementCompletedPointDefence(GameElementIdentifier source,
boolean roundComplete)
|
void |
elementDamaged(GameElement element)
Called when an element has been damaged |
void |
elementDestroyed(GameElement element)
Called when an element has been damaged and destroyed |
void |
elementFiring(GameElementIdentifier source,
GameElementIdentifier target,
Coordinate sourceCoord,
Coordinate targetCoord)
|
void |
elementLocationRemoved(GameElement element)
|
void |
elementNonVisibleLocationSet(GameElement element,
Location location,
Affiliation aff)
|
void |
elementsToFire(java.util.Vector<GameElementIdentifier> elements)
|
void |
elementsToFirePointDefence(java.util.Vector<GameElementIdentifier> elements)
|
void |
elementToMove(GameElementIdentifier element)
|
void |
elementVisibleLocationSet(GameElement element,
Location location,
Affiliation aff)
|
void |
gameBoard(Board board,
java.lang.String themeName)
|
javax.swing.JPopupMenu |
getDeploymentContextMenu()
|
javax.swing.JPopupMenu |
getGameContextMenu()
|
void |
initiativeLoser()
|
void |
initiativeWinner()
|
protected boolean |
isElementLocatedAt(GameElement element,
Coordinate coord)
|
void |
notifyMovementOrderSequenceChanged(GameElement element,
java.util.Vector<Location> locations)
|
void |
phaseChange(java.lang.String phaseName,
java.lang.String subPhaseName)
Controls the UI behaviour dependent upon the current game phase |
void |
playerFiringAttempts(java.util.Vector<FireAttemptRecord> attempts)
called to notify the player of the results of the fire attempts |
void |
playerPointDefenceAttempts(java.util.Vector<PointDefenceAttemptRecord> attempts)
called to notify the player of the results of the fire attempts |
void |
powerAllocationRequired(java.util.Vector<GameElementIdentifier> elements)
|
void |
powerAllocationSet(CapitalShipPowerAllocation cspa)
|
void |
propertyChange(java.beans.PropertyChangeEvent pce)
|
void |
selectedLocation(boolean mergeSelection)
|
void |
selectElementToMove(java.util.Vector<GameElementIdentifier> elements)
|
void |
selectMovementTeamOrder()
|
void |
setAdministrator(boolean admin)
|
void |
setGameMode()
|
void |
setPanelMode(LeviathanGamePanel.PanelMode mode)
|
void |
setStatusMessage(java.lang.String message)
|
void |
turnCompleted(int turnNumber)
|
void |
turnDetails(int turnNumber,
java.lang.String phaseName,
java.lang.String subPhaseName)
|
void |
turnStarted(int turnNumber)
|
void |
validFiringTargets(java.util.Vector<GameElementIdentifier> elements)
|
void |
validPointDefenceTargets(java.util.Vector<GameElementIdentifier> elements)
|
| 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 |
| Field Detail |
|---|
static final long serialVersionUID
javax.swing.JMenuItem m_PlaceUnitMenuItem
javax.swing.JMenuItem m_RemoveUnitMenuItem
javax.swing.JMenuItem m_PlaceGameElementMenuItem
javax.swing.JMenuItem m_RemoveGameElementMenuItem
| Constructor Detail |
|---|
public LeviathanGamePanel(LeviathanGameClient gameClient)
| Method Detail |
|---|
public void setAdministrator(boolean admin)
public void disconnected()
public void setGameMode()
setGameMode in class GamePanel
public void gameBoard(Board board,
java.lang.String themeName)
gameBoard in interface GameClientBoardListenerpublic void setStatusMessage(java.lang.String message)
setStatusMessage in class GamePanelpublic void clearStatusMessage()
clearStatusMessage in class GamePanelpublic void contextMenuRequested(java.awt.Point p)
contextMenuRequested in interface GameBoardPanelListenercontextMenuRequested in class GamePanelpublic void centerMapOnPoint(java.awt.Point p)
centerMapOnPoint in interface GameBoardPanelListenercenterMapOnPoint in class GamePanelpublic void selectedLocation(boolean mergeSelection)
selectedLocation in interface GameBoardPanelListenerselectedLocation in class GamePanelpublic javax.swing.JPopupMenu getDeploymentContextMenu()
protected boolean isElementLocatedAt(GameElement element,
Coordinate coord)
public javax.swing.JPopupMenu getGameContextMenu()
public void actionPerformed(java.awt.event.ActionEvent ae)
actionPerformed in interface java.awt.event.ActionListener
public void elementVisibleLocationSet(GameElement element,
Location location,
Affiliation aff)
elementVisibleLocationSet in class GamePanel
public void elementNonVisibleLocationSet(GameElement element,
Location location,
Affiliation aff)
elementNonVisibleLocationSet in class GamePanelpublic void elementLocationRemoved(GameElement element)
elementLocationRemoved in class GamePanelpublic void propertyChange(java.beans.PropertyChangeEvent pce)
propertyChange in interface java.beans.PropertyChangeListenerpublic void initiativeWinner()
initiativeWinner in interface LeviathanGameListenerpublic void initiativeLoser()
initiativeLoser in interface LeviathanGameListenerpublic void selectMovementTeamOrder()
selectMovementTeamOrder in interface LeviathanGameListenerpublic void powerAllocationRequired(java.util.Vector<GameElementIdentifier> elements)
powerAllocationRequired in interface LeviathanGameListenerpublic void powerAllocationSet(CapitalShipPowerAllocation cspa)
powerAllocationSet in interface LeviathanGameListener
public void turnDetails(int turnNumber,
java.lang.String phaseName,
java.lang.String subPhaseName)
turnDetails in interface LeviathanTurnListenerpublic void turnStarted(int turnNumber)
turnStarted in interface LeviathanTurnListenerpublic void turnCompleted(int turnNumber)
turnCompleted in interface LeviathanTurnListener
public void phaseChange(java.lang.String phaseName,
java.lang.String subPhaseName)
phaseChange in interface LeviathanTurnListenerpublic void selectElementToMove(java.util.Vector<GameElementIdentifier> elements)
selectElementToMove in interface LeviathanGameListenerpublic void elementToMove(GameElementIdentifier element)
elementToMove in interface LeviathanGameListener
public void notifyMovementOrderSequenceChanged(GameElement element,
java.util.Vector<Location> locations)
notifyMovementOrderSequenceChanged in interface CapitalShipMovementDialogListenerpublic void elementsToFire(java.util.Vector<GameElementIdentifier> elements)
elementsToFire in interface LeviathanGameListenerpublic void validFiringTargets(java.util.Vector<GameElementIdentifier> elements)
validFiringTargets in interface LeviathanGameListener
public void elementFiring(GameElementIdentifier source,
GameElementIdentifier target,
Coordinate sourceCoord,
Coordinate targetCoord)
elementFiring in interface LeviathanGameListener
public void elementCompletedFiring(GameElementIdentifier source,
boolean roundComplete)
elementCompletedFiring in interface LeviathanGameListenerpublic void playerFiringAttempts(java.util.Vector<FireAttemptRecord> attempts)
playerFiringAttempts in interface LeviathanGameListenerpublic void playerPointDefenceAttempts(java.util.Vector<PointDefenceAttemptRecord> attempts)
playerPointDefenceAttempts in interface LeviathanGameListenerpublic void elementsToFirePointDefence(java.util.Vector<GameElementIdentifier> elements)
elementsToFirePointDefence in interface LeviathanGameListenerpublic void validPointDefenceTargets(java.util.Vector<GameElementIdentifier> elements)
validPointDefenceTargets in interface LeviathanGameListener
public void elementCompletedPointDefence(GameElementIdentifier source,
boolean roundComplete)
elementCompletedPointDefence in interface LeviathanGameListenerpublic void setPanelMode(LeviathanGamePanel.PanelMode mode)
public void elementDamaged(GameElement element)
LeviathanGameListener
elementDamaged in interface LeviathanGameListenerpublic void elementDestroyed(GameElement element)
LeviathanGameListener
elementDestroyed in interface LeviathanGameListener
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||