gov.nasa.gsfc.drl.rtstps.viewer.tables
Class StatusTableAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by gov.nasa.gsfc.drl.rtstps.library.XAction
          extended by gov.nasa.gsfc.drl.rtstps.viewer.tables.StatusTableAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
Direct Known Subclasses:
PacketStatusTableAction, VcStatusTableAction

public abstract class StatusTableAction
extends XAction

This action lets the user create a status table window.

See Also:
Serialized Form

Nested Class Summary
(package private)  class StatusTableAction.MyWindowAdapter
           
 
Field Summary
private  java.util.TreeSet<java.lang.String> activeWindows
           
private  Distributor distributor
           
private  javax.swing.JFrame frame
           
private  int keystroke
           
private  char mnemonic
           
private static long serialVersionUID
           
private  java.lang.String tooltip
           
 
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
protected StatusTableAction(java.lang.String title, javax.swing.JFrame frame, Distributor distributor)
          Create the action.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          The action that is performed when the button is pressed or the menu item is selected.
protected abstract  StatusTableModel createStatusTableModel(Distributor d)
           
protected abstract  java.util.List<java.lang.String> getBlockList()
           
protected  java.util.List<java.lang.String> getBlockList(java.lang.String type)
          Get a list of block names from the Distributor.
protected  java.util.List<java.lang.String> getBlockList(java.lang.String[] typeNames)
          Get a list of block names from the Distributor.
 javax.swing.KeyStroke getKeyStroke()
          Get a hotkey combination that activates the action.
 char getMnemonic()
          Get the mnemonic character associated with the action label.
 java.lang.String getToolTip()
          Get the action's tooltip.
private  java.lang.Object[] pickBlocks(java.util.List<java.lang.String> blockNames)
          Ask the user to select blocks to display.
 void setKeyStroke(int key)
           
 void setMnemonic(char m)
           
 void setToolTip(java.lang.String tip)
           
 
Methods inherited from class gov.nasa.gsfc.drl.rtstps.library.XAction
getText
 
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

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

frame

private javax.swing.JFrame frame

distributor

private Distributor distributor

activeWindows

private java.util.TreeSet<java.lang.String> activeWindows

mnemonic

private char mnemonic

keystroke

private int keystroke

tooltip

private java.lang.String tooltip
Constructor Detail

StatusTableAction

protected StatusTableAction(java.lang.String title,
                            javax.swing.JFrame frame,
                            Distributor distributor)
Create the action.

Method Detail

setMnemonic

public final void setMnemonic(char m)

getMnemonic

public final char getMnemonic()
Description copied from class: XAction
Get the mnemonic character associated with the action label.

Specified by:
getMnemonic in class XAction
Returns:
the mnemonic character or null if there is none.

setKeyStroke

public final void setKeyStroke(int key)

getKeyStroke

public final javax.swing.KeyStroke getKeyStroke()
Description copied from class: XAction
Get a hotkey combination that activates the action. Here's an example that links control-A to the action.
  public KeyStroke getKeyStroke()
  {
      return KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_A,
               java.awt.event.InputEvent.CTRL_MASK);
  }
 

Specified by:
getKeyStroke in class XAction
Returns:
the associated keystroke combination

setToolTip

public final void setToolTip(java.lang.String tip)

getToolTip

public final java.lang.String getToolTip()
Description copied from class: XAction
Get the action's tooltip.

Specified by:
getToolTip in class XAction
Returns:
a tooltip string or null if there is none.

getBlockList

protected java.util.List<java.lang.String> getBlockList(java.lang.String type)
Get a list of block names from the Distributor.


getBlockList

protected java.util.List<java.lang.String> getBlockList(java.lang.String[] typeNames)
Get a list of block names from the Distributor.


getBlockList

protected abstract java.util.List<java.lang.String> getBlockList()

createStatusTableModel

protected abstract StatusTableModel createStatusTableModel(Distributor d)

pickBlocks

private java.lang.Object[] pickBlocks(java.util.List<java.lang.String> blockNames)
Ask the user to select blocks to display.


actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Description copied from class: XAction
The action that is performed when the button is pressed or the menu item is selected.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Specified by:
actionPerformed in class XAction