public class ControlWindow extends AuxWindow implements ListSelectionListener, ListDataListener, TableModelListener, TableColumnModelListener, TopcatListener
Note: there is a lot wrong with this class. It's been here for as long as topcat has (i.e. since before I knew better), and it does far too much, often in the wrong way. It would be nice to do something about it one day, but in the meantime, don't assume that there's a good reason for all the implementation details that you see here.
JFrame.AccessibleJFrame
Frame.AccessibleAWTFrame
Window.AccessibleAWTWindow, Window.Type
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
static String |
TOPCAT_TOOLS_PROP
System property giving a list of custom actions to appear in toolbar.
|
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Modifier and Type | Method and Description |
---|---|
boolean |
acceptResourceIdList(String[] ids,
String msg,
Class<? extends uk.ac.starlink.vo.DalLoader> dalLoaderClass,
Class<? extends DalMultiWindow> dalMultiWindowClass)
Load received VO resource identifiers into appropriate windows.
|
boolean |
acceptSkyPosition(double raDegrees,
double decDegrees)
Takes a sky position acquired from somewhere and does something with it.
|
void |
addLoadingToken(LoadingToken token)
Adds a LoadingToken to the load list.
|
TopcatModel |
addTable(uk.ac.starlink.table.StarTable table,
String location,
boolean select)
Adds a table to this windows list.
|
void |
columnAdded(TableColumnModelEvent evt) |
void |
columnMarginChanged(ChangeEvent evt) |
void |
columnMoved(TableColumnModelEvent evt) |
void |
columnRemoved(TableColumnModelEvent evt) |
void |
columnSelectionChanged(ListSelectionEvent evt) |
void |
contentsChanged(ListDataEvent evt) |
uk.ac.starlink.table.StarTableFactory |
createMonitorFactory(LoadingToken token)
Returns a new StarTableFactory which will update the given
LoadingToken as rows are read into row stores provided by its
storage policy.
|
boolean |
exit(boolean confirm)
Shuts down TOPCAT.
|
Action |
getAuthResetAction()
Returns an action that will reset all authentication contexts.
|
CdsUploadMatchWindow |
getCdsUploadMatchWindow()
Returns a dialog used for an upload match.
|
TopcatCommunicator |
getCommunicator()
Returns the object which acts as this window's server
for interop requests.
|
ConcatWindow |
getConcatWindow()
Returns a dialog used for doing table concatenation.
|
ConeMultiWindow |
getConeMultiWindow()
Returns a dialog used for a multiple cone search join.
|
TopcatModel |
getCurrentModel()
Returns the TopcatModel corresponding to the currently selected table.
|
cds.tools.ExtApp |
getExtApp()
Returns a CDS-style ExtApp object which can be used for control
of this control window instance.
|
static ControlWindow |
getInstance()
Returns the sole instance of this window, made visible on initialisation.
|
static ControlWindow |
getInstance(boolean initialiseVisible)
Returns the sole instance of this window, optionally made visible
on initialisation.
|
LoadWindow |
getLoadWindow()
Returns a dialog used for loading new tables.
|
uk.ac.starlink.table.RowRunner |
getRowRunner()
Returns the RowRunner to be used for multithreaded table processing.
|
SaveQueryWindow |
getSaver()
Returns a dialog used for saving tables.
|
SiaMultiWindow |
getSiaMultiWindow()
Returns a dialog used for a multiple SIA join.
|
SsaMultiWindow |
getSsaMultiWindow()
Returns a dialog used for a multiple SSA join.
|
uk.ac.starlink.table.StarTableFactory |
getTableFactory()
Returns the table factory used by this window.
|
uk.ac.starlink.table.StarTableOutput |
getTableOutput()
Returns the table output manager used by this window.
|
JList<TopcatModel> |
getTablesList()
Returns the JList displaying tables available in the application.
|
ListModel<TopcatModel> |
getTablesListModel()
Returns the list model which keeps track of which tables are available
to the application.
|
void |
intervalAdded(ListDataEvent evt) |
void |
intervalRemoved(ListDataEvent evt) |
boolean |
loadDialogMatches(uk.ac.starlink.table.gui.TableLoadDialog tld,
Class<?> tldClass)
Indicates whether the given load dialogue is of the type indicated
by the given class.
|
void |
modelChanged(TopcatEvent evt)
Invoked when the model has changed in some way.
|
void |
moveCurrent(boolean up)
Moves the current table one item up or down in the tables list.
|
boolean |
multiWindowMatches(DalMultiWindow mw,
Class<? extends DalMultiWindow> mwClass)
Indicates whether the given multi window is of the type indicated
by the given class.
|
void |
removeLoadingToken(LoadingToken token)
Removes a LoadingToken from the load list.
|
void |
removeTable(TopcatModel model)
Removes an entry from the table list.
|
void |
runLoading(uk.ac.starlink.table.gui.TableLoader loader,
uk.ac.starlink.table.gui.TableLoadClient loadClient,
Icon icon)
Passes tables from a loader to a load client, presenting progress
information and cancellation control as appropriate in the GUI.
|
void |
setTableFactory(uk.ac.starlink.table.StarTableFactory tabfact)
Sets the table factory used by this window.
|
void |
setViewsVisible(TopcatModel tcModel,
boolean visible)
Reveals or hides any existing view windows for a given table.
|
void |
tableChanged(TableModelEvent evt) |
void |
updateControls()
Updates some window state.
|
void |
updateLoadingToken(LoadingToken token)
Updates the state of a LoadingToken.
|
void |
valueChanged(ListSelectionEvent evt) |
addHelp, beep, confirm, createImportTableAction, createSaveTableAction, getBodyPanel, getControlPanel, getHelpMenu, getIconImage, getMainArea, getSponsorLogos, getToolBar, getWindowMenu, makeTitledBorder, makeVisible, placeProgressBar, positionAfter, recursiveSetEnabled, setBusy, setCloseIsExit, setMainHeading, setVisible
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
addNotify, getCursorType, getExtendedState, getFrames, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecorated
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, show, toBack, toFront
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getFont, postEvent
public static String TOPCAT_TOOLS_PROP
public static ControlWindow getInstance()
public static ControlWindow getInstance(boolean initialiseVisible)
initialiseVisible
- if this call results in lazy creation of
a window instance, set it visiblepublic cds.tools.ExtApp getExtApp()
public TopcatCommunicator getCommunicator()
public uk.ac.starlink.table.RowRunner getRowRunner()
public Action getAuthResetAction()
public TopcatModel addTable(uk.ac.starlink.table.StarTable table, String location, boolean select)
table
- the table to addlocation
- location string indicating the provenance of
table
- preferably a URL or filename or somethingselect
- true iff the newly-added table should become the
currently selected tabletable
public void removeTable(TopcatModel model)
model
- the table entry to removepublic void moveCurrent(boolean up)
up
- true for move up (to lower index),
false for move down (to higher index)public void runLoading(uk.ac.starlink.table.gui.TableLoader loader, uk.ac.starlink.table.gui.TableLoadClient loadClient, Icon icon)
loader
- table sourceloadClient
- table destination
(usually a TopcatLoadClient
)icon
- optional icon to accompany the progress GUIpublic void addLoadingToken(LoadingToken token)
token
- token to addpublic void removeLoadingToken(LoadingToken token)
token
- token to removepublic void updateLoadingToken(LoadingToken token)
token
- token to updatepublic uk.ac.starlink.table.StarTableFactory createMonitorFactory(LoadingToken token)
token
- token to updatepublic TopcatModel getCurrentModel()
public ListModel<TopcatModel> getTablesListModel()
TopcatModel
objectspublic JList<TopcatModel> getTablesList()
TopcatModel
objectspublic LoadWindow getLoadWindow()
public SaveQueryWindow getSaver()
public ConcatWindow getConcatWindow()
public ConeMultiWindow getConeMultiWindow()
public SiaMultiWindow getSiaMultiWindow()
public SsaMultiWindow getSsaMultiWindow()
public CdsUploadMatchWindow getCdsUploadMatchWindow()
public uk.ac.starlink.table.StarTableFactory getTableFactory()
public uk.ac.starlink.table.StarTableOutput getTableOutput()
public void setTableFactory(uk.ac.starlink.table.StarTableFactory tabfact)
tabfact
- table factorypublic boolean acceptSkyPosition(double raDegrees, double decDegrees)
raDegrees
- right ascension in degreesdecDegrees
- declination in degreespublic boolean acceptResourceIdList(String[] ids, String msg, Class<? extends uk.ac.starlink.vo.DalLoader> dalLoaderClass, Class<? extends DalMultiWindow> dalMultiWindowClass)
ids
- array of candidate ivo:-type resource identifiers to loadmsg
- text to explain to the user what's being loadeddalLoaderClass
- DalLoader subclass for
dialogues which may be affected by the loaded IDsdalMultiWindowClass
- DalMultiWindow subclass for
dialogues which may be affected by the loaded IDspublic boolean loadDialogMatches(uk.ac.starlink.table.gui.TableLoadDialog tld, Class<?> tldClass)
tld
- load dialoguetldClass
- load dialogue typepublic boolean multiWindowMatches(DalMultiWindow mw, Class<? extends DalMultiWindow> mwClass)
public void setViewsVisible(TopcatModel tcModel, boolean visible)
tcModel
- table to affectvisible
- true to reveal, false to hidepublic boolean exit(boolean confirm)
System.exit(int)
itself,
or it may just attempt to get rid of all the windows associated
with the TOPCAT application. In the latter case, the JVM should
survive.confirm
- whether to seek confirmation from the userfalse
will be returned. If the exit
did happen, then either true
will be returned
or (standalone case) there will be no return.public void updateControls()
public void valueChanged(ListSelectionEvent evt)
valueChanged
in interface ListSelectionListener
public void tableChanged(TableModelEvent evt)
tableChanged
in interface TableModelListener
public void modelChanged(TopcatEvent evt)
TopcatListener
modelChanged
in interface TopcatListener
evt
- event descriptionpublic void columnAdded(TableColumnModelEvent evt)
columnAdded
in interface TableColumnModelListener
public void columnRemoved(TableColumnModelEvent evt)
columnRemoved
in interface TableColumnModelListener
public void columnMarginChanged(ChangeEvent evt)
columnMarginChanged
in interface TableColumnModelListener
public void columnMoved(TableColumnModelEvent evt)
columnMoved
in interface TableColumnModelListener
public void columnSelectionChanged(ListSelectionEvent evt)
columnSelectionChanged
in interface TableColumnModelListener
public void contentsChanged(ListDataEvent evt)
contentsChanged
in interface ListDataListener
public void intervalAdded(ListDataEvent evt)
intervalAdded
in interface ListDataListener
public void intervalRemoved(ListDataEvent evt)
intervalRemoved
in interface ListDataListener
Copyright © 2003-2025 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.