megamek.client.ui.AWT
Class MechDisplay

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Panel
              extended by megamek.client.ui.AWT.widget.BufferedPanel
                  extended by megamek.client.ui.AWT.MechDisplay
All Implemented Interfaces:
java.awt.event.ComponentListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible

public class MechDisplay
extends BufferedPanel

Displays the info for a mech. This is also a sort of interface for special movement and firing actions.

See Also:
Serialized Form

Nested Class Summary
(package private)  class MechDisplay.ArmorPanel
          This panel contains the armor readout display.
(package private)  class MechDisplay.ExtraPanel
          This class shows information about a unit that doesn't belong elsewhere.
(package private)  class MechDisplay.MovementPanel
          The movement panel contains all the buttons, readouts and gizmos relating to moving around on the battlefield.
(package private)  class MechDisplay.SystemPanel
          This class shows the critical hits and systems for a mech
(package private)  class MechDisplay.WeaponPanel
          This class contains the all the gizmos for firing the mech's weapons.
 
Nested classes/interfaces inherited from class java.awt.Panel
java.awt.Panel.AccessibleAWTPanel
 
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
 MechDisplay.ArmorPanel aPan
           
(package private)  ClientGUI clientgui
           
 BufferedPanel displayP
           
 MechDisplay.ExtraPanel ePan
           
 MechDisplay.MovementPanel mPan
           
 MechDisplay.SystemPanel sPan
           
(package private)  MechPanelTabStrip tabStrip
           
 MechDisplay.WeaponPanel wPan
           
 
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
MechDisplay(ClientGUI clientgui)
          Creates and lays out a new mech display.
 
Method Summary
 void addBag(java.awt.Component comp, java.awt.GridBagConstraints c)
           
 void addMechDisplayListener(MechDisplayListener listener)
          Adds the specified mech display listener to receive events from this view.
 void displayEntity(Entity en)
          Displays the specified entity in the panel.
 Entity getCurrentEntity()
          Returns the entity we'return currently displaying
 void processMechDisplayEvent(MechDisplayEvent event)
          Notifies attached listeners of the event.
 void removeMechDisplayListener(MechDisplayListener listener)
          Removes the specified board listener.
 void showPanel(java.lang.String s)
          Changes to the specified panel.
 
Methods inherited from class megamek.client.ui.AWT.widget.BufferedPanel
addBgDrawer, componentHidden, componentMoved, componentResized, componentShown, getPreferredSize, paint, removeBgDrawer, removeBgDrawers, setPreferredSize, setPreferredSize, update
 
Methods inherited from class java.awt.Panel
addNotify, getAccessibleContext
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setSize, setSize, setVisible, 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

tabStrip

MechPanelTabStrip tabStrip

displayP

public BufferedPanel displayP

mPan

public MechDisplay.MovementPanel mPan

aPan

public MechDisplay.ArmorPanel aPan

wPan

public MechDisplay.WeaponPanel wPan

sPan

public MechDisplay.SystemPanel sPan

ePan

public MechDisplay.ExtraPanel ePan

clientgui

ClientGUI clientgui
Constructor Detail

MechDisplay

public MechDisplay(ClientGUI clientgui)
Creates and lays out a new mech display.

Method Detail

addBag

public void addBag(java.awt.Component comp,
                   java.awt.GridBagConstraints c)

displayEntity

public void displayEntity(Entity en)
Displays the specified entity in the panel.


getCurrentEntity

public Entity getCurrentEntity()
Returns the entity we'return currently displaying


showPanel

public void showPanel(java.lang.String s)
Changes to the specified panel.


addMechDisplayListener

public void addMechDisplayListener(MechDisplayListener listener)
Adds the specified mech display listener to receive events from this view.

Parameters:
listener - the listener.

removeMechDisplayListener

public void removeMechDisplayListener(MechDisplayListener listener)
Removes the specified board listener.

Parameters:
listener - the listener.

processMechDisplayEvent

public void processMechDisplayEvent(MechDisplayEvent event)
Notifies attached listeners of the event.

Parameters:
event - the mech display event.