Class ActivationEntry

java.lang.Object
uk.ac.starlink.topcat.activate.ActivationEntry

public class ActivationEntry extends Object
Manages the GUI and behaviour for one entry in the list of activation options displayed in the ActivationWindow.
Since:
23 Jan 2018
Author:
Mark Taylor
  • Constructor Details

    • ActivationEntry

      public ActivationEntry(ActivationType atype, TopcatModelInfo tinfo)
      Constructor.
      Parameters:
      atype - activation type
      tinfo - information about TopcatModel for which this entry will work
  • Method Details

    • getType

      public ActivationType getType()
      Returns the activation type managed by this entry.
      Returns:
      activation type
    • getConfigurator

      public ActivatorConfigurator getConfigurator()
      Returns the GUI configuration component associated with this entry.
      Returns:
      configurator panel
    • getLogPanel

      public JComponent getLogPanel()
      Returns the GUI component that displays the results of activation actions associated with this entry.

      The returned component should manage its own scrolling if required; that is, it will not be wrapped in a JScrollPane.

      Returns:
      results panel
    • isBlocked

      public boolean isBlocked()
      Indicates whether this entry is considered a potential security risk. This class maintains this flag, but doesn't take any notice of it. The default status is unblocked.
      Returns:
      true iff setBlocked has been called with a true argument (more recently than with a false argument)
    • setBlocked

      public void setBlocked(boolean isBlocked)
      Sets whether this entry is considered a potential security risk. This class maintains this flag, but doesn't take any notice of it. The default status is unblocked.
      Parameters:
      isBlocked - blocking flag
    • activateRowAsync

      public void activateRowAsync(long lrow, ActivationMeta meta)
      Invokes the currently configured activation action for this entry, scheduling it on an appropriate thread and directing the output to a suitable destination for display.

      This method should be called on the EDT. It should return in a short amount of time.

      Parameters:
      lrow - row index to activate
      meta - activation metadata
    • activateRowSync

      public void activateRowSync(Activator activator, long lrow, ActivationMeta meta)
      Invokes the currently configured activation action for this entry, returning only when it has completed. The output is directed the output to a suitable destination.

      This method should not be called on the EDT. It may take some time to execute.

      Parameters:
      activator - activator
      lrow - row index to activate
      meta - activation metadata