Class ActivationWindow

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

public class ActivationWindow extends AuxWindow
A window which allows configuration of activation actions.
Since:
21 Dec 2017
Author:
Mark Taylor
See Also:
  • Field Details

    • ACTIVATORS_PROP

      public static final String ACTIVATORS_PROP
      Name of a system property ("topcat.activators") that may supply ActivationType implementations to be made available at run-time. The value is a colon-separated list, each item being the name of a class that implements ActivationType and has a no-arg constructor.
      See Also:
  • Constructor Details

    • ActivationWindow

      public ActivationWindow(TopcatModel tcModel, Component parent)
      Constructs a new window.
      Parameters:
      tcModel - topcat model
      parent - parent window, may be used for positioning
  • Method Details

    • getSelectedEntry

      public ActivationEntry getSelectedEntry()
      Returns the currently selected ActivationEntry. May be null.
      Returns:
      selected entry
    • activateRow

      public void activateRow(long lrow, ActivationMeta meta)
      Invokes all the currently configured activation actions for a given table row index. Calling this method is the correct way to invoke activation actions, since it performs appropriate scheduling and delivers result information to the right place.
      Parameters:
      lrow - row index
      meta - additional invocation information
    • getActiveActivators

      public Activator[] getActiveActivators()
      Returns a list of the currently active Activator objects. Those whose checkboxes are unchecked or which are not configured to perform any action are excluded.
      Returns:
      list of active activators
    • getActivationSummary

      public String getActivationSummary()
      Returns a short text summary of the current activation status.
      Returns:
      activation summary text
    • getActivationState

      public List<Map<String,String>> getActivationState()
      Returns the state of this window in a form that is easily serialized but can be fed back to another instance of this class with the same table to restore the interesting parts of the state.
      Returns:
      activation state object
    • setActivationState

      public void setActivationState(List<Map<String,String>> stateList)
      Updates the state of this window to match state stored from a previous instance. The supplied state is expected to apply to a table (TopcatModel) that matches the one owned by this window in relevant respects (for instance column list).
      Parameters:
      stateList - activation state object
    • getOptionActivationTypes

      public static ActivationType[] getOptionActivationTypes()
      Returns a list of activation types that should be available for selection for a given table.
      Returns:
      available activation types