public class ChoiceConfigurator extends AbstractActivatorConfigurator
Constructor and Description |
---|
ChoiceConfigurator(ActivatorConfigurator[] configurators)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Activator |
getActivator()
Constructs an activator in accordance with the current state of
this GUI.
|
String |
getConfigMessage()
Returns a short status message for display to the user.
|
Safety |
getSafety()
Indicates whether an activator created by the current state
of this configurator is known to be harmless.
|
ConfigState |
getState()
Returns an object that contains the current state of this configurator.
|
void |
setState(ConfigState state)
Restores the state of this object from a given state object.
|
addActionListener, createDisplayField, createDisplayLabel, getActionForwarder, getPanel, removeActionListener
public ChoiceConfigurator(ActivatorConfigurator[] configurators)
Object.toString()
, and the component returned by their
ActivatorConfigurator.getPanel()
method should give a
visual indication for its {JComponent#setEnabled enabled} property.configurators
- configurator optionspublic Activator getActivator()
ActivatorConfigurator
This method may be called often, so should be cheap to invoke. The idea is that it will be called immediately before the activator is used, so the returned object may fix, rather than arrange to gather at a later date, information acquired from the GUI.
ActivatorConfigurator.getConfigMessage()
public String getConfigMessage()
ActivatorConfigurator
As a rule, exactly one of this method and the
getActivator
should return null.
If there is no activator, this method should return some
reason why the configuration is incorrect or incomplete,
and otherwise it should return null.
public Safety getSafety()
ActivatorConfigurator
Implementations should be cautious; if some slightly adjusted state might be dangerous, false could be returned as well (that's why this method is on ActivatorConfigurator and not Activator itself).
public ConfigState getState()
ActivatorConfigurator
public void setState(ConfigState state)
ActivatorConfigurator
state
- stored stateCopyright © 2003-2025 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.