public abstract class UrlColumnConfigurator extends AbstractActivatorConfigurator
Modifier and Type | Class and Description |
---|---|
protected static class |
UrlColumnConfigurator.LocationColumnActivator
Utility class providing a partial Activator implementation
for UrlColumnConfigurators that want a location (file or URL) value.
|
protected static class |
UrlColumnConfigurator.UrlColumnActivator
Utility class providing a partial Activator implementation
for UrlColumnConfigurators that want an actual URL value.
|
Modifier | Constructor and Description |
---|---|
protected |
UrlColumnConfigurator(TopcatModelInfo tinfo,
String urlWord,
ColFlag[] urlFlags)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected abstract Activator |
createActivator(uk.ac.starlink.table.ColumnData cdata)
Creates an activator from a ColumnData giving the URL string.
|
static Outcome |
decorateOutcomeWithUrl(Outcome outcome,
String url)
Ensures that an outcome contains a given URL in its message.
|
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.
|
protected abstract String |
getConfigMessage(uk.ac.starlink.table.ColumnData cdata)
Returns a config message given that a URL column has been supplied.
|
protected Box |
getQueryPanel()
Returns the component used for storing user interaction components.
|
TopcatModel |
getTopcatModel()
Returns the TopcatModel that this configurator is using.
|
protected ConfigState |
getUrlState()
Returns a partial config state, giving the current configuration
of the selected URL column.
|
protected String |
getWindowLabel(uk.ac.starlink.table.ColumnData cdata)
Returns a label which identifies a particular column in this
configurator's table.
|
protected void |
selectColumnByUCD(String ucd)
If a column exists with the named UCD, select it in the selector.
|
protected void |
selectColumnByUtype(String uType)
If a column exists with the named UType, select it in the selector.
|
void |
setLocationLabel(String label)
Resets the label for the Location field.
|
void |
setLocationTooltip(String tooltip)
Sets the tooltip text for the Location field.
|
protected void |
setUrlState(ConfigState state)
Restores the URL selection from a stored state object.
|
addActionListener, createDisplayField, createDisplayLabel, getActionForwarder, getPanel, removeActionListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getSafety, getState, setState
protected UrlColumnConfigurator(TopcatModelInfo tinfo, String urlWord, ColFlag[] urlFlags)
tinfo
- topcat model informationurlWord
- descriptive term for what's in the URL
(displayed as part of GUI)urlFlags
- list of flags whose columns are to be selected
as default values for the URL column selector;
earlier entries are preferred over later onesprotected abstract Activator createActivator(uk.ac.starlink.table.ColumnData cdata)
cdata
- URL column data, will not be nullprotected abstract String getConfigMessage(uk.ac.starlink.table.ColumnData cdata)
cdata
- URL column data, will not be nullprotected Box getQueryPanel()
public 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 TopcatModel getTopcatModel()
protected ConfigState getUrlState()
protected void setUrlState(ConfigState state)
state
- URL stateprotected void selectColumnByUCD(String ucd)
ucd
- UCD to matchprotected void selectColumnByUtype(String uType)
uType
- UType to matchprotected String getWindowLabel(uk.ac.starlink.table.ColumnData cdata)
cdata
- column datapublic void setLocationLabel(String label)
label
- new labelpublic void setLocationTooltip(String tooltip)
tooltip
- tooltip textpublic static Outcome decorateOutcomeWithUrl(Outcome outcome, String url)
outcome
- input outcomeurl
- context URLurl
text guaranteed to appear somewhere in its messageCopyright © 2003-2025 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.