fr.lip6.sma.simulacion.app.map
Class MapAction

java.lang.Object
  extended by fr.lip6.sma.simulacion.app.map.MapAction
All Implemented Interfaces:
ActionListener, EventListener, Action

public abstract class MapAction
extends Object
implements Action

The MapAction class reduces the Action AWT interface to only one method to be implemented: ActionPerformed. In Simulacion, GUI can use this class to react to actions without need to implement all the methods of the Action interface.

Version:
$Revision: 3 $
Author:
Eric Platon
See Also:
MapMultiCellPanel, MapCell

Field Summary
private  MapMultiCellPanel mPanel
          The panel where the action occurs.
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
MapAction(MapMultiCellPanel inPanel)
          Constructor.
 
Method Summary
abstract  void actionPerformed(ActionEvent inAction)
          Action performed by the class on attached event occurence.
 void addPropertyChangeListener(PropertyChangeListener inPCL)
          Not implemented.
 MapMultiCellPanel getPanel()
          Get the panel where the action occurs.
 Object getValue(String inStr)
          Not implemented.
 boolean isEnabled()
          MapAction are always enabled.
 void putValue(String inStr, Object inObject)
          Not implemented.
 void removePropertyChangeListener(PropertyChangeListener inPCL)
          Not implemented.
 void setEnabled(boolean inBoolean)
          MapAction are always enabled.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mPanel

private final MapMultiCellPanel mPanel
The panel where the action occurs.

Constructor Detail

MapAction

public MapAction(MapMultiCellPanel inPanel)
Constructor.

Parameters:
inPanel - the panel that will react to the action
Method Detail

isEnabled

public boolean isEnabled()
MapAction are always enabled.

Specified by:
isEnabled in interface Action
Returns:
Always true

setEnabled

public void setEnabled(boolean inBoolean)
MapAction are always enabled.

Specified by:
setEnabled in interface Action
Parameters:
inBoolean - true or false does not change the result

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener inPCL)
Not implemented.

Specified by:
addPropertyChangeListener in interface Action
Parameters:
inPCL - not used

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener inPCL)
Not implemented.

Specified by:
removePropertyChangeListener in interface Action
Parameters:
inPCL - not used

getValue

public Object getValue(String inStr)
Not implemented.

Specified by:
getValue in interface Action
Parameters:
inStr - not used
Returns:
Not used

putValue

public void putValue(String inStr,
                     Object inObject)
Not implemented.

Specified by:
putValue in interface Action
Parameters:
inStr - not used
inObject - not used

actionPerformed

public abstract void actionPerformed(ActionEvent inAction)
Action performed by the class on attached event occurence.

Specified by:
actionPerformed in interface ActionListener
Parameters:
inAction - the action event to process

getPanel

public final MapMultiCellPanel getPanel()
Get the panel where the action occurs.

Returns:
the panel where the action occurs.