verinec.adaptation.gui
Class AdaptationModule.TransAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by verinec.adaptation.gui.AdaptationModule.TransAction
All Implemented Interfaces:
ActionListener, Serializable, Cloneable, EventListener, Action
Direct Known Subclasses:
AdaptationModule.DistributeAction, AdaptationModule.ExportAction
Enclosing class:
AdaptationModule

abstract class AdaptationModule.TransAction
extends AbstractAction

Base class for export and distribute actions.

Author:
david.buchmann at unifr.ch

Field Summary
protected  PCNode node
          The PC node of this action or null if general action.
 
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
AdaptationModule.TransAction(String name, Icon icon, PCNode n)
          Instantiate the action.
 
Method Summary
 void actionPerformed(ActionEvent e)
          Execute export action, calling exportConfig for all PCNodes if node is null, otherwise for that node.
protected abstract  void processNode(PCNode n)
          Process a node in the action, overwrite to perform the desired action.
 
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
 

Field Detail

node

protected PCNode node
The PC node of this action or null if general action.

Constructor Detail

AdaptationModule.TransAction

public AdaptationModule.TransAction(String name,
                                    Icon icon,
                                    PCNode n)
Instantiate the action. If the node is null, operates on all nodes.

Parameters:
name - Display name
icon - Image icon for the action
n - The node this action is bound to or null.
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
Execute export action, calling exportConfig for all PCNodes if node is null, otherwise for that node.

Parameters:
e - unused

processNode

protected abstract void processNode(PCNode n)
                             throws Throwable
Process a node in the action, overwrite to perform the desired action.

Parameters:
n - The node to process.
Throws:
Throwable - Exceptions are not caught.

Copyright © 2005 Verinec, DIUF