20 package net.sf.gridarta.gui.dialog.gameobjectattributes;
22 import java.awt.Color;
23 import java.awt.Component;
24 import java.awt.Container;
25 import java.awt.GridBagConstraints;
26 import java.awt.GridBagLayout;
27 import java.awt.Insets;
28 import java.awt.event.FocusListener;
30 import java.text.DecimalFormat;
31 import java.text.NumberFormat;
32 import java.util.ArrayList;
33 import java.util.Collection;
34 import java.util.Collections;
35 import java.util.regex.Pattern;
36 import javax.swing.BorderFactory;
37 import javax.swing.Box;
38 import javax.swing.DefaultComboBoxModel;
39 import javax.swing.ImageIcon;
40 import javax.swing.JButton;
41 import javax.swing.JCheckBox;
42 import javax.swing.JComboBox;
43 import javax.swing.JComponent;
44 import javax.swing.JFormattedTextField;
45 import javax.swing.JLabel;
46 import javax.swing.JPanel;
47 import javax.swing.JScrollPane;
48 import javax.swing.JTabbedPane;
49 import javax.swing.JTextArea;
50 import javax.swing.JTextField;
51 import javax.swing.filechooser.FileFilter;
52 import javax.swing.text.DefaultFormatterFactory;
53 import javax.swing.text.NumberFormatter;
104 import org.jetbrains.annotations.NotNull;
105 import org.jetbrains.annotations.Nullable;
124 private static final Color
INT_COLOR =
new Color(74, 70, 156);
254 private final Collection<DialogAttribute<G, A, R, ?>>
dialogAttributes =
new ArrayList<>();
274 private void adjustTooltip(@Nullable
final JComponent component, @NotNull
final ArchetypeAttribute attribute) {
275 @NotNull
final String desc = attribute.getDescription();
276 if (component != null && !desc.isEmpty()) {
277 final StringBuilder sb =
new StringBuilder(
"<html>");
278 for (
final String paragraph : PARAGRAPH_DELIMITER.split(desc)) {
279 sb.append(
"<p>").append(paragraph).append(
"</p>");
281 component.setToolTipText(sb.toString());
287 final String attributeName = archetypeAttribute.getArchetypeAttributeName();
290 adjustTooltip(input, archetypeAttribute);
291 final JLabel cLabel =
new JLabel(archetypeAttribute.getAttributeName() +
": ");
292 adjustTooltip(cLabel, archetypeAttribute);
298 final JTextArea input =
new JTextArea();
301 if (bitmask != null) {
303 final JButton label =
new JButton(
new MaskChangeAL<>(archetypeAttribute.getAttributeName() +
":", tmpAttribute));
304 adjustTooltip(label, archetypeAttribute);
305 input.setBackground(parent.getBackground());
306 input.setEditable(
false);
307 input.setBorder(BorderFactory.createLineBorder(Color.gray));
308 input.setText(bitmask.getText(tmpAttribute.
getValue()));
309 adjustTooltip(input, archetypeAttribute);
313 final JLabel row =
new JLabel(
"Error: Undefined Bitmask");
320 final JCheckBox input =
new JCheckBox(archetypeAttribute.getAttributeName(), attributes.
getAttributeInt(archetypeAttribute.getArchetypeAttributeName()) == 1);
321 adjustTooltip(input, archetypeAttribute);
327 final String attributeString = attributes.
getAttributeString(archetypeAttribute.getArchetypeAttributeName());
328 final boolean defaultValue;
329 if (archetypeAttribute.getTrueValue().equals(
"0")) {
330 defaultValue = attributeString.isEmpty() || attributeString.equals(
"0");
332 defaultValue = attributeString.equals(archetypeAttribute.getTrueValue());
334 final JCheckBox input =
new JCheckBox(archetypeAttribute.getAttributeName(), defaultValue);
335 adjustTooltip(input, archetypeAttribute);
341 final String attributeName = archetypeAttribute.getArchetypeAttributeName();
343 final FaceComponent input =
new FaceComponent(defaultText, faceObjects, faceObjectProviders, noFaceSquareIcon, unknownSquareIcon, archetypeAttribute.getDescription());
344 adjustTooltip(input, archetypeAttribute);
345 final JLabel label =
new JLabel(archetypeAttribute.getAttributeName() +
":");
346 adjustTooltip(label, archetypeAttribute);
352 throw new AssertionError();
357 final JLabel label =
new JLabel(archetypeAttribute.getAttributeName() +
": ");
358 adjustTooltip(label, archetypeAttribute);
359 label.setForeground(FLOAT_COLOR);
361 final DecimalFormat format =
new DecimalFormat(
"#0.0#");
362 format.setMaximumFractionDigits(10);
363 format.setGroupingUsed(
false);
364 final NumberFormatter formatter =
new NumberFormatter(format);
365 formatter.setValueClass(Double.class);
366 final DefaultFormatterFactory factory =
new DefaultFormatterFactory(formatter);
367 final Number value = attributes.
getAttributeDouble(archetypeAttribute.getArchetypeAttributeName());
368 final JFormattedTextField input =
new JFormattedTextField(factory, value);
369 input.setColumns(fieldLength);
370 adjustTooltip(input, archetypeAttribute);
376 final JLabel label =
new JLabel(archetypeAttribute.getAttributeName() +
": ");
377 adjustTooltip(label, archetypeAttribute);
378 label.setForeground(INT_COLOR);
380 final NumberFormat format = NumberFormat.getIntegerInstance();
381 format.setGroupingUsed(
false);
382 final NumberFormatter formatter =
new NumberFormatter(format);
383 final DefaultFormatterFactory factory =
new DefaultFormatterFactory(formatter);
384 final Number value = attributes.
getAttributeInt(archetypeAttribute.getArchetypeAttributeName());
385 final JFormattedTextField input =
new JFormattedTextField(factory, value);
386 input.setColumns(fieldLength);
387 adjustTooltip(input, archetypeAttribute);
393 final JLabel label =
new JLabel(archetypeAttribute.getAttributeName() +
": ");
394 adjustTooltip(label, archetypeAttribute);
395 label.setForeground(INT_COLOR);
396 final JComboBox<?> input = buildInvSpellBox(gameObjectSpells, attributes, archetypeAttribute.isOptionalSpell(), archetypeAttribute.getAttributeName());
397 adjustTooltip(input, archetypeAttribute);
403 final JLabel label =
new JLabel(archetypeAttribute.getAttributeName() +
": ");
404 adjustTooltip(label, archetypeAttribute);
405 label.setForeground(INT_COLOR);
406 final JComponent component;
407 final JComboBox<?> input;
410 input =
buildArrayBox(list, attributes.
getAttributeInt(archetypeAttribute.getArchetypeAttributeName()), archetypeAttribute.getAttributeName());
414 input =
new JComboBox<>();
415 component =
new JLabel(
"Error: Undefined List");
417 adjustTooltip(input, archetypeAttribute);
423 final JLabel label =
new JLabel(archetypeAttribute.getAttributeName() +
": ");
424 adjustTooltip(label, archetypeAttribute);
425 label.setForeground(INT_COLOR);
426 final int value = attributes.
getAttributeInt(archetypeAttribute.getArchetypeAttributeName());
428 final JComponent component1;
429 @Nullable
final JComboBox<?> input1;
432 input1 =
buildArrayBox(list1, value & 0x0F, archetypeAttribute.getAttributeName());
436 input1 =
new JComboBox<>();
437 component1 =
new JLabel(
"Error: Undefined List");
440 final JComponent component2;
441 @Nullable
final JComboBox<?> input2;
444 input2 =
buildArrayBox(list2, value >> 4, archetypeAttribute.getAttributeName());
448 input2 =
new JComboBox<>();
449 component2 =
new JLabel(
"Error: Undefined List");
452 adjustTooltip(input1, archetypeAttribute);
453 adjustTooltip(input2, archetypeAttribute);
454 final JComponent component =
new JPanel(
new GridBagLayout());
455 final GridBagConstraints gbc =
new GridBagConstraints();
457 gbc.fill = GridBagConstraints.HORIZONTAL;
458 component.add(component1, gbc);
459 component.add(component2, gbc);
460 adjustTooltip(component, archetypeAttribute);
466 final JLabel label =
new JLabel(archetypeAttribute.getAttributeName() +
": ");
467 adjustTooltip(label, archetypeAttribute);
468 label.setForeground(INT_COLOR);
470 final NumberFormat format = NumberFormat.getIntegerInstance();
471 format.setGroupingUsed(
false);
472 final NumberFormatter formatter =
new NumberFormatter(format);
473 final DefaultFormatterFactory factory =
new DefaultFormatterFactory(formatter);
474 final Number value = attributes.
getAttributeLong(archetypeAttribute.getArchetypeAttributeName());
475 final JFormattedTextField input =
new JFormattedTextField(factory, value);
476 input.setColumns(fieldLength);
477 adjustTooltip(input, archetypeAttribute);
485 final File relativeReference = mapFile == null ?
new File(projectSettings.
getMapsDirectory(),
"dummy") : mapFile.
getFile();
486 final JLabel label =
new JLabel(archetypeAttribute.getAttributeName() +
": ");
487 adjustTooltip(label, archetypeAttribute);
489 adjustTooltip(tilePanel, archetypeAttribute);
495 final JLabel label =
new JLabel(archetypeAttribute.getAttributeName() +
": ");
496 adjustTooltip(label, archetypeAttribute);
498 final TilePanel tilePanel =
new TilePanel(scriptFileFilter, attributes.
getAttributeString(archetypeAttribute.getArchetypeAttributeName()),
new File(mapsDirectory,
"dummy"), mapsDirectory);
499 adjustTooltip(tilePanel, archetypeAttribute);
505 final JLabel label =
new JLabel(archetypeAttribute.getAttributeName() +
": ");
506 adjustTooltip(label, archetypeAttribute);
507 label.setForeground(INT_COLOR);
508 final JComboBox<?> input =
buildSpellBox(attributes, numberSpells, undefinedSpellIndex,
false, archetypeAttribute);
509 adjustTooltip(input, archetypeAttribute);
515 final String defaultText = attributes.
getAttributeString(archetypeAttribute.getArchetypeAttributeName());
517 adjustTooltip(input, archetypeAttribute);
518 final JLabel label =
new JLabel(archetypeAttribute.getAttributeName() +
": ");
519 adjustTooltip(label, archetypeAttribute);
526 if (archetypeAttribute.getArchetypeAttributeName().equals(
"msg") && attributes instanceof
GameObject) {
528 final String archetypeMsgText = tmp.getArchetype().getMsgText();
529 final String gameObjectMsgText = tmp.getMsgText();
530 if (archetypeMsgText != null && !archetypeMsgText.isEmpty() && (gameObjectMsgText == null || gameObjectMsgText.isEmpty())) {
531 text = archetypeMsgText;
533 text = gameObjectMsgText;
541 input.
setText(text == null ?
"" : text);
543 input.setBorder(BorderFactory.createEmptyBorder(3, 7, 0, 0));
544 adjustTooltip(input, archetypeAttribute);
550 String treasureName = attributes.
getAttributeString(archetypeAttribute.getArchetypeAttributeName());
551 if (treasureName.trim().isEmpty() || treasureName.trim().equalsIgnoreCase(
"none")) {
555 adjustTooltip(input, archetypeAttribute);
556 input.setEditable(
false);
558 final JButton label =
new JButton(
new ViewTreasurelistAL(input, parent, treasureListTree));
559 adjustTooltip(label, archetypeAttribute);
565 final JLabel label =
new JLabel(archetypeAttribute.getAttributeName() +
": ");
566 adjustTooltip(label, archetypeAttribute);
567 label.setForeground(INT_COLOR);
568 final JComboBox<?> input =
buildSpellBox(attributes, numberSpells, undefinedSpellIndex,
true, archetypeAttribute);
569 adjustTooltip(input, archetypeAttribute);
597 public AttributesPaneBuilder(@NotNull
final Attributes attributes, @NotNull
final Component parent, @NotNull
final ArchetypeTypeSet archetypeTypeSet, @NotNull
final CFTreasureListTree treasureListTree, @NotNull
final FaceObjectProviders faceObjectProviders, @NotNull
final AnimationObjects animationObjects, @NotNull
final ProjectSettings projectSettings, @NotNull
final FileFilter mapFileFilter, @NotNull
final FileFilter scriptFileFilter, @NotNull
final FaceObjects faceObjects, @NotNull
final Spells<
GameObjectSpell<G, A, R>> gameObjectSpells, @NotNull
final Spells<NumberSpell> numberSpells,
final int undefinedSpellIndex, @NotNull
final TreasureTree treasureTree, @NotNull
final ImageIcon noFaceSquareIcon, @NotNull
final ImageIcon unknownSquareIcon, @NotNull
final TextAreaDefaults textAreaDefaults) {
632 return Collections.unmodifiableCollection(dialogAttributes);
641 public void buildAttribute(@NotNull
final Attributes attributes, @NotNull
final Iterable<ArchetypeAttributeSection> archetypeType) {
643 tabbedPane.removeAll();
648 final String sectionName = archetypeAttributeSection.getSectionName();
650 if (sectionName.length() <= 1) {
653 title = sectionName.substring(0, 1).toUpperCase() + sectionName.substring(1);
655 tabbedPane.addTab(title, null, panel);
660 tabbedPane.setSelectedIndex(sectionId > 0 ? 0 : -1);
661 tabbedPane.validate();
672 private Component
makeAttributePanel(@NotNull
final Iterable<ArchetypeAttribute> archetypeAttributeSection) {
673 int matchingAttributes = 0;
674 boolean hasBitmask =
false;
680 matchingAttributes++;
687 if (matchingAttributes == 0) {
692 final JPanel panel =
new JPanel(
new GridBagLayout());
693 final Insets gbcInsets =
new Insets(2, 2, 2, 2);
695 final GridBagConstraints gbc =
new GridBagConstraints();
696 gbc.insets = gbcInsets;
697 gbc.fill = GridBagConstraints.HORIZONTAL;
698 final Object labelGbc = gbc.clone();
700 gbc.gridwidth = GridBagConstraints.REMAINDER;
701 final Object compGbc = gbc.clone();
702 gbc.anchor = GridBagConstraints.WEST;
703 final Object rowGbc = gbc.clone();
704 gbc.fill = GridBagConstraints.BOTH;
707 final Object glueGbc = gbc.clone();
709 boolean hasGlue =
false;
714 archetypeAttribute.visit(archetypeAttributeVisitor);
716 assert tmpGuiInfo != null;
723 hasGlue |= tmpGuiInfo.
getGlue() != null;
729 panel.add(Box.createGlue(), glueGbc);
731 final JScrollPane panelReturn =
new JScrollPane(panel);
732 panelReturn.getVerticalScrollBar().setUnitIncrement(8);
742 private void addElement(@NotNull
final Container container, @Nullable
final Component component, @NotNull
final Object constraints) {
743 if (component != null) {
744 container.add(component, constraints);
745 component.addFocusListener(focusListener);
758 private static <G extends GameObject<G, A, R>, A extends
MapArchObject<A>, R extends
Archetype<G, A, R>> JComboBox<?> buildInvSpellBox(@NotNull
final Spells<
GameObjectSpell<G, A, R>> gameObjectSpells, @NotNull
final Attributes attributes,
final boolean isOptionalSpell, @NotNull
final String attributeName) {
760 throw new IllegalArgumentException();
763 final int selectedIndex;
764 @Nullable
final String title;
767 selectedIndex = gameObjectSpells.
size();
768 title = isOptionalSpell ? null :
"<none>";
772 selectedIndex = gameObjectSpells.
size() + (isOptionalSpell ? 1 : 0);
773 title =
"<multiple>";
778 final String invObjectArchetypeName = invObject.getArchetype().getArchetypeName();
780 @Nullable String tmpTitle =
"<customized spell>";
782 if (invObjectArchetypeName.equals(spellObject.getArchetypeName())) {
783 tmpTitle = invObject.
isDefaultGameObject() ? null : spellObject.getName() +
" <customized>";
788 selectedIndex = tmpTitle != null ? gameObjectSpells.size() + (isOptionalSpell ? 1 : 0) : index;
793 final DefaultComboBoxModel<String> model =
new DefaultComboBoxModel<>();
794 for (
final Spell spell : gameObjectSpells) {
795 model.addElement(spell.getName());
797 if (isOptionalSpell) {
798 model.addElement(
"<none>");
801 model.addElement(title);
803 final JComboBox<?> comboBox =
new JComboBox<>(model);
804 comboBox.setSelectedIndex(selectedIndex);
805 comboBox.setMaximumRowCount(10);
807 comboBox.setName(attributeName);
820 final String[] array =
new String[listData.size()];
821 boolean hasSelection =
false;
822 int selectedIndex = 0;
823 for (
int i = 0; i < array.length; i++) {
824 array[i] = listData.get(i).getSecond();
825 if (!hasSelection && listData.get(i).getFirst() == value) {
830 final JComboBox<?> comboBox =
new JComboBox<>(array);
831 comboBox.setSelectedIndex(selectedIndex);
832 comboBox.setMaximumRowCount(10);
834 comboBox.setName(attributeName);
849 int spellNumber = attributes.getAttributeInt(archetypeAttribute.getArchetypeAttributeName());
851 if (spellNumber < 0 || spellNumber >= numberSpells.size()) {
855 final int selectedIndex;
856 if (spellNumber == undefinedSpellIndex && isZSpell) {
862 final DefaultComboBoxModel<String> model =
new DefaultComboBoxModel<>();
863 model.addElement(
"<none>");
864 for (
final Spell spell : numberSpells) {
865 model.addElement(spell.getName());
867 final JComboBox<?> comboBox =
new JComboBox<>(model);
868 comboBox.setSelectedIndex(selectedIndex);
869 comboBox.setMaximumRowCount(10);
871 comboBox.setName(archetypeAttribute.getAttributeName());
final Collection< DialogAttribute< G, A, R, ?> > dialogAttributes
All DialogAttributes in the dialog.
An ArchetypeAttribute for selecting long integer values.
final AnimationObjects animationObjects
The AnimationObjects instance for choosing animation names.
static final Color FLOAT_COLOR
Color for float values.
final ArchetypeTypeSet archetypeTypeSet
Reference to the ArchetypeTypeSet.
final Spells< NumberSpell > numberSpells
The numbered spells.
An Action for the buttons on treasurelists.
A document implementation that can be tokenized by the syntax highlighting system.
final ImageIcon unknownSquareIcon
The ImageIcon for undefined animations.
int getValue()
Get the active bitmask value.
A set of key/value pairs.
final Spells< GameObjectSpell< G, A, R > > gameObjectSpells
The game object spells to use.
Graphical User Interface of Gridarta.
A JPanel that allows the user to select an animation name.
final int undefinedSpellIndex
The index for "no spell".
A GuiInfo that fills one component horizontally.
Settings that apply to a project.
An ArchetypeAttribute for selecting face names.
MapModel< G, A, R > getMapModel()
Returns the MapModel this map square is part of.
Manages ArchetypeType instances, list, and bitmask definitions.
This Class contains the data of one archetype attribute.
int getAttributeInt(@NotNull String attributeName)
Returns an attribute value of this Archetype as int.
An ArchetypeAttribute for selecting an optional spell encoded as an integer attribute.
An ArchetypeAttribute for selecting animation names.
Attributes attributes
The game object being modified.
Component makeAttributePanel(@NotNull final Iterable< ArchetypeAttribute > archetypeAttributeSection)
This method creates an attribute panel for one section of attributes.
Gridarta can handle frame information of animations and allow the selection of an animation using a t...
A tile panel displays exactly one direction for map tiling.
static TokenMarker createTokenMarker(@Nullable final File file)
Creates a suitable TokenMarker for a given file.
long getAttributeLong(@NotNull String attributeName)
Returns an attribute value of this Archetype as long.
abstract Component getRow()
Returns the row component to display filled horizontally or.
final FocusListener focusListener
A JPanel that allows the user to select a face name.
Component getTabbedPane()
Returns the JTabbedPane that contains all attribute tabs.
An ArchetypeAttribute displaying a fixed string.
An ArchetypeAttribute for selecting boolean values having specific "true" and "false" values...
Abstract base class for ArchetypeAttributes for spells.
Describes a numbered in-game spell.
An ArchetypeAttribute for selecting script files.
static final Pattern PARAGRAPH_DELIMITER
A Pattern that matches one or more NL characters.
void setText(@NotNull final String text)
Sets the entire text of this text area.
AttributeBitmask getBitmask(@NotNull final String bitmaskName)
Returns a bitmask type by name.
final ArchetypeAttributeVisitor archetypeAttributeVisitor
The ArchetypeAttributeVisitor for creating GUI elements for ArchetypeAttributes.
An ArchetypeAttribute for selecting map path names.
final FaceObjectProviders faceObjectProviders
The FaceObjectProviders for looking up faces.
An ArchetypeAttribute for selecting string values.
void buildAttribute(@NotNull final Attributes attributes, @NotNull final Iterable< ArchetypeAttributeSection > archetypeType)
Constructs the central part of the attribute dialog, containing the object's attributes.
String getAttributeString(@NotNull String attributeName)
Returns the requested attribute value of this GameObject as String.
void setEncodedValue(@NotNull final String encodedValue)
Set the active bitmask value in external file representation.
GuiInfo< G, A, R, ?> guiInfo
The return value for archetypeAttributeVisitor.
abstract Component getGlue()
Returns the glue component to display filled both horizontally and vertically or. ...
final FileFilter mapFileFilter
The FileFilter to use for map files.
Base package of all Gridarta classes.
Common base class for spells and spell lists.
Reflects a game object (object on a map).
final TreasureTree treasureTree
The TreasureTree to use.
A GuiInfo that fills one component both horizontally and vertically.
Iterable< DialogAttribute< G, A, R, ?> > getDialogAttributes()
Returns all DialogAttributes in the dialog.
final TextAreaDefaults textAreaDefaults
The TextAreaDefaults for text fields.
A set of ArchetypeAttributes.
A factory for creatingTokenMarker instances for Files.
A GuiInfo that displays a label and another component in two columns.
static JComboBox<?> buildArrayBox(@NotNull final ArchetypeTypeList listData, final int value, @NotNull final String attributeName)
Constructs the combo box for arrays of "list data".
final FaceObjects faceObjects
The FaceObjects instance for choosing face names.
Interface for visitors of ArchetypeAttributes.
AnimationObjects is a container for AnimationObjects.
static final int TEXTFIELD_COLUMNS
The width (columns) for input fields like textfields or JChooseBoxes.
GameObjects are the objects based on Archetypes found on maps.
This class manages bitmask values which appear in Gridarta archetype attributes.
final FileFilter scriptFileFilter
The FileFilter to use for script files.
final CFTreasureListTree treasureListTree
The CFTreasureListTree to use.
DialogAttribute< G, A, R, T > getAttribute()
Returns the DialogAttribute this entry represents.
The CFTreasureListTree class fully manages treasurelists.
KeySelectionManager to manage the select-per-keystroke in a JComboBox (The default KeySelectionManage...
final JTabbedPane tabbedPane
The central tabbed pane (the place where all the attribute tabs are).
abstract Component getLabel()
Returns the label to display in the first column or.
void setBitmask(@Nullable final AttributeBitmask bitmask)
Describes a numbered in-game spell.
This package contains the other part of the script editor.
final Component parent
The parent component for dialogs.
FaceObjects is a container for FaceObjects.
static final String NONE_SYM
The string displayed in attribute dialog for "none".
Base classes for rendering maps.
Describes an in-game spell.
An ArchetypeAttribute for selecting bitmask values.
int countInvObjects()
Counts the number of all inventory items (recursively).
static JComboBox<?> buildSpellBox(@NotNull final Attributes attributes, @NotNull final Spells< NumberSpell > numberSpells, final int undefinedSpellIndex, final boolean isZSpell, @NotNull final ArchetypeAttribute archetypeAttribute)
Constructs the combo box of the available spells.
An ArchetypeAttribute for selecting spells encoded as in integer attribute.
void addElement(@NotNull final Container container, @Nullable final Component component, @NotNull final Object constraints)
Adds a Component to a Container.
final ImageIcon noFaceSquareIcon
The ImageIcon for no animations.
Stores all defined treasure lists.
An ArchetypeAttribute for selecting integer values.
Provider for faces of GameObjects and Archetypes.
The face is the appearance of an object.
MapFile getMapFile()
Returns the map file.
File getFile()
Returns a File for this map file.
void setCaretPosition(final int caret)
Sets the caret position.
An ArchetypeAttribute for selecting a value from two lists.
An ArchetypeAttribute for selecting boolean values.
ActionListener for the change buttons of bitmasks.
File getMapsDirectory()
Returns the default maps directory.
ArchetypeTypeList getList(@NotNull final String listName)
Returns a list type definition.
An ArchetypeAttribute for selecting a value from a list.
An ArchetypeAttribute for selecting floating point values.
abstract Component getComponent()
Returns the component to display in the second column or.
An ArchetypeAttribute for selecting text fields.
final ProjectSettings projectSettings
The ProjectSettings instance.
An ArchetypeAttribute for selecting a spell encoded as an inventory game object.
static int findSpellIndex(@NotNull final Spells< NumberSpell > numberSpells, final int number)
Returns the spell index for a spell number.
jEdit's text area component.
An ArchetypeAttribute representing a treasurelist.
boolean isDefaultGameObject()
Defines types of GameObjects with corresponding attributes.
static final Color INT_COLOR
Color for int values.
double getAttributeDouble(@NotNull String attributeName)
Returns an attribute value of this Archetype as double.
The location of a map file with a map directory.
void setTokenMarker(@Nullable final TokenMarker tokenMarker)
Sets the token marker that is to be used to split lines of this document up into tokens.
Interface for MapArchObjects.
Builder for game object attribute panels.
int size()
Return the number of existing spell objects.
AttributesPaneBuilder(@NotNull final Attributes attributes, @NotNull final Component parent, @NotNull final ArchetypeTypeSet archetypeTypeSet, @NotNull final CFTreasureListTree treasureListTree, @NotNull final FaceObjectProviders faceObjectProviders, @NotNull final AnimationObjects animationObjects, @NotNull final ProjectSettings projectSettings, @NotNull final FileFilter mapFileFilter, @NotNull final FileFilter scriptFileFilter, @NotNull final FaceObjects faceObjects, @NotNull final Spells< GameObjectSpell< G, A, R >> gameObjectSpells, @NotNull final Spells< NumberSpell > numberSpells, final int undefinedSpellIndex, @NotNull final TreasureTree treasureTree, @NotNull final ImageIcon noFaceSquareIcon, @NotNull final ImageIcon unknownSquareIcon, @NotNull final TextAreaDefaults textAreaDefaults)
Creates a new instance.
A DialogAttribute for ArchetypeAttributeList2.
Encapsulates default settings for a text area.
MapSquare< G, A, R > getMapSquare()
Get the MapSquare of this GameObjectContainer.