megamek.client.ui.swing
Class MovementDisplay
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
megamek.client.ui.swing.AbstractPhaseDisplay
megamek.client.ui.swing.StatusBarPhaseDisplay
megamek.client.ui.swing.MovementDisplay
- All Implemented Interfaces:
- java.awt.event.ActionListener, java.awt.event.KeyListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, BoardViewListener, GameListener, Distractable
public class MovementDisplay
- extends StatusBarPhaseDisplay
- implements java.awt.event.KeyListener
- See Also:
- Serialized Form
| 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 |
| 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 |
MovementDisplay(ClientGUI clientgui)
Creates and lays out a new movement phase display for the specified
clientgui.getClient(). |
| Methods inherited from class megamek.client.ui.swing.AbstractPhaseDisplay |
boardHexHighlighted, firstLOSHex, gameBoardChanged, gameBoardNew, gameEnd, gameEntityChange, gameEntityNew, gameEntityNewOffboard, gameEntityRemove, gameMapQuery, gameNewAction, gamePlayerChange, gamePlayerChat, gamePlayerConnected, gamePlayerDisconnected, gameReport, gameSettingsChange, hexCursor, hexSelected, isIgnoringEvents, secondLOSHex, setIgnoringEvents |
| 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 |
MOVE_WALK
public static final java.lang.String MOVE_WALK
- See Also:
- Constant Field Values
MOVE_NEXT
public static final java.lang.String MOVE_NEXT
- See Also:
- Constant Field Values
MOVE_JUMP
public static final java.lang.String MOVE_JUMP
- See Also:
- Constant Field Values
MOVE_BACK_UP
public static final java.lang.String MOVE_BACK_UP
- See Also:
- Constant Field Values
MOVE_TURN
public static final java.lang.String MOVE_TURN
- See Also:
- Constant Field Values
MOVE_GET_UP
public static final java.lang.String MOVE_GET_UP
- See Also:
- Constant Field Values
MOVE_CHARGE
public static final java.lang.String MOVE_CHARGE
- See Also:
- Constant Field Values
MOVE_DFA
public static final java.lang.String MOVE_DFA
- See Also:
- Constant Field Values
MOVE_GO_PRONE
public static final java.lang.String MOVE_GO_PRONE
- See Also:
- Constant Field Values
MOVE_FLEE
public static final java.lang.String MOVE_FLEE
- See Also:
- Constant Field Values
MOVE_EJECT
public static final java.lang.String MOVE_EJECT
- See Also:
- Constant Field Values
MOVE_LOAD
public static final java.lang.String MOVE_LOAD
- See Also:
- Constant Field Values
MOVE_UNLOAD
public static final java.lang.String MOVE_UNLOAD
- See Also:
- Constant Field Values
MOVE_UNJAM
public static final java.lang.String MOVE_UNJAM
- See Also:
- Constant Field Values
MOVE_CLEAR
public static final java.lang.String MOVE_CLEAR
- See Also:
- Constant Field Values
MOVE_CANCEL
public static final java.lang.String MOVE_CANCEL
- See Also:
- Constant Field Values
MOVE_RAISE_ELEVATION
public static final java.lang.String MOVE_RAISE_ELEVATION
- See Also:
- Constant Field Values
MOVE_LOWER_ELEVATION
public static final java.lang.String MOVE_LOWER_ELEVATION
- See Also:
- Constant Field Values
MOVE_SEARCHLIGHT
public static final java.lang.String MOVE_SEARCHLIGHT
- See Also:
- Constant Field Values
MOVE_LAY_MINE
public static final java.lang.String MOVE_LAY_MINE
- See Also:
- Constant Field Values
MOVE_HULL_DOWN
public static final java.lang.String MOVE_HULL_DOWN
- See Also:
- Constant Field Values
MOVE_CLIMB_MODE
public static final java.lang.String MOVE_CLIMB_MODE
- See Also:
- Constant Field Values
MOVE_SWIM
public static final java.lang.String MOVE_SWIM
- See Also:
- Constant Field Values
MOVE_DIG_IN
public static final java.lang.String MOVE_DIG_IN
- See Also:
- Constant Field Values
MOVE_FORTIFY
public static final java.lang.String MOVE_FORTIFY
- See Also:
- Constant Field Values
MOVE_SHAKE_OFF
public static final java.lang.String MOVE_SHAKE_OFF
- See Also:
- Constant Field Values
MOVE_MODE_MECH
public static final java.lang.String MOVE_MODE_MECH
- See Also:
- Constant Field Values
MOVE_MODE_AIRMECH
public static final java.lang.String MOVE_MODE_AIRMECH
- See Also:
- Constant Field Values
MOVE_MODE_AIRCRAFT
public static final java.lang.String MOVE_MODE_AIRCRAFT
- See Also:
- Constant Field Values
MOVE_RECKLESS
public static final java.lang.String MOVE_RECKLESS
- See Also:
- Constant Field Values
MOVE_CAREFUL_STAND
public static final java.lang.String MOVE_CAREFUL_STAND
- See Also:
- Constant Field Values
MOVE_EVADE
public static final java.lang.String MOVE_EVADE
- See Also:
- Constant Field Values
MOVE_ACC
public static final java.lang.String MOVE_ACC
- See Also:
- Constant Field Values
MOVE_DEC
public static final java.lang.String MOVE_DEC
- See Also:
- Constant Field Values
MOVE_EVADE_AERO
public static final java.lang.String MOVE_EVADE_AERO
- See Also:
- Constant Field Values
MOVE_ACCN
public static final java.lang.String MOVE_ACCN
- See Also:
- Constant Field Values
MOVE_DECN
public static final java.lang.String MOVE_DECN
- See Also:
- Constant Field Values
MOVE_ROLL
public static final java.lang.String MOVE_ROLL
- See Also:
- Constant Field Values
MOVE_LAUNCH
public static final java.lang.String MOVE_LAUNCH
- See Also:
- Constant Field Values
MOVE_RECOVER
public static final java.lang.String MOVE_RECOVER
- See Also:
- Constant Field Values
MOVE_DROP
public static final java.lang.String MOVE_DROP
- See Also:
- Constant Field Values
MOVE_DUMP
public static final java.lang.String MOVE_DUMP
- See Also:
- Constant Field Values
MOVE_RAM
public static final java.lang.String MOVE_RAM
- See Also:
- Constant Field Values
MOVE_HOVER
public static final java.lang.String MOVE_HOVER
- See Also:
- Constant Field Values
MOVE_MANEUVER
public static final java.lang.String MOVE_MANEUVER
- See Also:
- Constant Field Values
MOVE_JOIN
public static final java.lang.String MOVE_JOIN
- See Also:
- Constant Field Values
MOVE_FLY_OFF
public static final java.lang.String MOVE_FLY_OFF
- See Also:
- Constant Field Values
MOVE_TAKE_OFF
public static final java.lang.String MOVE_TAKE_OFF
- See Also:
- Constant Field Values
MOVE_VERT_TAKE_OFF
public static final java.lang.String MOVE_VERT_TAKE_OFF
- See Also:
- Constant Field Values
MOVE_LAND
public static final java.lang.String MOVE_LAND
- See Also:
- Constant Field Values
MOVE_TURN_LEFT
public static final java.lang.String MOVE_TURN_LEFT
- See Also:
- Constant Field Values
MOVE_TURN_RIGHT
public static final java.lang.String MOVE_TURN_RIGHT
- See Also:
- Constant Field Values
MOVE_THRUST
public static final java.lang.String MOVE_THRUST
- See Also:
- Constant Field Values
MOVE_YAW
public static final java.lang.String MOVE_YAW
- See Also:
- Constant Field Values
MOVE_END_OVER
public static final java.lang.String MOVE_END_OVER
- See Also:
- Constant Field Values
GEAR_LAND
public static final int GEAR_LAND
- See Also:
- Constant Field Values
GEAR_BACKUP
public static final int GEAR_BACKUP
- See Also:
- Constant Field Values
GEAR_JUMP
public static final int GEAR_JUMP
- See Also:
- Constant Field Values
GEAR_CHARGE
public static final int GEAR_CHARGE
- See Also:
- Constant Field Values
GEAR_DFA
public static final int GEAR_DFA
- See Also:
- Constant Field Values
GEAR_TURN
public static final int GEAR_TURN
- See Also:
- Constant Field Values
GEAR_SWIM
public static final int GEAR_SWIM
- See Also:
- Constant Field Values
GEAR_RAM
public static final int GEAR_RAM
- See Also:
- Constant Field Values
GEAR_IMMEL
public static final int GEAR_IMMEL
- See Also:
- Constant Field Values
GEAR_SPLIT_S
public static final int GEAR_SPLIT_S
- See Also:
- Constant Field Values
MovementDisplay
public MovementDisplay(ClientGUI clientgui)
- Creates and lays out a new movement phase display for the specified
clientgui.getClient().
selectEntity
public void selectEntity(int en)
- Selects an entity, by number, for movement.
clear
protected void clear()
- Clears out the currently selected movement data and resets it.
- Specified by:
clear in class StatusBarPhaseDisplay
ready
public void ready()
- Sends a data packet indicating the chosen movement.
- Overrides:
ready in class AbstractPhaseDisplay
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- Overrides:
hexMoused in class AbstractPhaseDisplay
- Parameters:
b - an event
gameTurnChange
public void gameTurnChange(GameTurnChangeEvent e)
- Specified by:
gameTurnChange in interface GameListener- Overrides:
gameTurnChange in class AbstractPhaseDisplay
gamePhaseChange
public void gamePhaseChange(GamePhaseChangeEvent e)
- Specified by:
gamePhaseChange in interface GameListener- Overrides:
gamePhaseChange in class AbstractPhaseDisplay
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent ev)
- Specified by:
actionPerformed in interface java.awt.event.ActionListener
keyPressed
public void keyPressed(java.awt.event.KeyEvent ev)
- Specified by:
keyPressed in interface java.awt.event.KeyListener
keyReleased
public void keyReleased(java.awt.event.KeyEvent ev)
- Specified by:
keyReleased in interface java.awt.event.KeyListener
keyTyped
public void keyTyped(java.awt.event.KeyEvent ev)
- Specified by:
keyTyped in interface java.awt.event.KeyListener
finishedMovingUnits
public void finishedMovingUnits(BoardViewEvent b)
- Description copied from interface:
BoardViewListener
- Sent when moving units is finished.
- Specified by:
finishedMovingUnits in interface BoardViewListener- Overrides:
finishedMovingUnits in class AbstractPhaseDisplay
- 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- Overrides:
unitSelected in class AbstractPhaseDisplay
- Parameters:
b - an event
removeAllListeners
public void removeAllListeners()
- Stop just ignoring events and actually stop listening to them.
- Specified by:
removeAllListeners in interface Distractable