public class TopcatWindowAction<W extends JFrame> extends BasicAction implements TopcatToolAction
Component argument;
such a constructor must therefore exist.
This parent component is just used to position the window,
it's permissible, though not encouraged, to just ignore that argument.changeSupport, enabledACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON| Constructor and Description |
|---|
TopcatWindowAction(String name,
Icon icon,
String shortdesc,
Class<? extends W> winClazz)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(ActionEvent evt)
Performs the action.
|
protected W |
createWindow()
Creates an instance of the window class used by this action.
|
void |
setParent(Component parent)
Sets the parent component to use for initialising windows
created by this action.
|
create, getEventWindowaddPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabledequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddPropertyChangeListener, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabledpublic TopcatWindowAction(String name, Icon icon, String shortdesc, Class<? extends W> winClazz)
name - action nameicon - action iconshortdesc - action short descriptionwinClazz - class of window to instantiate;
must have a constructor that takes a
java.awt.Component giving the window parentprotected W createWindow()
public void actionPerformed(ActionEvent evt)
createWindow()
and sets it visible. This may be overridden.actionPerformed in interface ActionListenerpublic void setParent(Component parent)
setParent in interface TopcatToolActionparent - parent componentCopyright © 2003-2025 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.