cz.cuni.pogamut.posh.widget.kidview
Class AbstractMenuAction<T extends cz.cuni.amis.pogamut.sposh.elements.PoshElement>

Package class diagram package AbstractMenuAction
java.lang.Object
  extended by javax.swing.AbstractAction
      extended by cz.cuni.pogamut.posh.widget.kidview.AbstractMenuAction<T>
Type Parameters:
T - Type of data node on which the menu action will be performed
All Implemented Interfaces:
ActionListener, Serializable, Cloneable, EventListener, Action
Direct Known Subclasses:
AddAP2Plan, AddCE2Comp, AddComp2Plan, AddDPE2DC, AddSense2CE, AddSense2Goal, AddSense2Trigger, AddTA2AP, DeleteNodeAction

public abstract class AbstractMenuAction<T extends cz.cuni.amis.pogamut.sposh.elements.PoshElement>
extends AbstractAction

Ancestor of (most) Shed menu actions. Basically every menu action will modify underlying data node in some way, this class provides link to the data node (dataNode) and possibly to the widget (widget) on which the action is being performed on. It also provides handy method (errorDialog(java.lang.String)) for displaying message to the user if action is for some reason impossible to perform.

Author:
HonzaH
See Also:
Serialized Form

Field Summary
protected  T dataNode
           
protected  PoshWidget widget
           
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
AbstractMenuAction(String desc, T dataNode)
           
AbstractMenuAction(String desc, T dataNode, PoshWidget widget)
           
 
Method Summary
protected  void errorDialog(String message)
          Display user an error that occured during
 String getDescription()
           
protected  String getIdentifierFromDialog(String purposeTitle)
           
protected  void setDescription(String newDesc)
           
 
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 java.awt.event.ActionListener
actionPerformed
 

Field Detail

dataNode

protected T extends cz.cuni.amis.pogamut.sposh.elements.PoshElement dataNode

widget

protected PoshWidget widget
Constructor Detail

AbstractMenuAction

public AbstractMenuAction(String desc,
                          T dataNode,
                          PoshWidget widget)

AbstractMenuAction

public AbstractMenuAction(String desc,
                          T dataNode)
Method Detail

getDescription

public final String getDescription()

setDescription

protected final void setDescription(String newDesc)

getIdentifierFromDialog

protected final String getIdentifierFromDialog(String purposeTitle)

errorDialog

protected final void errorDialog(String message)
Display user an error that occured during

Parameters:
message - message with error


Copyright © 2013 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.