 |
Gridarta Editor
|
Go to the documentation of this file.
20 package net.sf.gridarta.gui.utils;
22 import java.awt.event.ActionEvent;
23 import javax.swing.AbstractButton;
24 import javax.swing.Icon;
25 import javax.swing.ImageIcon;
26 import javax.swing.text.JTextComponent;
31 import org.jetbrains.annotations.NotNull;
48 private final AbstractButton
icon;
94 super.actionPerformed(e);
104 if (faceName.isEmpty() || faceName.equals(
"NONE")) {
121 super.setEnabled(newValue);
122 icon.setEnabled(newValue);
Base package of all Gridarta classes.
A TreeChooseAction that updates a face label.
Action for choosing a face or animation.
String getFaceName()
Returns the current face name.
Provider for faces of GameObjects and Archetypes.
void addFaceObjectProvidersListener(@NotNull final FaceObjectProvidersListener listener)
Adds a FaceObjectProvidersListener to be notified about changes.
final ImageIcon noFaceSquareIcon
The ImageIcon for no animations.
final JTextComponent textComponent
The JTextComponent that holds the current face/animation name.
Classes for handling data that is organized in a tree.
void actionPerformed(@NotNull final ActionEvent e)
final NamedObjects<? extends NamedObject > namedObjects
The NamedObjects providing the face/animation names tree.
Interface for listeners interested in FaceObjectProviders related events.
The face is the appearance of an object.
final ImageIcon unknownSquareIcon
The ImageIcon for undefined animations.
void setEnabled(final boolean newValue)
final FaceObjectProviders faceObjectProviders
The FaceObjectProviders for looking up faces.
final void updateIconLabel()
Updates the icon of icon to reflect the current face name.
final AbstractButton icon
The button showing the icon.
FaceTreeChooseAction(@NotNull final String text, @NotNull final JTextComponent textComponent, @NotNull final AbstractButton icon, @NotNull final NamedObjects<? extends NamedObject > namedObjects, @NotNull final FaceObjectProviders faceObjectProviders, @NotNull final ImageIcon noFaceSquareIcon, @NotNull final ImageIcon unknownSquareIcon)
Creates a new instance.
static final long serialVersionUID
The serial version UID.
This class manages NamedObjects, managing their tree as well as providing a method for showing a dial...
FaceTreeChooseAction clone()
ImageIcon getImageIconForFacename(@NotNull final String faceObjName)
Returns the ImageIcon for a given face object name.