ggz.ui
Class RoomPanel

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by ggz.ui.RoomPanel
All Implemented Interfaces:
RoomListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible

public class RoomPanel
extends javax.swing.JPanel
implements RoomListener

See Also:
Serialized Form

Nested Class Summary
protected  class RoomPanel.BackToLobbyAction
           
protected  class RoomPanel.LogoutAction
           
 
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
 
Field Summary
protected  javax.swing.JButton lobbyButton
           
protected static java.util.logging.Logger log
           
protected  javax.swing.JButton logoutButton
           
protected static java.util.ResourceBundle messages
           
protected  Module module
           
protected  javax.swing.JButton newTableButton
           
protected  Room room
           
protected  Server server
           
protected  javax.swing.JSplitPane splitPane
           
protected  javax.swing.JPanel tablePanel
           
protected  ggz.ui.RoomPanel.TablesLayoutPanel tablesFlow
           
protected  javax.swing.JLabel titleLabel
           
 
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
RoomPanel(Server server)
           
 
Method Summary
 void chat_event(ChatEventData data)
          Received a chat message of any kind.
 void player_count(int count)
          The number of players in a room has arrived.
 void player_lag(Player player)
          A player's lag (measure of connection speed) has been updated
 void player_list(java.util.List players)
          The list of players in a room has arrived.
 void player_stats(Player player)
          A player's stats have been updated.
 void room_enter(RoomChangeEventData data)
          A player has entered the room with you.
 void room_leave(RoomChangeEventData data)
          A player has left your room.
 void setRoom(Room room)
           
 void table_add(Table table)
          A table has been created.
 void table_delete(Table table)
          A table has been removed from the room.
 void table_join_fail(java.lang.String error)
          Joining a table did not succeed.
 void table_joined(int table_index)
          Your table join attempt has succeeded.
 void table_launch_fail(ErrorEventData data)
          The table you tried to launch couldn't be launched
 void table_launched()
          The table you tried to launch has launched!
 void table_leave_fail(java.lang.String error)
          Your attempt to leave the table has failed.
 void table_left(TableLeaveEventData data)
          You have successfully left the table you were at.
 void table_list()
          Received the list of active tables.
 void table_update(Table table)
          One of the tables in the current room has changed.
 
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
 

Field Detail

messages

protected static final java.util.ResourceBundle messages

log

protected static final java.util.logging.Logger log

server

protected Server server

room

protected Room room

tablesFlow

protected ggz.ui.RoomPanel.TablesLayoutPanel tablesFlow

splitPane

protected javax.swing.JSplitPane splitPane

tablePanel

protected javax.swing.JPanel tablePanel

newTableButton

protected javax.swing.JButton newTableButton

titleLabel

protected javax.swing.JLabel titleLabel

logoutButton

protected javax.swing.JButton logoutButton

lobbyButton

protected javax.swing.JButton lobbyButton

module

protected Module module
Constructor Detail

RoomPanel

public RoomPanel(Server server)
Method Detail

setRoom

public void setRoom(Room room)
             throws java.io.IOException
Throws:
java.io.IOException

chat_event

public void chat_event(ChatEventData data)
Description copied from interface: RoomListener
Received a chat message of any kind. This can happen at any time when you're in a room.

Specified by:
chat_event in interface RoomListener
Parameters:
data - The GGZChatEventData associated with the chat.
See Also:
GGZChatEventData

player_count

public void player_count(int count)
Description copied from interface: RoomListener
The number of players in a room has arrived.

Specified by:
player_count in interface RoomListener
Parameters:
count - The number of players in the room.

player_lag

public void player_lag(Player player)
Description copied from interface: RoomListener
A player's lag (measure of connection speed) has been updated

Specified by:
player_lag in interface RoomListener
Parameters:
player - The player whose lag has changed.
See Also:
ggzcore_player_get_lag

player_list

public void player_list(java.util.List players)
Description copied from interface: RoomListener
The list of players in a room has arrived.

Specified by:
player_list in interface RoomListener
Parameters:
players - The list of players.
See Also:
ggzcore_room_list_players

player_stats

public void player_stats(Player player)
Description copied from interface: RoomListener
A player's stats have been updated.

Specified by:
player_stats in interface RoomListener
Parameters:
player - The player whose stats have changed.
See Also:
void PLAYER_LIST, ggzcore_player_get_record, ggzcore_player_get_rating, ggzcore_player_get_ranking, ggzcore_player_get_highscore

room_enter

public void room_enter(RoomChangeEventData data)
Description copied from interface: RoomListener
A player has entered the room with you.

Specified by:
room_enter in interface RoomListener
Parameters:
data - A GGZRoomChangeEventData structure.

room_leave

public void room_leave(RoomChangeEventData data)
Description copied from interface: RoomListener
A player has left your room.

Specified by:
room_leave in interface RoomListener
Parameters:
data - A GGZRoomChangeEventData structure.

table_join_fail

public void table_join_fail(java.lang.String error)
Description copied from interface: RoomListener
Joining a table did not succeed.

Specified by:
table_join_fail in interface RoomListener
See Also:
void TABLE_JOINED

table_joined

public void table_joined(int table_index)
Description copied from interface: RoomListener
Your table join attempt has succeeded.

Specified by:
table_joined in interface RoomListener
See Also:
ggzcore_room_join_table

table_launch_fail

public void table_launch_fail(ErrorEventData data)
Description copied from interface: RoomListener
The table you tried to launch couldn't be launched

Specified by:
table_launch_fail in interface RoomListener
Parameters:
data - A pointer to a GGZErrorEventData
See Also:
void TABLE_LAUNCHED

table_launched

public void table_launched()
Description copied from interface: RoomListener
The table you tried to launch has launched!

Specified by:
table_launched in interface RoomListener
See Also:
ggzcore_room_launch_table

table_leave_fail

public void table_leave_fail(java.lang.String error)
Description copied from interface: RoomListener
Your attempt to leave the table has failed.

Specified by:
table_leave_fail in interface RoomListener
See Also:
void TABLE_LEFT

table_left

public void table_left(TableLeaveEventData data)
Description copied from interface: RoomListener
You have successfully left the table you were at.

Specified by:
table_left in interface RoomListener
Parameters:
data - The GGZTableLeaveEventData associated with the leave.
See Also:
ggzcore_room_leave_table, GGZTableLeaveEventData

table_list

public void table_list()
Description copied from interface: RoomListener
Received the list of active tables.

Specified by:
table_list in interface RoomListener
See Also:
ggzcore_room_list_tables

table_add

public void table_add(Table table)
Description copied from interface: RoomListener
A table has been created.

Specified by:
table_add in interface RoomListener

table_delete

public void table_delete(Table table)
Description copied from interface: RoomListener
A table has been removed from the room.

Specified by:
table_delete in interface RoomListener

table_update

public void table_update(Table table)
Description copied from interface: RoomListener
One of the tables in the current room has changed.

Specified by:
table_update in interface RoomListener