20 package net.sf.gridarta.gui.dialog.gameobjectattributes;
22 import javax.swing.text.Document;
23 import javax.swing.text.Style;
30 import org.jetbrains.annotations.NotNull;
53 final String newString = input.
getText().trim();
54 final String archetypeAttributeName =
getRef().getArchetypeAttributeName();
55 if (!archetype.getAttributeString(archetypeAttributeName).equals(newString)) {
56 return archetypeAttributeName +
" " + newString;
63 public void appendSummary(@NotNull
final Document doc, @NotNull
final Style style) {
64 final String value = input.
getText();
65 if (value.isEmpty()) {
69 addLine(doc, style,
"",
" = " + value);
Graphical User Interface of Gridarta.
DialogAttributeScriptFile(@NotNull final ArchetypeAttributeScriptFile ref, @NotNull final TilePanel input)
Creates a new instance.
void appendSummary(@NotNull final Document doc, @NotNull final Style style)
A tile panel displays exactly one direction for map tiling.
Contains the data of one Gridarta Object-Type.
T getRef()
Returns the attribute data.
An ArchetypeAttribute for selecting script files.
Base package of all Gridarta classes.
Reflects a game object (object on a map).
String getText()
Returns the text.
GameObjects are the objects based on Archetypes found on maps.
final T ref
Reference to the attribute data.
Base classes for rendering maps.
A single Attribute, combining an ArchetypeAttribute with its input component(s).
void addLine( @NotNull final Document doc, @NotNull final AttributeSet style, @NotNull final String prefix, @NotNull final String postfix)
Appends a line to a Document.
final TilePanel input
The input ui component for editing the value.
String getObjectText(@NotNull final G gameObject, @NotNull final Archetype< G, A, R > archetype, @NotNull final String[] newMsg, @NotNull final ArchetypeType archetypeType)
Defines types of GameObjects with corresponding attributes.
Interface for MapArchObjects.