public class MainDialog extends javax.swing.JFrame implements MainDialogI
javax.swing.JFrame.AccessibleJFramejava.awt.Window.AccessibleAWTWindow, java.awt.Window.TypeaccessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabledCROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSORBOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT| Constructor and Description |
|---|
MainDialog(BFProperties properties,
CommandDispatcher commandDispatcher)
Create the main dialog
|
| Modifier and Type | Method and Description |
|---|---|
void |
addChatMessage(java.lang.String name,
int cookie,
java.lang.String text)
Add a chat message to the Chat Pane
|
BoardTab |
getBoardTab()
Get a reference to the BoardTab
|
ChatPane |
getChatPane()
return a reference to the ChatPane.
|
ClientReceiveParser |
getClientReceiveParser()
Return a reference to our clientReceiveParser
|
Database |
getDB()
Get a reference to the Database.
|
Document |
getDocument()
Return a reference to our board.
|
GameManager |
getGameManager()
Return a reference to the game manager
|
javax.swing.JScrollPane |
getGameMessagesScrollPane()
This method initializes and returns a reference to systemMessagesTextPane
|
InviterTableModel |
getInviterTableModel()
Get the InviterTableModel from the inviterListPane
|
PlayerListPane |
getPlayerListTab()
This method initializes and returns a reference to playerListlPane
|
PlayerReportPane |
getPlayerReportPane() |
PlayerTableModel |
getPlayerTableModel()
Get the PlayerTableModel from the playerListPane
|
javax.swing.JScrollPane |
getSystemMessagesScrollPane()
This method initializes and returns a reference to systemMessagesTextPane
|
SystemMessagesTextPane |
getSystemMessagesTextPane() |
ToolBar |
getToolbar()
This method initializes and returns a reference to toolbar
|
void |
moveEvent(GameEvent gameEvent)
Draw this move happening
|
void |
onMatchOver(java.lang.String winner,
java.lang.String score) |
void |
playSound(AudioManager.Cue cue)
Play a sound
|
void |
redrawOwnInfo()
After parsing the "Own info" message from FIBS, update the buttons etc.
|
void |
setAskDouble(boolean b) |
void |
setBoardTabVisible() |
void |
setConnected(boolean b)
Set the display to show that we are connected to fibs.
|
void |
setGameMessagesTabVisible() |
void |
setInvitedTabVisible()
Make the invited tab visible
|
void |
setPlayerListTabVisible()
Make the list of Players visible
|
void |
setPlayerReportTabVisible() |
void |
setReadyToPlay(boolean b) |
void |
setSystemMessagesTabVisible() |
void |
showResignOutDialog() |
void |
startWatching()
Call when you start watching another match.
|
void |
systemMessagesScrollToBottom()
Scroll the system messages pane so that the last line is visible.
|
void |
updateBoard()
Repaint the backgammon board, after its been manipulated somehow
|
void |
updateRatingPanel() |
void |
writeGameMessageln(int type,
java.lang.String s)
Write a message to the Game message pane in the specified color.
|
void |
writeGameMessageln(java.lang.String s)
Write a message to the game window.
|
void |
youCantMove()
Turn off You moving
|
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, updateaddNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecoratedaddPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible, show, toBack, toFrontadd, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTreeaction, 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, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCyclepublic MainDialog(BFProperties properties, CommandDispatcher commandDispatcher)
properties - The Properties to usecommandDispatcher - The commandDispatcherpublic Document getDocument()
MainDialogIgetDocument in interface MainDialogIpublic void youCantMove()
public void startWatching()
public void updateBoard()
MainDialogIupdateBoard in interface MainDialogIpublic void moveEvent(GameEvent gameEvent)
MainDialogImoveEvent in interface MainDialogIgameEvent - The move to dopublic void updateRatingPanel()
public void playSound(AudioManager.Cue cue)
MainDialogIplaySound in interface MainDialogIcue - The sound Cue to playpublic PlayerTableModel getPlayerTableModel()
public InviterTableModel getInviterTableModel()
public GameManager getGameManager()
public ClientReceiveParser getClientReceiveParser()
public Database getDB()
public void setInvitedTabVisible()
public void redrawOwnInfo()
public void setConnected(boolean b)
b - true if we're connectedpublic void setReadyToPlay(boolean b)
public void setAskDouble(boolean b)
public void setSystemMessagesTabVisible()
public void setGameMessagesTabVisible()
public void setPlayerReportTabVisible()
public void setBoardTabVisible()
public void setPlayerListTabVisible()
public void showResignOutDialog()
public void writeGameMessageln(java.lang.String s)
writeGameMessageln in interface MainDialogIs - The message to write.public void writeGameMessageln(int type,
java.lang.String s)
type - The style of the texts - The message to writepublic void systemMessagesScrollToBottom()
public void onMatchOver(java.lang.String winner,
java.lang.String score)
public ToolBar getToolbar()
public PlayerListPane getPlayerListTab()
public ChatPane getChatPane()
public javax.swing.JScrollPane getSystemMessagesScrollPane()
public SystemMessagesTextPane getSystemMessagesTextPane()
public javax.swing.JScrollPane getGameMessagesScrollPane()
public PlayerReportPane getPlayerReportPane()
public void addChatMessage(java.lang.String name,
int cookie,
java.lang.String text)
name - The Player this message is tocookie - The cookie that created this eventtext - The message to writepublic BoardTab getBoardTab()