 |
Gridarta Editor
|
Go to the documentation of this file.
20 package net.sf.gridarta.gui.dialog.gameobjectattributes;
22 import java.awt.Frame;
23 import java.awt.Window;
24 import java.util.HashMap;
26 import javax.swing.ImageIcon;
27 import javax.swing.JDialog;
28 import javax.swing.filechooser.FileFilter;
44 import net.
sf.japi.swing.action.ActionBuilder;
45 import net.
sf.japi.swing.action.ActionBuilderFactory;
46 import org.jetbrains.annotations.NotNull;
60 private static final ActionBuilder
ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder(
"net.sf.gridarta");
67 private final Map<G, JDialog>
dialogs =
new HashMap<>();
192 public GameObjectAttributesDialogFactory(@NotNull
final ArchetypeTypeSet archetypeTypeSet, @NotNull
final Frame
parent, @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, @NotNull
final MapManager<G, A, R> mapManager) {
218 final G head = gameObject.getHead();
220 if (head.hasUndefinedArchetype()) {
226 if (
dialogs.containsKey(head)) {
229 final GameObjectAttributesDialog<G, A, R> pane =
new GameObjectAttributesDialog<>(
this,
archetypeTypeSet, head,
parent,
treasureListTree,
faceObjectProviders,
animationObjects,
projectSettings,
mapFileFilter,
scriptFileFilter,
faceObjects,
gameObjectSpells,
numberSpells,
undefinedSpellIndex,
treasureTree,
noFaceSquareIcon,
unknownSquareIcon,
textAreaDefaults,
mapManager);
242 final Window dialog =
dialogs.remove(gameObject);
243 if (dialog !=
null) {
final Spells< NumberSpell > numberSpells
The numbered spells.
Defines types of GameObjects with corresponding attributes.
Encapsulates default settings for a text area.
final Map< G, JDialog > dialogs
The gameObject objects that already are shown, to avoid opening a dialog twice.
JDialog createDialog()
Creates a new JDialog instance for this dialog.
A MapManager manages all opened maps.
This package contains the other part of the script editor.
Base package of all Gridarta classes.
AnimationObjects is a container for AnimationObjects.
void showAttributeDialog(@NotNull final G gameObject)
Shows the game object attributes dialog for a given GameObject instance.
Describes a numbered in-game spell.
Common base class for game object attributes dialogs.
final TreasureTree treasureTree
The TreasureTree to use.
final Frame parent
The parent frame for showing dialog boxes.
final FaceObjects faceObjects
The FaceObjects instance for choosing face names.
final ArchetypeTypeSet archetypeTypeSet
The list of CF type-data.
Provider for faces of GameObjects and Archetypes.
Reflects a game object (object on a map).
final ImageIcon noFaceSquareIcon
The ImageIcon for no animations.
Manages ArchetypeType instances, list, and bitmask definitions.
Graphical User Interface of Gridarta.
final CFTreasureListTree treasureListTree
The CFTreasureListTree to display.
GameObjects are the objects based on Archetypes found on maps.
final ImageIcon unknownSquareIcon
The ImageIcon for undefined animations.
final FileFilter scriptFileFilter
The FileFilter to use for script files.
Stores all defined treasure lists.
final AnimationObjects animationObjects
The AnimationObjects instance for choosing animation names.
Interface for MapArchObjects.
Describes a numbered in-game spell.
FaceObjects is a container for FaceObjects.
final MapManager< G, A, R > mapManager
The MapManager instance.
Settings that apply to a project.
A factory that creates dialogs for editing game object attributes.
final int undefinedSpellIndex
The index for "no spell".
The face is the appearance of an object.
Gridarta can handle frame information of animations and allow the selection of an animation using a t...
final FaceObjectProviders faceObjectProviders
The FaceObjectProviders for looking up faces.
Common base class for spells and spell lists.
final TextAreaDefaults textAreaDefaults
The TextAreaDefaults for text fields.
The CFTreasureListTree class fully manages treasurelists.
GameObjectAttributesDialogFactory(@NotNull final ArchetypeTypeSet archetypeTypeSet, @NotNull final Frame parent, @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, @NotNull final MapManager< G, A, R > mapManager)
Creates a new instance.
static final ActionBuilder ACTION_BUILDER
Action Builder.
void hideAttributeDialog(@NotNull final G gameObject)
Hides the game object attributes dialog for a given GameObject instance.
final FileFilter mapFileFilter
The FileFilter to use for map files.
final ProjectSettings projectSettings
The ProjectSettings instance.
final Spells< GameObjectSpell< G, A, R > > gameObjectSpells
The game object spells to use.