 |
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;
103 super.actionPerformed(e);
113 if (animationName.isEmpty() || animationName.equals(
"NONE")) {
117 if (animationObject ==
null) {
135 super.setEnabled(newValue);
136 icon.setEnabled(newValue);
final FaceObjectProviders faceObjectProviders
The FaceObjectProviders for looking up faces.
Base package of all Gridarta classes.
AnimationObjects is a container for AnimationObjects.
Action for choosing a face or animation.
void actionPerformed(@NotNull final ActionEvent e)
String getFaceName()
Returns the current face name.
E get(@NotNull String objectName)
Gets a AbstractNamedObject.
final AnimationObjects animationObjects
The AnimationObjects to select from.
final AbstractButton icon
The button showing the icon.
Provider for faces of GameObjects and Archetypes.
void addFaceObjectProvidersListener(@NotNull final FaceObjectProvidersListener listener)
Adds a FaceObjectProvidersListener to be notified about changes.
void setEnabled(final boolean newValue)
final JTextComponent textComponent
The JTextComponent that holds the current face/animation name.
AnimTreeChooseAction(@NotNull final String text, @NotNull final JTextComponent textComponent, @NotNull final AbstractButton icon, @NotNull final AnimationObjects animationObjects, @NotNull final FaceObjectProviders faceObjectProviders, @NotNull final ImageIcon noFaceSquareIcon, @NotNull final ImageIcon unknownSquareIcon)
Creates a new instance.
static final long serialVersionUID
The serial version UID.
Classes for handling data that is organized in a tree.
final ImageIcon noFaceSquareIcon
The ImageIcon for no animations.
final void updateIconLabel()
Updates the icon of icon to reflect the current animation name.
AnimTreeChooseAction clone()
Interface for listeners interested in FaceObjectProviders related events.
The face is the appearance of an object.
Gridarta can handle frame information of animations and allow the selection of an animation using a t...
final ImageIcon unknownSquareIcon
The ImageIcon for undefined animations.
ImageIcon getDisplayIcon(@NotNull final NamedObject namedObject)
Returns the display icon for a NamedObject.
A TreeChooseAction that updates an animation label.