Package uk.ac.starlink.topcat.activate
Class ActivationEntry
- java.lang.Object
-
- uk.ac.starlink.topcat.activate.ActivationEntry
-
public class ActivationEntry extends java.lang.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 Summary
Constructors Constructor Description ActivationEntry(ActivationType atype, TopcatModelInfo tinfo)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.void
activateRowSync(Activator activator, long lrow, ActivationMeta meta)
Invokes the currently configured activation action for this entry, returning only when it has completed.ActivatorConfigurator
getConfigurator()
Returns the GUI configuration component associated with this entry.javax.swing.JComponent
getLogPanel()
Returns the GUI component that displays the results of activation actions associated with this entry.ActivationType
getType()
Returns the activation type managed by this entry.boolean
isBlocked()
Indicates whether this entry is considered a potential security risk.void
setBlocked(boolean isBlocked)
Sets whether this entry is considered a potential security risk.
-
-
-
Constructor Detail
-
ActivationEntry
public ActivationEntry(ActivationType atype, TopcatModelInfo tinfo)
Constructor.- Parameters:
atype
- activation typetinfo
- information about TopcatModel for which this entry will work
-
-
Method Detail
-
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 javax.swing.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 activatemeta
- 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
- activatorlrow
- row index to activatemeta
- activation metadata
-
-