20 package net.sf.gridarta.gui.dialog.gameobjectattributes;
22 import javax.swing.JComboBox;
23 import javax.swing.text.Document;
24 import javax.swing.text.Style;
31 import org.jetbrains.annotations.NotNull;
39 private final JComboBox<?>
input;
62 final int attributeValueTmp =
input.getSelectedIndex();
65 final String archetypeAttributeName =
getRef().getArchetypeAttributeName();
66 return archetype.getAttributeInt(archetypeAttributeName) == attributeValue ?
"" : archetypeAttributeName +
" " + attributeValue;
70 public void appendSummary(@NotNull
final Document doc, @NotNull
final Style style) {
71 final Object selectedItem =
input.getSelectedItem();
72 if (selectedItem ==
null) {
76 final String value = selectedItem.toString().trim();
77 if (value.isEmpty() || value.startsWith(
"<")) {
81 addLine(doc, style,
"",
" = " + value);