rle.simple.action
Class ItemCommands

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by rle.core.ui.UiActionBase
          extended by rle.simple.action.ItemCommands
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action, UiAction, PlugIn

public class ItemCommands
extends UiActionBase

Class that handles item commands, eg inventory, drop, etc

See Also:
Serialized Form

Nested Class Summary
protected  class ItemCommands.RemoveTable
          Hide the table and return to board commands.
protected  class ItemCommands.SetTable
          Toggle the visibility of the table.
protected  class ItemCommands.ToggleTableVisibility
          Toggle the visibility of the table.
 
Field Summary
 
Fields inherited from class rle.core.ui.UiActionBase
config, context, parameters
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
ItemCommands()
           
 
Method Summary
 void configureCommands()
          Enable the appropriate commands for the current item table.
 void doAction()
          Perform an action on the Game Thread.
 Inventory getBoardFloor()
           
 ItemTable getCurrentTable()
           
 Equipment getPlayerEquipment()
           
 Inventory getPlayerInventory()
           
 UiAction getStopAction()
           
 void setConfig(InfoView view)
          Set the configuring InfoView.
 void showPrompt()
          Show the appropriate prompt.
 void updateTable()
          Update the current table.
 
Methods inherited from class rle.core.ui.UiActionBase
actionPerformed, config, getContext, getEvent, getParameters, paramMap, setParameters
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.swing.Action
addPropertyChangeListener, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 

Constructor Detail

ItemCommands

public ItemCommands()
Method Detail

setConfig

public void setConfig(InfoView view)
Description copied from interface: PlugIn
Set the configuring InfoView.

Specified by:
setConfig in interface PlugIn
Overrides:
setConfig in class UiActionBase

getCurrentTable

public ItemTable getCurrentTable()

updateTable

public void updateTable()
Update the current table.


showPrompt

public void showPrompt()
Show the appropriate prompt.


configureCommands

public void configureCommands()
Enable the appropriate commands for the current item table. This method is general to all commands that must choose an item. The action to take once an item is chosen is specified by the Plug-in parameter "action-path", which is the VM path of the Plug-in node.


doAction

public void doAction()
Description copied from interface: UiAction
Perform an action on the Game Thread.


getStopAction

public UiAction getStopAction()

getPlayerInventory

public Inventory getPlayerInventory()

getBoardFloor

public Inventory getBoardFloor()

getPlayerEquipment

public Equipment getPlayerEquipment()