20 package net.sf.gridarta.gui.dialog.gameobjectattributes;
22 import javax.swing.AbstractButton;
23 import javax.swing.text.Document;
24 import javax.swing.text.Style;
30 import org.jetbrains.annotations.NotNull;
40 private final AbstractButton
input;
55 final String valString;
56 if (input.isSelected()) {
57 valString =
getRef().getTrueValue();
59 valString =
getRef().getFalseValue();
61 final String archetypeAttributeName =
getRef().getArchetypeAttributeName();
62 if ((valString.equals(
"0") && archetype.hasAttribute(archetypeAttributeName)) || (!valString.equals(
"0") && !archetype.getAttributeString(archetypeAttributeName).equals(valString))) {
63 return archetypeAttributeName +
" " + valString;
70 public void appendSummary(@NotNull
final Document doc, @NotNull
final Style style) {
71 if (!input.isSelected()) {
final AbstractButton input
The input ui component for editing the value.
Contains the data of one Gridarta Object-Type.
An ArchetypeAttribute for selecting boolean values having specific "true" and "false" values...
T getRef()
Returns the attribute data.
Base package of all Gridarta classes.
Reflects a game object (object on a map).
GameObjects are the objects based on Archetypes found on maps.
final T ref
Reference to the attribute data.
A single Attribute, combining an ArchetypeAttribute with its input component(s).
String getObjectText(@NotNull final G gameObject, @NotNull final Archetype< G, A, R > archetype, @NotNull final String[] newMsg, @NotNull final ArchetypeType archetypeType)
DialogAttributeBoolSpec(@NotNull final ArchetypeAttributeBoolSpec ref, @NotNull final AbstractButton input)
Creates a new instance.
void addLine( @NotNull final Document doc, @NotNull final AttributeSet style, @NotNull final String prefix, @NotNull final String postfix)
Appends a line to a Document.
void appendSummary(@NotNull final Document doc, @NotNull final Style style)
Defines types of GameObjects with corresponding attributes.
Interface for MapArchObjects.