|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--java.awt.Window | +--java.awt.Frame | +--ks.client.gamefactory.GameWindow
Primary Window for managing the Container within which the solitaire action takes place.
GameWindow can speak back to the primary connection through its helperClient (which it shares with KombatClient).
GameWindow receives TimerExpired events from its TimerPanel
entity.
Creation date: (9/25/01 9:19:21 PM)
Field Summary | |
protected java.lang.String |
currentUser
Name of the current user. |
protected int |
initialHeight
Initial height for the window. |
protected int |
initialWidth
Initial width for the window. |
protected Status |
keepStatus
Maintain status information that will be sent on to the server in minorTick(). |
protected int |
lastHeight
Last height for the window. |
protected int |
lastWidth
Last width for the window. |
protected ITableRequests |
requester
When GameWindow needs to talk to the entity running the show, use this object. |
protected SolitaireSolver |
ss
Since V1.6.2: The solver. |
protected Table |
table
Table being played. |
protected Solitaire |
theSSGame
Since V1.6.2: When a plugin is solvable, we keep track of it here for access in solving. |
Fields inherited from class java.awt.Frame |
CROSSHAIR_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_CURSOR |
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 | |
GameWindow()
GameWindow constructor comment. |
|
GameWindow(java.lang.String title)
GameWindow constructor comment. |
Method Summary | |
void |
activate(boolean status)
Activate/Deactivate this game. |
void |
addUserToTable(java.lang.String newUser)
Adds the user to this table. |
void |
announceStatus(Status status)
Process the updates coming from the internal container. |
protected void |
completeInitialization()
|
void |
container_MouseClicked(java.awt.event.MouseEvent mouseEvent)
Route the event into the container handler routines |
void |
container_MouseDragged(java.awt.event.MouseEvent mouseEvent)
Route the event into the container handler routines |
void |
container_MouseMoved(java.awt.event.MouseEvent mouseEvent)
Route the event into the container handler routines |
void |
container_MousePressed(java.awt.event.MouseEvent mouseEvent)
Route the event into the container handler routines |
void |
container_MouseReleased(java.awt.event.MouseEvent mouseEvent)
Route the event into the container handler routines |
protected java.awt.Image |
createBackgroundImage(java.net.URL u)
Construct an image given the specified URL Creation date: (10/9/01 8:26:51 PM) |
void |
gameWindow_ComponentResized(java.awt.event.ComponentEvent componentEvent)
Handle the window resize events here. |
void |
gameWindow_WindowEvents()
Comment |
Container |
getGameContainer()
Returns the Container in which solitaire games are being executed. |
int |
getGameLength()
Return the time length of the table associated with this interface Creation date: (10/16/01 9:21:41 PM) |
Table |
getTable()
Return the table for this window. |
java.lang.String |
getTableName()
Knows info about table. |
java.lang.String |
getTableType()
Knows info about table. |
void |
initialize(Solitaire game)
Initialize game canvas using specific solitaire game. |
void |
inputField_ActionPerformed(java.awt.event.ActionEvent actionEvent)
React to new text entered into the input field. |
void |
leaveGame_ActionPerformed(java.awt.event.ActionEvent actionEvent)
Comment |
void |
leaveTable()
must send this request on to the server. |
void |
minorTick()
Send status information on to the server. |
void |
newGame_ActionPerformed(java.awt.event.ActionEvent actionEvent)
Process 'new hand' requests. |
int |
offsetHeight()
Return the height to offset our GUI elements (if any) |
int |
offsetWidth()
Return the width to offset our GUI elements (if any) |
void |
processChat(java.lang.String msg)
Send chat output to the output Field. |
void |
processMessage(Message msg)
Ability process a message from the server is now added. |
void |
processStatusTick(java.lang.String player,
int numWon,
int numPoints)
Update information for this user on the player rankings panel. |
void |
rejoinGame_ActionPerformed(java.awt.event.ActionEvent actionEvent)
Ask helper to restart the game for us (same seed and all). |
void |
removeUserFromTable(java.lang.String exitingUser)
Removes user from this table. |
void |
restart_ActionPerformed(java.awt.event.ActionEvent actionEvent)
Process 'reset hand' requests. |
void |
sendCommand(Command com)
This method enables the kombatSolitaire plugin (via Container) to deliver a command to the server. |
void |
setRequester(ITableRequests requester)
Tell GameWindow who to turn to with specific game requests. |
void |
setSkin(java.lang.String skinChoice)
Set the skin for this GameWindow... |
void |
setTable(Table newTable)
Keep track of the table to be able to answer useful questions later. |
void |
setUser(java.lang.String user)
Sets the name of the user for this Game. |
void |
startSolveButton1_ActionPerformed()
Comment |
void |
startTimer()
Have the timerPanel start counting down. |
void |
stopSolveButton_ActionPerformed()
Comment |
void |
stopTimer()
Have the timerPanel stop counting down. |
void |
terminateGame()
|
void |
timerExpired()
When timer expires, this method is invoked. |
void |
updateTitle(Solitaire game)
Changes the title of the Frame to reflect the game name and type Creation date: (10/6/01 5:00:26 PM) |
void |
wonGame()
Actions to process once the solitaire game has been won. |
Methods inherited from class java.awt.Frame |
addNotify, finalize, getAccessibleContext, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, paramString, remove, removeNotify, setCursor, setExtendedState, setIconImage, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
Methods inherited from class java.awt.Window |
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, processEvent, processWindowEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, show, toBack, toFront |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, transferFocusBackward, 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, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, 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, isOpaque, 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, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.awt.MenuContainer |
getFont, postEvent |
Field Detail |
protected java.lang.String currentUser
protected ITableRequests requester
protected int initialWidth
protected int initialHeight
protected int lastHeight
protected int lastWidth
protected Solitaire theSSGame
protected SolitaireSolver ss
protected Table table
protected Status keepStatus
Constructor Detail |
public GameWindow()
public GameWindow(java.lang.String title)
title
- java.lang.StringMethod Detail |
public java.lang.String getTableName()
public java.lang.String getTableType()
public void activate(boolean status)
public void addUserToTable(java.lang.String newUser)
newUser
- Statuspublic void announceStatus(Status status)
status
- ks.common.Statuspublic void container_MouseClicked(java.awt.event.MouseEvent mouseEvent)
public void container_MouseDragged(java.awt.event.MouseEvent mouseEvent)
public void container_MouseMoved(java.awt.event.MouseEvent mouseEvent)
public void container_MousePressed(java.awt.event.MouseEvent mouseEvent)
public void container_MouseReleased(java.awt.event.MouseEvent mouseEvent)
protected java.awt.Image createBackgroundImage(java.net.URL u)
u
- java.net.URL
public void gameWindow_ComponentResized(java.awt.event.ComponentEvent componentEvent)
public void gameWindow_WindowEvents()
public Container getGameContainer()
public int getGameLength()
public Table getTable()
public void initialize(Solitaire game)
since v1.6.2 this enables a button "Solve" if the solitaire game is an instance of SolvableSolitaire.
Creation date: (10/1/01 9:10:22 PM)
game
- Solitaireprotected void completeInitialization()
public void inputField_ActionPerformed(java.awt.event.ActionEvent actionEvent)
public void leaveGame_ActionPerformed(java.awt.event.ActionEvent actionEvent)
public void leaveTable()
public void minorTick()
minorTick
in interface ITimerExpired
public void newGame_ActionPerformed(java.awt.event.ActionEvent actionEvent)
public int offsetHeight()
public int offsetWidth()
public void processChat(java.lang.String msg)
msg
- java.lang.Stringpublic void processStatusTick(java.lang.String player, int numWon, int numPoints)
player
- java.lang.StringnumWon
- intnumPoints
- intpublic void rejoinGame_ActionPerformed(java.awt.event.ActionEvent actionEvent)
public void removeUserFromTable(java.lang.String exitingUser)
exitingUser
- Statuspublic void restart_ActionPerformed(java.awt.event.ActionEvent actionEvent)
public void setRequester(ITableRequests requester)
public void setSkin(java.lang.String skinChoice)
public void setTable(Table newTable)
newTable
- ks.common.Tablepublic void setUser(java.lang.String user)
public void sendCommand(Command com)
com
- Command to be sent.public void startSolveButton1_ActionPerformed()
public void startTimer()
public void stopSolveButton_ActionPerformed()
public void stopTimer()
public void timerExpired()
timerExpired
in interface ITimerExpired
public void updateTitle(Solitaire game)
game
- ks.games.Solitairepublic void wonGame()
public void terminateGame()
public void processMessage(Message msg)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |