 |
Gridarta Editor
|
Go to the documentation of this file.
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 =
input.isSelected() ?
getRef().getTrueValue() :
getRef().getFalseValue();
56 final String archetypeAttributeName =
getRef().getArchetypeAttributeName();
57 if ((valString.equals(
"0") && archetype.hasAttribute(archetypeAttributeName)) || (!valString.equals(
"0") && !archetype.getAttributeString(archetypeAttributeName).equals(valString))) {
58 return archetypeAttributeName +
" " + valString;
65 public void appendSummary(@NotNull
final Document doc, @NotNull
final Style style) {
66 if (!
input.isSelected()) {
final T ref
Reference to the attribute data.
Defines types of GameObjects with corresponding attributes.
T getRef()
Returns the attribute data.
Base package of all Gridarta classes.
void appendSummary(@NotNull final Document doc, @NotNull final Style style)
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).
final AbstractButton input
The input ui component for editing the value.
A single Attribute, combining an ArchetypeAttribute with its input component(s).
GameObjects are the objects based on Archetypes found on maps.
An ArchetypeAttribute for selecting boolean values having specific "true" and "false" values.
Interface for MapArchObjects.
String getObjectText(@NotNull final G gameObject, @NotNull final Archetype< G, A, R > archetype, @NotNull final String @NotNull[] newMsg, @NotNull final ArchetypeType archetypeType)
Contains the data of one Gridarta Object-Type.
DialogAttributeBoolSpec(@NotNull final ArchetypeAttributeBoolSpec ref, @NotNull final AbstractButton input)
Creates a new instance.