20 package net.sf.gridarta.gui.dialog.gameobjectattributes;
22 import java.awt.Component;
23 import javax.swing.text.Document;
24 import javax.swing.text.JTextComponent;
25 import javax.swing.text.Style;
32 import org.apache.log4j.Category;
33 import org.apache.log4j.Logger;
34 import org.jetbrains.annotations.NotNull;
35 import org.jetbrains.annotations.Nullable;
53 private final JTextComponent
input;
80 final String archetypeAttributeName =
getRef().getArchetypeAttributeName();
81 String oldValue = archetype.getAttributeString(archetypeAttributeName);
82 if (oldValue.isEmpty()) {
86 return oldValue.equals(encodedValue) ?
"" : archetypeAttributeName +
" " + encodedValue;
90 public void appendSummary(@NotNull
final Document doc, @NotNull
final Style style) {
91 final String text =
input.getText();
96 final String tmp = text.trim();
97 if (tmp.isEmpty() || tmp.startsWith(
"<")) {
101 addLine(doc, style,
"",
" = " + tmp);
128 LOG.warn(
"null bitmask");