|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Panel
megamek.client.ui.AWT.ClientGUI
public class ClientGUI
| Nested Class Summary |
|---|
| 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 | |
|---|---|
(package private) java.applet.AudioClip |
bingClip
Cache for the "bing" soundclip. |
(package private) BoardSelectionDialog |
boardSelectionDialog
|
IBoardView |
bv
|
(package private) ChatterBox |
cb
|
ChatLounge |
chatlounge
|
Client |
client
|
protected java.awt.Component |
curPanel
|
java.awt.Frame |
frame
|
protected GameListener |
gameListener
|
(package private) GameOptionsDialog |
gameOptionsDialog
|
MechDisplay |
mechD
|
java.awt.Dialog |
mechW
|
protected CommonMenuBar |
menuBar
|
MiniMap |
minimap
|
java.awt.Dialog |
minimapW
|
(package private) java.util.HashMap<java.lang.String,java.awt.Component> |
phaseComponents
Map phase component names to phase component objects. |
java.awt.PopupMenu |
popup
|
Ruler |
ruler
|
(package private) int |
selectedEntityNum
Current Selected entity |
static java.lang.String |
VIEW_LOS_SETTING
|
static java.lang.String |
VIEW_MEK_DISPLAY
|
static java.lang.String |
VIEW_MINI_MAP
|
static java.lang.String |
VIEW_TOGGLE_ISOMETRIC
|
static java.lang.String |
VIEW_UNIT_OVERVIEW
|
static java.lang.String |
VIEW_ZOOM_IN
|
static java.lang.String |
VIEW_ZOOM_OUT
|
| 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 | |
|---|---|
ClientGUI(Client client)
Construct a client which will display itself in a new frame. |
|
| Method Summary | |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent event)
Implement the ActionListener interface. |
protected void |
addBag(java.awt.Component comp,
java.awt.GridBagLayout gridbag,
java.awt.GridBagConstraints c)
|
void |
bing()
Make a "bing" sound. |
void |
boardHexHighlighted(BoardViewEvent b)
Sent when Hex is highlighted. |
void |
die()
Shuts down threads and sockets |
void |
doAlertDialog(java.lang.String title,
java.lang.String message)
Pops up a dialog box showing an alert |
int[] |
doChoiceDialog(java.lang.String title,
java.lang.String question,
java.lang.String[] choices)
Pops up a dialog box giving the player a series of choices that are not mutually exclusive. |
ConfirmDialog |
doYesNoBotherDialog(java.lang.String title,
java.lang.String question)
Pops up a dialog box asking a yes/no question The player will be given a chance to not show the dialog again. |
boolean |
doYesNoDialog(java.lang.String title,
java.lang.String question)
Pops up a dialog box asking a yes/no question |
protected void |
fillPopup(Coords coords)
|
void |
finishedMovingUnits(BoardViewEvent b)
Sent when moving units is finished. |
void |
firstLOSHex(BoardViewEvent b)
Sent when firstLOS is set. |
BoardSelectionDialog |
getBoardSelectionDialog()
Returns the board selection dialog, creating it on the first call |
IBoardView |
getBoardView()
|
java.util.Map<java.lang.String,Client> |
getBots()
|
Client |
getClient()
|
CustomFighterSquadronDialog |
getCustomFSDialog()
|
CustomInitiativeDialog |
getCustomInitiativeDialog()
|
java.awt.Frame |
getFrame()
|
GameOptionsDialog |
getGameOptionsDialog()
|
MechSelectorDialog |
getMechSelectorDialog()
|
CommonMenuBar |
getMenuBar()
Get the menu bar for this client. |
PlanetaryConditionsDialog |
getPlanetaryConditionsDialog()
|
RandomArmyDialog |
getRandomArmyDialog()
|
RandomSkillDialog |
getRandomSkillDialog()
|
int |
getSelectedEntityNum()
|
StartingPositionDialog |
getStartingPositionDialog()
|
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. |
void |
initialize()
Have the client register itself as a listener wherever it's needed. |
protected void |
loadListFile()
Allow the player to select a MegaMek Unit List file to load. |
void |
loadPreviewImage(BufferedPanel bp,
Entity entity)
|
void |
loadPreviewImage(BufferedPanel bp,
Entity entity,
Player player)
|
void |
loadSoundClip()
|
protected void |
saveListFile(java.util.ArrayList<Entity> unitList)
Allow the player to save a list of entities to a MegaMek Unit List file. |
void |
saveSettings()
Saves the current settings to the cfg file. |
void |
secondLOSHex(BoardViewEvent b,
Coords c)
Sent when secondLOS is set. |
void |
setDisplayVisible(boolean visible)
Sets the visibility of the entity display window |
protected void |
setHelpFileName(java.lang.String fileName)
Change the default help file name for this client. |
void |
setMapVisible(boolean visible)
Sets the visibility of the minimap window |
void |
setSelectedEntityNum(int selectedEntityNum)
|
protected void |
showBoardPopup(Coords c)
|
void |
showHelp()
Called when the user selects the "Help->Contents" menu item. |
void |
showLOSSettingDialog()
|
(package private) void |
switchPanel(IGame.Phase phase)
|
void |
systemMessage(java.lang.String message)
Display a system message in the chat box. |
void |
toggleDisplay()
Toggles the entity display window |
void |
toggleMap()
Toggles the minimap window Also, toggles the minimap enabled setting |
void |
toggleUnitOverview()
|
void |
unitSelected(BoardViewEvent b)
Sent when Unit is selected. |
void |
windowActivated(java.awt.event.WindowEvent windowEvent)
|
void |
windowClosed(java.awt.event.WindowEvent windowEvent)
|
void |
windowClosing(java.awt.event.WindowEvent windowEvent)
|
void |
windowDeactivated(java.awt.event.WindowEvent windowEvent)
|
void |
windowDeiconified(java.awt.event.WindowEvent windowEvent)
|
void |
windowIconified(java.awt.event.WindowEvent windowEvent)
|
void |
windowOpened(java.awt.event.WindowEvent windowEvent)
|
| 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, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusDownCycle, update, 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, setPreferredSize, 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 |
|---|
public static final java.lang.String VIEW_MEK_DISPLAY
public static final java.lang.String VIEW_MINI_MAP
public static final java.lang.String VIEW_LOS_SETTING
public static final java.lang.String VIEW_UNIT_OVERVIEW
public static final java.lang.String VIEW_ZOOM_IN
public static final java.lang.String VIEW_ZOOM_OUT
public static final java.lang.String VIEW_TOGGLE_ISOMETRIC
public java.awt.Frame frame
protected CommonMenuBar menuBar
ChatterBox cb
public IBoardView bv
public java.awt.Dialog mechW
public MechDisplay mechD
public java.awt.Dialog minimapW
public MiniMap minimap
public java.awt.PopupMenu popup
public Ruler ruler
protected java.awt.Component curPanel
public ChatLounge chatlounge
BoardSelectionDialog boardSelectionDialog
GameOptionsDialog gameOptionsDialog
public Client client
java.applet.AudioClip bingClip
java.util.HashMap<java.lang.String,java.awt.Component> phaseComponents
int selectedEntityNum
protected GameListener gameListener
| Constructor Detail |
|---|
public ClientGUI(Client client)
| Method Detail |
|---|
public IBoardView getBoardView()
public void loadSoundClip()
public void systemMessage(java.lang.String message)
message - the String message to be shown.public void initialize()
Client
is created.
public CommonMenuBar getMenuBar()
CommonMenuBar of this client.protected void setHelpFileName(java.lang.String fileName)
fileName - the String name of the help file for this
Client subclass. This value should not be
null.public void showHelp()
public void actionPerformed(java.awt.event.ActionEvent event)
ActionListener interface.
actionPerformed in interface java.awt.event.ActionListenerpublic void saveSettings()
public void die()
public BoardSelectionDialog getBoardSelectionDialog()
public GameOptionsDialog getGameOptionsDialog()
public MechSelectorDialog getMechSelectorDialog()
public CustomFighterSquadronDialog getCustomFSDialog()
public StartingPositionDialog getStartingPositionDialog()
public CustomInitiativeDialog getCustomInitiativeDialog()
public PlanetaryConditionsDialog getPlanetaryConditionsDialog()
void switchPanel(IGame.Phase phase)
protected void addBag(java.awt.Component comp,
java.awt.GridBagLayout gridbag,
java.awt.GridBagConstraints c)
protected void showBoardPopup(Coords c)
public void toggleDisplay()
public void setDisplayVisible(boolean visible)
public void toggleUnitOverview()
public void toggleMap()
public void setMapVisible(boolean visible)
protected void fillPopup(Coords coords)
public int[] doChoiceDialog(java.lang.String title,
java.lang.String question,
java.lang.String[] choices)
title - the String title of the dialog box.question - the String question that has a "Yes" or "No"
answer. The question will be split across multiple line on the
'\n' characters.choices - the array of String choices that the player can
select from.
int indexes of the from the input
array that match the selected choices. If no choices were
available, if the player did not select a choice, or if the
player canceled the choice, a null value is
returned.
public void doAlertDialog(java.lang.String title,
java.lang.String message)
public boolean doYesNoDialog(java.lang.String title,
java.lang.String question)
title - the String title of the dialog box.question - the String question that has a "Yes" or "No"
answer. The question will be split across multiple line on the
'\n' characters.
true if yes
public ConfirmDialog doYesNoBotherDialog(java.lang.String title,
java.lang.String question)
title - the String title of the dialog box.question - the String question that has a "Yes" or "No"
answer. The question will be split across multiple line on the
'\n' characters.
ConfirmDialog containing the player's responses.
The dialog will already have been shown to the player, and is
only being returned so the calling function can see the answer to
the question and the state of the "Show again?" question.protected void loadListFile()
Entitys in the file will replace any that the player has
already selected. As such, this method should only be called in the chat
lounge. The file can record damage sustained, non- standard munitions
selected, and ammunition expended in a prior engagement.
protected void saveListFile(java.util.ArrayList<Entity> unitList)
unitList - - the Vector of Entitys to be saved
to a file. If this value is null or empty, the
"Save As" dialog will not be displayed.public void windowActivated(java.awt.event.WindowEvent windowEvent)
windowActivated in interface java.awt.event.WindowListenerpublic void windowClosed(java.awt.event.WindowEvent windowEvent)
windowClosed in interface java.awt.event.WindowListenerpublic void windowClosing(java.awt.event.WindowEvent windowEvent)
windowClosing in interface java.awt.event.WindowListenerpublic void windowDeactivated(java.awt.event.WindowEvent windowEvent)
windowDeactivated in interface java.awt.event.WindowListenerpublic void windowDeiconified(java.awt.event.WindowEvent windowEvent)
windowDeiconified in interface java.awt.event.WindowListenerpublic void windowIconified(java.awt.event.WindowEvent windowEvent)
windowIconified in interface java.awt.event.WindowListenerpublic void windowOpened(java.awt.event.WindowEvent windowEvent)
windowOpened in interface java.awt.event.WindowListenerpublic java.awt.Frame getFrame()
public void showLOSSettingDialog()
public void loadPreviewImage(BufferedPanel bp,
Entity entity)
public void loadPreviewImage(BufferedPanel bp,
Entity entity,
Player player)
public void bing()
public Client getClient()
public java.util.Map<java.lang.String,Client> getBots()
public int getSelectedEntityNum()
public void setSelectedEntityNum(int selectedEntityNum)
selectedEntityNum - The selectedEntityNum to set.public RandomArmyDialog getRandomArmyDialog()
public RandomSkillDialog getRandomSkillDialog()
public void hexMoused(BoardViewEvent b)
BoardViewListener
hexMoused in interface BoardViewListenerb - an eventpublic void hexCursor(BoardViewEvent b)
BoardViewListener
hexCursor in interface BoardViewListenerb - an eventpublic void boardHexHighlighted(BoardViewEvent b)
BoardViewListener
boardHexHighlighted in interface BoardViewListenerb - an eventpublic void hexSelected(BoardViewEvent b)
BoardViewListener
hexSelected in interface BoardViewListenerb - an eventpublic void firstLOSHex(BoardViewEvent b)
BoardViewListener
firstLOSHex in interface BoardViewListenerb - an event
public void secondLOSHex(BoardViewEvent b,
Coords c)
BoardViewListener
secondLOSHex in interface BoardViewListenerb - an eventpublic void finishedMovingUnits(BoardViewEvent b)
BoardViewListener
finishedMovingUnits in interface BoardViewListenerb - an eventpublic void unitSelected(BoardViewEvent b)
BoardViewListener
unitSelected in interface BoardViewListenerb - an event
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||