|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.AbstractAction
com.jstatcom.component.CardPanelAction
public final class CardPanelAction
An action for the task of showing a "card" component in a
CardDisplayPanel.
The "card" component is only constructed when getComponent is
called the first time. This way the component gets only created when the
respective CardPanelAction is actually called. This may led to
faster program start.
CardDisplayPanel,
Serialized Form| Field Summary |
|---|
| Fields inherited from interface javax.swing.Action |
|---|
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON |
| Constructor Summary | |
|---|---|
CardPanelAction(java.lang.String className,
CardDisplayPanel parent,
boolean enabled,
java.lang.String name)
Creates an action object that constructs a component on demand according to the arguments. |
|
CardPanelAction(java.lang.String className,
CardDisplayPanel parent,
boolean enabled,
java.lang.String name,
javax.swing.Icon icon)
Creates an action object that constructs a component on demand according to the arguments. |
|
| Method Summary | |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent arg1)
Invoked when this action is called. |
javax.swing.JComponent |
getComponent()
Gets the component defined via className in the
constructor. |
| Methods inherited from class javax.swing.AbstractAction |
|---|
addPropertyChangeListener, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CardPanelAction(java.lang.String className,
CardDisplayPanel parent,
boolean enabled,
java.lang.String name)
className - the string with the fully qualified class name of the
component to construct when this action is calledparent - the parent panelenabled - true if this action should be enabledname - the name of this action
java.lang.IllegalArgumentException - if (className == null) or
if (parent == null)
public CardPanelAction(java.lang.String className,
CardDisplayPanel parent,
boolean enabled,
java.lang.String name,
javax.swing.Icon icon)
className - the string with the fully qualified class name of the
component to construct when this action is calledparent - the parent panelenabled - true if this action should be enabledname - the name of this actionicon - an icon to be displayed by components taking this
AbstractAction as argument
java.lang.IllegalArgumentException - if (className == null) or
if (parent == null)| Method Detail |
|---|
public void actionPerformed(java.awt.event.ActionEvent arg1)
showCard of the
parent CardDisplayPanel.
arg1 - argument is ignored and can be nullpublic javax.swing.JComponent getComponent()
className in the
constructor. If this method is called the first time, the component is
first created.
JPanel with a message is returned
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||