20 package net.sf.gridarta.gui.utils;
22 import java.awt.event.ActionEvent;
23 import javax.swing.AbstractAction;
24 import javax.swing.text.JTextComponent;
29 import org.jetbrains.annotations.NotNull;
79 String initial = textComponent.getText();
81 if (selected != null) {
85 if (newValue != null) {
86 textComponent.setText(newValue);
96 return textComponent.getText();
103 return super.clone();
104 }
catch (
final CloneNotSupportedException ex) {
105 throw new AssertionError(ex);
final NamedObjects<? extends NamedObject > namedObjects
The NamedObjects providing the face/animation names tree.
The data package contains classes for handling data that is organized in a tree.
Graphical User Interface of Gridarta.
String getFaceName()
Returns the current face name.
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...
final JTextComponent textComponent
The JTextComponent that holds the current face/animation name.
Utility class for NamedObjects related functions.
Base package of all Gridarta classes.
static< E extends NamedObject > String showNodeChooserDialog(@NotNull final Component parentComponent, @NotNull final String initial, @NotNull final FaceObjectProviders faceObjectProviders, @NotNull final NamedObjects< E > namedObjects)
Show a dialog for choosing from the object tree.
E get(@NotNull String objectName)
Gets a AbstractNamedObject.
String getPath()
Get the path of this AbstractNamedObject.
Action for choosing a face or animation.
Provider for faces of GameObjects and Archetypes.
The face is the appearance of an object.
TreeChooseAction(@NotNull final String text, @NotNull final JTextComponent textComponent, @NotNull final NamedObjects<? extends NamedObject > namedObjects, @NotNull final FaceObjectProviders faceObjectProviders)
Create a TreeChooseAction.
final FaceObjectProviders faceObjectProviders
The FaceObjectProviders for looking up faces.
void actionPerformed(@NotNull final ActionEvent e)