java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action, TopcatToolActionpublic 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 | 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 | 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.
|
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabledaccept, addPropertyChangeListener, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabledgetEventWindowpublic 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-2018 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.