com.threerings.parlor.client
Class DefaultSwingTableConfigurator

java.lang.Object
  extended by com.threerings.parlor.client.TableConfigurator
      extended by com.threerings.parlor.client.DefaultSwingTableConfigurator

public class DefaultSwingTableConfigurator
extends TableConfigurator

Provides a default implementation of a TableConfigurator for a Swing interface.


Field Summary
protected  SimpleSlider _playerSlider
          A slider for configuring the number of players at the table.
protected  JCheckBox _privateCheck
          A checkbox to allow the table creator to specify if the table is private.
 
Fields inherited from class com.threerings.parlor.client.TableConfigurator
_config, _ctx, _gameConfigurator
 
Constructor Summary
DefaultSwingTableConfigurator(int players)
          Create a TableConfigurator that allows only the specified number of players and lets the configuring user enable private games only if the number of players is greater than 2.
DefaultSwingTableConfigurator(int players, boolean allowPrivate)
          Create a TableConfigurator that allows only the specified number of players and lets the user configure a private table, or not.
DefaultSwingTableConfigurator(int minPlayers, int desiredPlayers, int maxPlayers, boolean allowPrivate)
          Create a TableConfigurator that allows for the specified configuration parameters.
 
Method Summary
protected  void createConfigInterface()
          Create the config interface.
protected  void flushTableConfig()
          Derived classes will want to override this method, flushing values from the user interface to the table config object.
 boolean isEmpty()
          If true, the TableConfigurator is empty, which doesn't mean that it will not return a TableConfig object (for it must), but rather that there are no user-editable options being presented in the config interface.
 
Methods inherited from class com.threerings.parlor.client.TableConfigurator
createTableConfig, getTableConfig, init, setTableConfig
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_playerSlider

protected SimpleSlider _playerSlider
A slider for configuring the number of players at the table.


_privateCheck

protected JCheckBox _privateCheck
A checkbox to allow the table creator to specify if the table is private.

Constructor Detail

DefaultSwingTableConfigurator

public DefaultSwingTableConfigurator(int players)
Create a TableConfigurator that allows only the specified number of players and lets the configuring user enable private games only if the number of players is greater than 2.


DefaultSwingTableConfigurator

public DefaultSwingTableConfigurator(int players,
                                     boolean allowPrivate)
Create a TableConfigurator that allows only the specified number of players and lets the user configure a private table, or not.


DefaultSwingTableConfigurator

public DefaultSwingTableConfigurator(int minPlayers,
                                     int desiredPlayers,
                                     int maxPlayers,
                                     boolean allowPrivate)
Create a TableConfigurator that allows for the specified configuration parameters.

Method Detail

createConfigInterface

protected void createConfigInterface()
Description copied from class: TableConfigurator
Create the config interface.

Overrides:
createConfigInterface in class TableConfigurator

isEmpty

public boolean isEmpty()
Description copied from class: TableConfigurator
If true, the TableConfigurator is empty, which doesn't mean that it will not return a TableConfig object (for it must), but rather that there are no user-editable options being presented in the config interface.

Specified by:
isEmpty in class TableConfigurator

flushTableConfig

protected void flushTableConfig()
Description copied from class: TableConfigurator
Derived classes will want to override this method, flushing values from the user interface to the table config object.

Overrides:
flushTableConfig in class TableConfigurator