public class TopcatWindowAction<W extends javax.swing.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.| Constructor and Description |
|---|
TopcatWindowAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String shortdesc,
java.lang.Class<? extends W> winClazz)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent evt)
Performs the action.
|
protected W |
createWindow()
Creates an instance of the window class used by this action.
|
void |
setParent(java.awt.Component parent)
Sets the parent component to use for initialising windows
created by this action.
|
getEventWindowaddPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabledpublic TopcatWindowAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String shortdesc,
java.lang.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(java.awt.event.ActionEvent evt)
createWindow()
and sets it visible. This may be overridden.actionPerformed in interface java.awt.event.ActionListenerpublic void setParent(java.awt.Component parent)
setParent in interface TopcatToolActionparent - parent componentCopyright ? 2003-2017 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.