com.threerings.parlor.client
Class TableConfigurator

java.lang.Object
  extended by com.threerings.parlor.client.TableConfigurator
Direct Known Subclasses:
DefaultSwingTableConfigurator

public abstract class TableConfigurator
extends Object

This should be implemented some user-interface element that allows the user to configure whichever TableConfig options are relevant.


Field Summary
protected  TableConfig _config
          The config we're configurating.
protected  ParlorContext _ctx
          Provides access to client services.
protected  GameConfigurator _gameConfigurator
          The game configurator, which we may wish to reference.
 
Constructor Summary
TableConfigurator()
          Create a TableConfigurator.
 
Method Summary
protected  void createConfigInterface()
          Create the config interface.
protected  TableConfig createTableConfig()
          Create the table config object that will be used.
protected  void flushTableConfig()
          Derived classes will want to override this method, flushing values from the user interface to the table config object.
 TableConfig getTableConfig()
          Return the fully configured table config according to the currently configured user interface elements.
 void init(ParlorContext ctx, GameConfigurator gameConfigurator)
          Initialize the TableConfigurator.
abstract  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.
 void setTableConfig(TableConfig config)
          Optionally, you can set a pre-configured TableConfig that will be used to initialize the display parameters (if possible).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_ctx

protected ParlorContext _ctx
Provides access to client services.


_config

protected TableConfig _config
The config we're configurating.


_gameConfigurator

protected GameConfigurator _gameConfigurator
The game configurator, which we may wish to reference.

Constructor Detail

TableConfigurator

public TableConfigurator()
Create a TableConfigurator.

Method Detail

setTableConfig

public void setTableConfig(TableConfig config)
Optionally, you can set a pre-configured TableConfig that will be used to initialize the display parameters (if possible). This should be called prior to init().


init

public void init(ParlorContext ctx,
                 GameConfigurator gameConfigurator)
Initialize the TableConfigurator. At the time this is called, the GameConfigurator should have already been initialized.


createTableConfig

protected TableConfig createTableConfig()
Create the table config object that will be used.


createConfigInterface

protected void createConfigInterface()
Create the config interface.


isEmpty

public abstract 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.


getTableConfig

public TableConfig getTableConfig()
Return the fully configured table config according to the currently configured user interface elements.


flushTableConfig

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