Package net.sf.gridarta.gui.utils
Class FaceTreeChooseAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- net.sf.gridarta.gui.utils.TreeChooseAction
-
- net.sf.gridarta.gui.utils.FaceTreeChooseAction
-
- All Implemented Interfaces:
java.awt.event.ActionListener,java.io.Serializable,java.lang.Cloneable,java.util.EventListener,javax.swing.Action
public class FaceTreeChooseAction extends TreeChooseAction
ATreeChooseActionthat updates a face label.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FaceTreeChooseAction(@NotNull java.lang.String text, @NotNull javax.swing.text.JTextComponent textComponent, @NotNull javax.swing.AbstractButton icon, @NotNull NamedObjects<? extends NamedObject> namedObjects, @NotNull FaceObjectProviders faceObjectProviders, @NotNull javax.swing.ImageIcon noFaceSquareIcon, @NotNull javax.swing.ImageIcon unknownSquareIcon)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactionPerformed(@NotNull java.awt.event.ActionEvent e)protected @NotNull FaceTreeChooseActionclone()voidsetEnabled(boolean newValue)voidupdateIconLabel()Updates the icon oficonto reflect the current face name.-
Methods inherited from class net.sf.gridarta.gui.utils.TreeChooseAction
getFaceName
-
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener
-
-
-
-
Constructor Detail
-
FaceTreeChooseAction
public FaceTreeChooseAction(@NotNull @NotNull java.lang.String text, @NotNull @NotNull javax.swing.text.JTextComponent textComponent, @NotNull @NotNull javax.swing.AbstractButton icon, @NotNull @NotNull NamedObjects<? extends NamedObject> namedObjects, @NotNull @NotNull FaceObjectProviders faceObjectProviders, @NotNull @NotNull javax.swing.ImageIcon noFaceSquareIcon, @NotNull @NotNull javax.swing.ImageIcon unknownSquareIcon)Creates a new instance.- Parameters:
text- the text for the buttontextComponent- the text component that holds the current face/animation nameicon- the label showing the iconnamedObjects- the named objects providing the face names treefaceObjectProviders- the face provider for looking up iconsnoFaceSquareIcon- the image icon for no animationsunknownSquareIcon- the image icon for undefined animations
-
-
Method Detail
-
actionPerformed
public void actionPerformed(@NotNull @NotNull java.awt.event.ActionEvent e)- Specified by:
actionPerformedin interfacejava.awt.event.ActionListener- Overrides:
actionPerformedin classTreeChooseAction
-
updateIconLabel
public final void updateIconLabel()
Updates the icon oficonto reflect the current face name.
-
clone
@NotNull protected @NotNull FaceTreeChooseAction clone()
- Overrides:
clonein classTreeChooseAction
-
setEnabled
public void setEnabled(boolean newValue)
- Specified by:
setEnabledin interfacejavax.swing.Action- Overrides:
setEnabledin classjavax.swing.AbstractAction
-
-