Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## info.bioinfweb.treegraph.gui.actions
Class DocumentAction

    java.lang.Object
      javax.swing.AbstractAction
          info.bioinfweb.treegraph.gui.actions.TreeGraphAction
              info.bioinfweb.treegraph.gui.actions.DocumentAction

All Implemented Interfaces:
  java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action

Direct Known Subclasses:
  AutoPositionLabelsAction, ChangePainterIDAction, CloseAction, CollapseNodeAction, CopyAllLabelsAction, CopyElementAction, DeleteColumnAction, DeleteElementAction, DeleteSubelementsAction, EditDialogAction, ExitAction, ExportToPDFAction, ImportTableAction, InvertSelectionAction, LadderizeAction, MoveSubtreeAction, NewDocumentAction, NewLegendAction, NewNodeAction, NextDocumentAction, PasteAction, PreviousDocumentAction, ReanchorLegendAction, RedoAction, RerootAction, SaveAction, SaveAsAction, SearchTextAction, SelectAllAction, SelectLabelsInSubtreeAction, SelectLabelsWithIDAction, SelectLeafsInDocumentAction, SelectLeafsInSubtreeAction, SelectLegendsAction, SelectLegendsInSubtreeAction, SelectLegendsWithPosIndexAction, SelectSubtreeAction, SelectTypeInDocumentAction, SelectTypeInSubtreeAction, SeparateBranchAction, SetColumnTypeAction, SetZoomAction, ShowHideScaleBarAction, ShowRootedAction, UndoAction, UndoRedoToAction

    public abstract class DocumentAction

extends TreeGraphAction

Implements basic functionality for all actions in TreeGraph 2 which are applied on opened documents. All subclasses have access

Author:
  Ben Stöver
See Also:
  Serialized Form

Field Summary
`private MainFrame` | `mainFrame`

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
`DocumentAction(MainFrame mainFrame)`

Method Summary
`void` | `actionPerformed(java.awt.event.ActionEvent e)` Determines the currently active internal frame and passes it to `onActionPerformed(ActionEvent, TreeInternalFrame)`.
`protected MainFrame` | `getMainFrame()`
`protected abstract void` | `onActionPerformed(java.awt.event.ActionEvent e, TreeInternalFrame frame)` Subclasses should implement this method instead of overriding `actionPerformed(ActionEvent)`.
`protected static boolean` | `oneElementSelected(TreeSelection selection)` Tests if exactly one element (not none and not more) is contained in the given selection.
`abstract void` | `setEnabled(Document document, TreeSelection selection, NodeBranchDataAdapter tableAdapter)`

Methods inherited from class info.bioinfweb.treegraph.gui.actions.TreeGraphAction
`loadSymbols`

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

### mainFrame

    private MainFrame mainFrame

Constructor Detail

### DocumentAction

    public DocumentAction(MainFrame mainFrame)

Method Detail

### onActionPerformed

    protected abstract void onActionPerformed(java.awt.event.ActionEvent e,
                                              TreeInternalFrame frame)

  Subclasses should implement this method instead of overriding `actionPerformed(ActionEvent)`.

  Parameters:
    `e` -
    `frame` - - the internal frame which was active while the user performed this action

### setEnabled

    public abstract void setEnabled(Document document,
                                    TreeSelection selection,
                                    NodeBranchDataAdapter tableAdapter)

### oneElementSelected

    protected static boolean oneElementSelected(TreeSelection selection)

  Tests if exactly one element (not none and not more) is contained in the given selection.

  Parameters:
    `selection` -
  Returns:

### getMainFrame

    protected MainFrame getMainFrame()

### actionPerformed

    public void actionPerformed(java.awt.event.ActionEvent e)

  Determines the currently active internal frame and passes it to `onActionPerformed(ActionEvent, TreeInternalFrame)`. If no active frame is found an error message is displayed and `onActionPerformed(ActionEvent, TreeInternalFrame)` is not called.

  See Also:
    `ActionListener.actionPerformed(java.awt.event.ActionEvent)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD