|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.table.gui.AbstractTableLoadDialog
uk.ac.starlink.table.gui.BasicTableLoadDialog
Skeleton implementation of a TableLoadDialog
which can
load a single table.
Concrete subclasses need to populate this panel with components forming
the specific part of the query dialogue (presumably text fields,
combo boxes and so on) and then implement the
getTableSupplier()
method which returns an object capable of
trying to load a table based on the current state of the component.
All the issues about threading are taken care of by the implementation
of this class.
Nested Class Summary | |
static interface |
BasicTableLoadDialog.TableSupplier
Defines an object which can attempt to load a particular table. |
Constructor Summary | |
BasicTableLoadDialog(String name,
String description)
Constructor. |
Method Summary | |
protected void |
cancelLoad()
Should interrupt any current load action, so that any pending load which is not complete should avoid passing tables to the consumer in the future, and preferably any work in progress should be stopped. |
protected abstract BasicTableLoadDialog.TableSupplier |
getTableSupplier()
Concrete subclasses should implement this method to supply a TableSupplier object which can attempt to load a table based on the current state (as filled in by the user) of this component. |
protected void |
submitLoad(JDialog dialog,
StarTableFactory tfact,
String format,
TableConsumer consumer)
Should feed a table or tables to the given consuemer based on the current state of this component. |
Methods inherited from class uk.ac.starlink.table.gui.AbstractTableLoadDialog |
asIOException, createDialog, createQueryPanel, getCancelAction, getDescription, getIcon, getName, getOkAction, getProgessBar, getQueryPanel, isActive, setBusy, setFormatModel, setIcon, setIconUrl, showLoadDialog |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface uk.ac.starlink.table.gui.TableLoadDialog |
isAvailable |
Constructor Detail |
public BasicTableLoadDialog(String name, String description)
name
- dialogue name (typically used as text of a button)description
- dialogue description (typeically used as
tooltip text)Method Detail |
protected abstract BasicTableLoadDialog.TableSupplier getTableSupplier() throws RuntimeException
RuntimeException
- if validation failsprotected void submitLoad(JDialog dialog, StarTableFactory tfact, String format, TableConsumer consumer)
AbstractTableLoadDialog
submitLoad
in class AbstractTableLoadDialog
dialog
- dialogue currently containing this componenttfact
- table factory to use for generating tablesformat
- selected table format;
it may or may not be appropriate to ignore this hintconsumer
- destination for loaded table or tablesprotected void cancelLoad()
AbstractTableLoadDialog
cancelLoad
in class AbstractTableLoadDialog
|
Copyright © 2004 CLRC: Central Laboratory of the Research Councils. All rights reserved. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |