Gridarta Editor
EditorFactory.java
Go to the documentation of this file.
1 /*
2  * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games.
3  * Copyright (C) 2000-2015 The Gridarta Developers.
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License along
16  * with this program; if not, write to the Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19 
20 package net.sf.gridarta.maincontrol;
21 
22 import java.awt.Component;
23 import javax.swing.filechooser.FileFilter;
61 import net.sf.japi.swing.prefs.PreferencesGroup;
62 import org.jetbrains.annotations.NotNull;
63 import org.jetbrains.annotations.Nullable;
64 
69 public interface EditorFactory<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> extends ProjectFactory<G, A, R> {
70 
76  @NotNull
77  ProjectSettings newProjectSettings(@NotNull EditorSettings editorSettings);
78 
84  @NotNull
86 
96  @NotNull
97  ScriptedEventFactory<G, A, R> newScriptedEventFactory(@NotNull ScriptArchUtils scriptArchUtils, @NotNull GameObjectFactory<G, A, R> gameObjectFactory, @NotNull ScriptedEventEditor<G, A, R> scriptedEventEditor, @NotNull ArchetypeSet<G, A, R> archetypeSet);
98 
103  @NotNull
105 
113  @NotNull
114  ScriptArchDataUtils<G, A, R> newScriptArchDataUtils(@NotNull ScriptArchUtils scriptArchUtils, @NotNull ScriptedEventFactory<G, A, R> scriptedEventFactory, @NotNull ScriptedEventEditor<G, A, R> scriptedEventEditor);
115 
128  @NotNull
129  RendererFactory<G, A, R> newRendererFactory(@NotNull MapViewSettings mapViewSettings, @NotNull FilterControl<G, A, R> filterControl, @NotNull GameObjectParser<G, A, R> gameObjectParser, @NotNull FaceObjectProviders faceObjectProviders, @NotNull ResourceIcons resourceIcons, @NotNull SmoothFaces smoothFaces);
130 
138  @NotNull
139  MapViewFactory<G, A, R> newMapViewFactory(@NotNull RendererFactory<G, A, R> rendererFactory, @NotNull PathManager pathManager);
140 
147  @NotNull
149 
159  @NotNull
160  NewMapDialogFactory<G, A, R> newNewMapDialogFactory(@NotNull MapViewsManager<G, A, R> mapViewsManager, @NotNull MapArchObjectFactory<A> mapArchObjectFactory, @NotNull PickmapChooserView<G, A, R> pickmapChooserView, @NotNull Component parent);
161 
172  @NotNull
173  PreferencesGroup createPreferencesGroup(@NotNull ProjectSettings projectSettings, @NotNull EditorSettings editorSettings, @NotNull DelegatingMapValidator<G, A, R> validators, @NotNull AppPreferencesModel appPreferencesModel, @NotNull ExitConnectorModel exitConnectorModel, @NotNull ConfigSourceFactory configSourceFactory);
174 
181  @Nullable
182  EditorAction newServerActions(@NotNull FileControl<G, A, R> fileControl);
183 
188  @NotNull
189  FileFilter getScriptFileFilter();
190 
195  @NotNull
196  String getScriptExtension();
197 
202  @NotNull
203  String getScriptName();
204 
209  boolean isCreateDirectionPane();
210 
216 
221  @NotNull
223 
228  @NotNull
230 
235  boolean isAllowRandomMapParameters();
236 
241  @Nullable
242  String getCompassIconName();
243 
248  @NotNull
249  String getGridartaJarFilename();
250 
255  @NotNull
256  FileFilter getMapFileFilter();
257 
262  @NotNull
264 
269  boolean isAutoValidatorDefault();
270 
271 }
Dialog to edit events linked to item scripting.
Stores and manages information about scripted events.
Package with common types for event archetypes.
String getGridartaJarFilename()
Returns the filename of the editor&#39;s .jar file.
This class contains methods for converting relative map paths to absolute map paths and vice versa...
A MapManager manages all opened maps.
Definition: MapManager.java:37
Graphical User Interface of Gridarta.
Reading and writing of maps, handling of paths.
Settings that apply to a project.
FileFilter getScriptFileFilter()
Returns the FileFilter for script files.
ScriptArchDataUtils< G, A, R > newScriptArchDataUtils(@NotNull ScriptArchUtils scriptArchUtils, @NotNull ScriptedEventFactory< G, A, R > scriptedEventFactory, @NotNull ScriptedEventEditor< G, A, R > scriptedEventEditor)
Creates a new ScriptArchDataUtils instance.
This package contains the framework for validating maps.
int [] getLockedItemsTypeNumbers()
Returns the type numbers of game objects being locked items.
ScriptArchUtils newScriptArchUtils(@NotNull ArchetypeTypeList eventTypes)
Creates a new ScriptArchUtils instance.
Factory for creating ScriptedEvent instances.
NewMapDialogFactory< G, A, R > newNewMapDialogFactory(@NotNull MapViewsManager< G, A, R > mapViewsManager, @NotNull MapArchObjectFactory< A > mapArchObjectFactory, @NotNull PickmapChooserView< G, A, R > pickmapChooserView, @NotNull Component parent)
Creates a new NewMapDialogFactory instance.
ProjectSettings newProjectSettings(@NotNull EditorSettings editorSettings)
Creates a new ProjectSettings instance.
Creates derived files for caching files.
Definition: CacheFiles.java:30
String getScriptName()
Returns the display name for script files.
Factory for creating MapArchObject instances.
Interface for classes that read or write GameObject instances.
String getScriptExtension()
Returns the extension for script files.
Maintains the application preferences state.
PreferencesGroup createPreferencesGroup(@NotNull ProjectSettings projectSettings, @NotNull EditorSettings editorSettings, @NotNull DelegatingMapValidator< G, A, R > validators, @NotNull AppPreferencesModel appPreferencesModel, @NotNull ExitConnectorModel exitConnectorModel, @NotNull ConfigSourceFactory configSourceFactory)
Creates a new PreferencesGroup instance.
Base package of all Gridarta classes.
Reflects a game object (object on a map).
Definition: GameObject.java:36
FileFilter getMapFileFilter()
Returns the file filter for map files.
MapViewFactory< G, A, R > newMapViewFactory(@NotNull RendererFactory< G, A, R > rendererFactory, @NotNull PathManager pathManager)
Creates a new MapViewFactory instance.
Abstract factory for creating GameObject instances.
ScriptedEventFactory< G, A, R > newScriptedEventFactory(@NotNull ScriptArchUtils scriptArchUtils, @NotNull GameObjectFactory< G, A, R > gameObjectFactory, @NotNull ScriptedEventEditor< G, A, R > scriptedEventEditor, @NotNull ArchetypeSet< G, A, R > archetypeSet)
Creates a new ScriptedEventFactory instance.
String getCompassIconName()
Returns the icon name to display in the selected square view.
A global editor action.
EditorAction newServerActions(@NotNull FileControl< G, A, R > fileControl)
Creates the "open in client" action.
This package contains the preferences ui modules.
Collection of all smoothing information.
Container for settings that affect the rendering of maps.
int getUndefinedSpellIndex()
Returns the index for "no spell".
GameObjects are the objects based on Archetypes found on maps.
The filter package contains the classes for Filters.
Definition: BtnPopup.java:20
boolean isAllowRandomMapParameters()
Returns whether exit paths may point to random map parameters.
Base classes for rendering maps.
ScriptArchData< G, A, R > newScriptArchData()
Creates a new ScriptArchData instance.
Factory for creating MapRenderer instances.
Classes implementing the pickmap chooser.
net.sf.gridarta.model.scripts.ScriptArchData related functions.
Utility class to create NewMapDialog instances.
A Map Validator that delegates to other MapValidators.
Stores information needed by the exit connector.
Provider for faces of GameObjects and Archetypes.
The face is the appearance of an object.
Creates ImageIcon instances from resources.
A factory to create editor-dependent objects.
Interface that captures similarities between different ArchetypeSet implementations.
RendererFactory< G, A, R > newRendererFactory(@NotNull MapViewSettings mapViewSettings, @NotNull FilterControl< G, A, R > filterControl, @NotNull GameObjectParser< G, A, R > gameObjectParser, @NotNull FaceObjectProviders faceObjectProviders, @NotNull ResourceIcons resourceIcons, @NotNull SmoothFaces smoothFaces)
Creates a new RendererFactory instance.
MapPropertiesDialogFactory< G, A, R > newMapPropertiesDialogFactory(@NotNull ProjectSettings projectSettings, @NotNull MapManager< G, A, R > mapManager)
Creates a new MapPropertiesDialogFactory instance.
Settings that apply to the editor.
Defines types of GameObjects with corresponding attributes.
A factory for creating MapView instances.
A factory to create project-dependent objects.
boolean isAutoValidatorDefault()
Returns whether the auto validator is enabled by default.
Direction [] getDirectionMap()
Returns a map of relative direction to map window direction.
CacheFiles getCacheFiles()
Returns the cache files for icon and preview images.
boolean isCreateDirectionPane()
Returns whether the direction panel should be created.