public interface TableLoadDialog
Modifier and Type | Method and Description |
---|---|
void |
configure(StarTableFactory tfact,
javax.swing.Action submitAct)
Provides some configuration which must be performed before use.
|
TableLoader |
createTableLoader()
Returns a new object which specifies how table loading is to
be performed.
|
java.lang.String |
getDescription()
Returns a short description of this dialogue.
|
javax.swing.Icon |
getIcon()
Returns an icon associated with this dialogue.
|
javax.swing.JMenu[] |
getMenus()
Returns an array of menus which may be presented in the window
alongside the query component.
|
java.lang.String |
getName()
Returns the name of this dialogue.
|
java.awt.Component |
getQueryComponent()
Returns the GUI component which allows the user to select how tables
are to be loaded.
|
javax.swing.Action |
getSubmitAction()
Returns the action set by
configure(uk.ac.starlink.table.StarTableFactory, javax.swing.Action) . |
javax.swing.Action[] |
getToolbarActions()
Returns an array of actions suitable for presentation as toolbar
buttons alongside the query component.
|
boolean |
isAvailable()
Indicates whether this dialogue may be used.
|
java.lang.String getName()
Action.NAME
).java.lang.String getDescription()
Action.SHORT_DESCRIPTION
).javax.swing.Icon getIcon()
java.awt.Component getQueryComponent()
javax.swing.JMenu[] getMenus()
javax.swing.Action[] getToolbarActions()
boolean isAvailable()
void configure(StarTableFactory tfact, javax.swing.Action submitAct)
getQueryComponent()
is called.
The tfact
argument provides a table factory which
resembles the one to be used for generating tables.
Although this factory should not in general be used or retained,
since the one presented later to the TableLoader should be used
instead, it can be interrogated for known table formats etc.
The submitAct
argument sets the action which
when invoked will cause createTableLoader()
to be called.
Its setEnabled method can be called to reflect readiness,
and it can be added as a listener to dialogue-specific events
which indicate that a selection has been made.
tfact
- representative table factorysubmitAct
- action for load submissionjavax.swing.Action getSubmitAction()
configure(uk.ac.starlink.table.StarTableFactory, javax.swing.Action)
.TableLoader createTableLoader()
If the dialogue is not in a suitable state, either return null, or, if you want to provide more detailed information about what's wrong, throw a RuntimeException with an informative message.