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 archetypeAttributeName =
getRef().getArchetypeAttributeName();
56 if (input.isSelected() != (archetype.getAttributeInt(archetypeAttributeName) == 1)) {
57 return archetypeAttributeName +
" " + (input.isSelected() ? 1 : 0);
64 public void appendSummary(@NotNull
final Document doc, @NotNull
final Style style) {
65 if (!input.isSelected()) {
Contains the data of one Gridarta Object-Type.
T getRef()
Returns the attribute data.
void appendSummary(@NotNull final Document doc, @NotNull final Style style)
String getObjectText(@NotNull final G gameObject, @NotNull final Archetype< G, A, R > archetype, @NotNull final String[] newMsg, @NotNull final ArchetypeType archetypeType)
Base package of all Gridarta classes.
final AbstractButton input
The input ui component for editing the value.
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.
DialogAttributeBool(@NotNull final ArchetypeAttributeBool ref, @NotNull final AbstractButton input)
Create a new instance.
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.
An ArchetypeAttribute for selecting boolean values.
Defines types of GameObjects with corresponding attributes.
Interface for MapArchObjects.