 |
Gridarta Editor
|
Go to the documentation of this file.
20 package net.sf.gridarta.gui.dialog.gameobjectattributes;
22 import javax.swing.text.Document;
23 import javax.swing.text.JTextComponent;
24 import javax.swing.text.Style;
30 import org.jetbrains.annotations.NotNull;
40 private final JTextComponent
input;
55 final String
inline =
input.getText().trim();
56 final String archetypeAttributeName =
getRef().getArchetypeAttributeName();
57 return inline.equals(archetype.getAttributeString(archetypeAttributeName)) ?
"" : archetypeAttributeName +
" " +
inline;
61 public void appendSummary(@NotNull
final Document doc, @NotNull
final Style style) {
62 final String value =
input.getText();
63 if (value ==
null || value.isEmpty()) {
67 addLine(doc, style,
"",
" = " + value);
final T ref
Reference to the attribute data.
Defines types of GameObjects with corresponding attributes.
DialogAttributeString(@NotNull final ArchetypeAttributeString ref, @NotNull final JTextComponent input)
Creates a new instance.
T getRef()
Returns the attribute data.
Base package of all Gridarta classes.
void addLine( @NotNull final Document doc, @NotNull final AttributeSet style, @NotNull final String prefix, @NotNull final String postfix)
Appends a line to a Document.
Reflects a game object (object on a map).
A single Attribute, combining an ArchetypeAttribute with its input component(s).
GameObjects are the objects based on Archetypes found on maps.
Interface for MapArchObjects.
An ArchetypeAttribute for selecting string values.
void appendSummary(@NotNull final Document doc, @NotNull final Style style)
Contains the data of one Gridarta Object-Type.
String getObjectText(@NotNull final G gameObject, @NotNull final Archetype< G, A, R > archetype, @NotNull final String @NotNull[] newMsg, @NotNull final ArchetypeType archetypeType)
final JTextComponent input
The input ui component for editing the value.