public class DefaultEditorFactory extends java.lang.Object implements EditorFactory<GameObject,MapArchObject,Archetype>
EditorFactory that creates Crossfire objects.| Constructor and Description |
|---|
DefaultEditorFactory() |
| Modifier and Type | Method and Description |
|---|---|
@NotNull net.sf.japi.swing.prefs.PreferencesGroup |
createPreferencesGroup(@NotNull ProjectSettings projectSettings,
@NotNull EditorSettings editorSettings,
@NotNull DelegatingMapValidator<GameObject,MapArchObject,Archetype> validators,
@NotNull AppPreferencesModel appPreferencesModel,
@NotNull ExitConnectorModel exitConnectorModel,
@NotNull ConfigSourceFactory configSourceFactory)
Creates a new
PreferencesGroup instance. |
@NotNull CacheFiles |
getCacheFiles()
Returns the cache files for icon and preview images.
|
@NotNull java.lang.String |
getCompassIconName()
Returns the icon name to display in the selected square view.
|
@NotNull Direction[] |
getDirectionMap()
Returns a map of relative direction to map window direction.
|
int |
getDoubleFaceOffset()
Returns the offset for drawing double faces.
|
@NotNull java.lang.String |
getGridartaJarFilename()
Returns the filename of the editor's .jar file.
|
boolean |
getIncludeFaceNumbers()
Returns whether the face file contains face numbers.
|
int[] |
getLockedItemsTypeNumbers()
Returns the type numbers of game objects being locked items.
|
@NotNull javax.swing.filechooser.FileFilter |
getMapFileFilter()
Returns the file filter for map files.
|
@NotNull java.lang.String |
getScriptExtension()
Returns the extension for script files.
|
@NotNull javax.swing.filechooser.FileFilter |
getScriptFileFilter()
Returns the
FileFilter for script files. |
@NotNull java.lang.String |
getScriptName()
Returns the display name for script files.
|
@NotNull java.lang.String |
getScriptsDir()
Returns the default directory for editor scripts.
|
@Nullable java.lang.String |
getSpellFile()
Returns the spell file name to load.
|
int |
getSpellType()
Returns the archetype type for game object spells.
|
int |
getUndefinedSpellIndex()
Returns the index for "no spell".
|
boolean |
isAllowRandomMapParameters()
Returns whether exit paths may point to random map parameters.
|
boolean |
isAutoValidatorDefault()
Returns whether the auto validator is enabled by default.
|
boolean |
isCreateDirectionPane()
Returns whether the direction panel should be created.
|
@NotNull AttributeRangeChecker<GameObject,MapArchObject,Archetype> |
loadAttributeRangeChecker(@NotNull ErrorViewCollector errorViewCollector,
@NotNull GameObjectMatchers gameObjectMatchers,
@NotNull ValidatorPreferences validatorPreferences)
Loads the attribute range checker for map validation.
|
@NotNull ArchetypeFactory<GameObject,MapArchObject,Archetype> |
newArchetypeFactory(@NotNull FaceObjectProviders faceObjectProviders,
@NotNull AnimationObjects animationObjects)
Creates a new
ArchetypeFactory instance. |
ArchetypeParser |
newArchetypeParser(@NotNull ErrorView errorView,
GameObjectParser<GameObject,MapArchObject,Archetype> gameObjectParser,
AnimationObjects animationObjects,
ArchetypeSet<GameObject,MapArchObject,Archetype> archetypeSet,
@NotNull GameObjectFactory<GameObject,MapArchObject,Archetype> gameObjectFactory,
@NotNull ProjectSettings projectSettings,
@NotNull SmoothFaces smoothFaces)
Creates a new
AbstractArchetypeParser instance. |
@NotNull ArchetypeSet<GameObject,MapArchObject,Archetype> |
newArchetypeSet(@NotNull ProjectSettings projectSettings,
@NotNull ArchetypeFactory<GameObject,MapArchObject,Archetype> archetypeFactory)
Creates a new
ArchetypeSet instance. |
@NotNull GameObjectFactory<GameObject,MapArchObject,Archetype> |
newGameObjectFactory(@NotNull FaceObjectProviders faceObjectProviders,
@NotNull AnimationObjects animationObjects,
@NotNull ArchetypeTypeSet archetypeTypeSet)
Creates a new
GameObjectFactory instance. |
@NotNull GameObjectParserFactory<GameObject,MapArchObject,Archetype> |
newGameObjectParserFactory(@NotNull GameObjectFactory<GameObject,MapArchObject,Archetype> gameObjectFactory,
@NotNull ArchetypeSet<GameObject,MapArchObject,Archetype> archetypeSet,
@NotNull ArchetypeTypeSet archetypeTypeSet)
Creates a new
GameObjectParserFactory instance. |
@NotNull MapArchObjectFactory<MapArchObject> |
newMapArchObjectFactory(@NotNull ProjectSettings projectSettings)
Creates a new
MapArchObjectFactory instance. |
@NotNull DefaultMapArchObjectParserFactory |
newMapArchObjectParserFactory()
Creates a new
MapArchObjectParserFactory instance. |
@NotNull MapControlFactory<GameObject,MapArchObject,Archetype> |
newMapControlFactory(@NotNull MapWriter<GameObject,MapArchObject,Archetype> mapWriter,
@NotNull ProjectSettings projectSettings,
@NotNull MapModelFactory<GameObject,MapArchObject,Archetype> mapModelFactory)
Creates a new
MapControlFactory instance. |
@NotNull MapPropertiesDialogFactory<GameObject,MapArchObject,Archetype> |
newMapPropertiesDialogFactory(@NotNull ProjectSettings projectSettings,
@NotNull MapManager<GameObject,MapArchObject,Archetype> mapManager)
Creates a new
MapPropertiesDialogFactory instance. |
@NotNull MapViewFactory<GameObject,MapArchObject,Archetype> |
newMapViewFactory(@NotNull RendererFactory<GameObject,MapArchObject,Archetype> rendererFactory,
@NotNull PathManager pathManager)
Creates a new
MapViewFactory instance. |
@NotNull NewMapDialogFactory<GameObject,MapArchObject,Archetype> |
newNewMapDialogFactory(@NotNull MapViewsManager<GameObject,MapArchObject,Archetype> mapViewsManager,
@NotNull MapArchObjectFactory<MapArchObject> mapArchObjectFactory,
@NotNull PickmapChooserView<GameObject,MapArchObject,Archetype> pickmapChooserView,
@NotNull java.awt.Component parent)
Creates a new
NewMapDialogFactory instance. |
@NotNull ProjectSettings |
newProjectSettings(@NotNull EditorSettings editorSettings)
Creates a new
ProjectSettings instance. |
@NotNull RendererFactory<GameObject,MapArchObject,Archetype> |
newRendererFactory(@NotNull MapViewSettings mapViewSettings,
@NotNull FilterControl<GameObject,MapArchObject,Archetype> filterControl,
@NotNull GameObjectParser<GameObject,MapArchObject,Archetype> gameObjectParser,
@NotNull FaceObjectProviders faceObjectProviders,
@NotNull ResourceIcons resourceIcons,
@NotNull SmoothFaces smoothFaces)
Creates a new
RendererFactory instance. |
@NotNull AbstractResources<GameObject,MapArchObject,Archetype> |
newResources(@NotNull GameObjectParser<GameObject,MapArchObject,Archetype> gameObjectParser,
@NotNull ArchetypeSet<GameObject,MapArchObject,Archetype> archetypeSet,
@NotNull AbstractArchetypeParser<GameObject,MapArchObject,Archetype,?> archetypeParser,
@NotNull FaceObjects faceObjects,
@NotNull AnimationObjects animationObjects,
@NotNull ArchFaceProvider archFaceProvider,
@NotNull FaceObjectProviders faceObjectProviders,
@NotNull SmoothFaces smoothFaces)
Creates a new
AbstractResources instance. |
@NotNull ScriptArchData<GameObject,MapArchObject,Archetype> |
newScriptArchData()
Creates a new
ScriptArchData instance. |
@NotNull ScriptArchDataUtils<GameObject,MapArchObject,Archetype> |
newScriptArchDataUtils(@NotNull ScriptArchUtils scriptArchUtils,
@NotNull ScriptedEventFactory<GameObject,MapArchObject,Archetype> scriptedEventFactory,
@NotNull ScriptedEventEditor<GameObject,MapArchObject,Archetype> scriptedEventEditor)
Creates a new
ScriptArchDataUtils instance. |
@NotNull DefaultScriptArchUtils |
newScriptArchUtils(@NotNull ArchetypeTypeList eventTypes)
Creates a new
ScriptArchUtils instance. |
@NotNull ScriptedEventFactory<GameObject,MapArchObject,Archetype> |
newScriptedEventFactory(@NotNull ScriptArchUtils scriptArchUtils,
@NotNull GameObjectFactory<GameObject,MapArchObject,Archetype> gameObjectFactory,
@NotNull ScriptedEventEditor<GameObject,MapArchObject,Archetype> scriptedEventEditor,
@NotNull ArchetypeSet<GameObject,MapArchObject,Archetype> archetypeSet)
Creates a new
ScriptedEventFactory instance. |
@NotNull EditorAction |
newServerActions(@NotNull FileControl<GameObject,MapArchObject,Archetype> fileControl)
Creates the "open in client" action.
|
public int getDoubleFaceOffset()
ProjectFactorygetDoubleFaceOffset in interface ProjectFactory<GameObject,MapArchObject,Archetype>@NotNull public @NotNull MapArchObjectFactory<MapArchObject> newMapArchObjectFactory(@NotNull @NotNull ProjectSettings projectSettings)
ProjectFactoryMapArchObjectFactory instance.newMapArchObjectFactory in interface ProjectFactory<GameObject,MapArchObject,Archetype>projectSettings - the project settings to use@NotNull public @NotNull DefaultMapArchObjectParserFactory newMapArchObjectParserFactory()
ProjectFactoryMapArchObjectParserFactory instance.newMapArchObjectParserFactory in interface ProjectFactory<GameObject,MapArchObject,Archetype>@NotNull public @NotNull GameObjectFactory<GameObject,MapArchObject,Archetype> newGameObjectFactory(@NotNull @NotNull FaceObjectProviders faceObjectProviders, @NotNull @NotNull AnimationObjects animationObjects, @NotNull @NotNull ArchetypeTypeSet archetypeTypeSet)
ProjectFactoryGameObjectFactory instance.newGameObjectFactory in interface ProjectFactory<GameObject,MapArchObject,Archetype>faceObjectProviders - the face object providers to useanimationObjects - the animation objects for looking up animationsarchetypeTypeSet - the archetype type set for looking up archetype
types@NotNull public @NotNull GameObjectParserFactory<GameObject,MapArchObject,Archetype> newGameObjectParserFactory(@NotNull @NotNull GameObjectFactory<GameObject,MapArchObject,Archetype> gameObjectFactory, @NotNull @NotNull ArchetypeSet<GameObject,MapArchObject,Archetype> archetypeSet, @NotNull @NotNull ArchetypeTypeSet archetypeTypeSet)
ProjectFactoryGameObjectParserFactory instance.newGameObjectParserFactory in interface ProjectFactory<GameObject,MapArchObject,Archetype>gameObjectFactory - the game object parser factory to usearchetypeSet - the archetype set for looking up archetypesarchetypeTypeSet - the archetype type set for sorting attributes on
save@NotNull public @NotNull ProjectSettings newProjectSettings(@NotNull @NotNull EditorSettings editorSettings)
EditorFactoryProjectSettings instance.newProjectSettings in interface EditorFactory<GameObject,MapArchObject,Archetype>editorSettings - the editor settings instance for default values@NotNull public @NotNull ArchetypeFactory<GameObject,MapArchObject,Archetype> newArchetypeFactory(@NotNull @NotNull FaceObjectProviders faceObjectProviders, @NotNull @NotNull AnimationObjects animationObjects)
ProjectFactoryArchetypeFactory instance.newArchetypeFactory in interface ProjectFactory<GameObject,MapArchObject,Archetype>faceObjectProviders - the face object providers for looking up
facesanimationObjects - the animation objects for looking up animations@NotNull public @NotNull ArchetypeSet<GameObject,MapArchObject,Archetype> newArchetypeSet(@NotNull @NotNull ProjectSettings projectSettings, @NotNull @NotNull ArchetypeFactory<GameObject,MapArchObject,Archetype> archetypeFactory)
ProjectFactoryArchetypeSet instance.newArchetypeSet in interface ProjectFactory<GameObject,MapArchObject,Archetype>projectSettings - the project settings to usearchetypeFactory - the archetype factory to use@NotNull public @NotNull MapControlFactory<GameObject,MapArchObject,Archetype> newMapControlFactory(@NotNull @NotNull MapWriter<GameObject,MapArchObject,Archetype> mapWriter, @NotNull @NotNull ProjectSettings projectSettings, @NotNull @NotNull MapModelFactory<GameObject,MapArchObject,Archetype> mapModelFactory)
ProjectFactoryMapControlFactory instance.newMapControlFactory in interface ProjectFactory<GameObject,MapArchObject,Archetype>mapWriter - the map writer to useprojectSettings - the project settings to usemapModelFactory - the map model factory to usepublic boolean getIncludeFaceNumbers()
ProjectFactorygetIncludeFaceNumbers in interface ProjectFactory<GameObject,MapArchObject,Archetype>@NotNull public @NotNull AttributeRangeChecker<GameObject,MapArchObject,Archetype> loadAttributeRangeChecker(@NotNull @NotNull ErrorViewCollector errorViewCollector, @NotNull @NotNull GameObjectMatchers gameObjectMatchers, @NotNull @NotNull ValidatorPreferences validatorPreferences)
ProjectFactoryloadAttributeRangeChecker in interface ProjectFactory<GameObject,MapArchObject,Archetype>errorViewCollector - the error view collector to usegameObjectMatchers - the defined game object matchersvalidatorPreferences - the validator preferences to usepublic ArchetypeParser newArchetypeParser(@NotNull @NotNull ErrorView errorView, GameObjectParser<GameObject,MapArchObject,Archetype> gameObjectParser, AnimationObjects animationObjects, ArchetypeSet<GameObject,MapArchObject,Archetype> archetypeSet, @NotNull @NotNull GameObjectFactory<GameObject,MapArchObject,Archetype> gameObjectFactory, @NotNull @NotNull ProjectSettings projectSettings, @NotNull @NotNull SmoothFaces smoothFaces)
ProjectFactoryAbstractArchetypeParser instance.newArchetypeParser in interface ProjectFactory<GameObject,MapArchObject,Archetype>errorView - the error view for reporting errorsgameObjectParser - the game object parser to useanimationObjects - the animation objects to usearchetypeSet - the archetype set to usegameObjectFactory - the game object factory to useprojectSettings - the project settings to usesmoothFaces - the smooth faces to use@NotNull public @NotNull DefaultScriptArchUtils newScriptArchUtils(@NotNull @NotNull ArchetypeTypeList eventTypes)
EditorFactoryScriptArchUtils instance.newScriptArchUtils in interface EditorFactory<GameObject,MapArchObject,Archetype>eventTypes - the event types to use@NotNull public @NotNull ScriptedEventFactory<GameObject,MapArchObject,Archetype> newScriptedEventFactory(@NotNull @NotNull ScriptArchUtils scriptArchUtils, @NotNull @NotNull GameObjectFactory<GameObject,MapArchObject,Archetype> gameObjectFactory, @NotNull @NotNull ScriptedEventEditor<GameObject,MapArchObject,Archetype> scriptedEventEditor, @NotNull @NotNull ArchetypeSet<GameObject,MapArchObject,Archetype> archetypeSet)
EditorFactoryScriptedEventFactory instance.newScriptedEventFactory in interface EditorFactory<GameObject,MapArchObject,Archetype>scriptArchUtils - the script arch utils to usegameObjectFactory - the game object factory for creating game
objectsscriptedEventEditor - the scripted event editor to usearchetypeSet - the archetype set to use@NotNull public @NotNull ScriptArchData<GameObject,MapArchObject,Archetype> newScriptArchData()
EditorFactoryScriptArchData instance.newScriptArchData in interface EditorFactory<GameObject,MapArchObject,Archetype>@NotNull public @NotNull ScriptArchDataUtils<GameObject,MapArchObject,Archetype> newScriptArchDataUtils(@NotNull @NotNull ScriptArchUtils scriptArchUtils, @NotNull @NotNull ScriptedEventFactory<GameObject,MapArchObject,Archetype> scriptedEventFactory, @NotNull @NotNull ScriptedEventEditor<GameObject,MapArchObject,Archetype> scriptedEventEditor)
EditorFactoryScriptArchDataUtils instance.newScriptArchDataUtils in interface EditorFactory<GameObject,MapArchObject,Archetype>scriptArchUtils - the script arch utils to usescriptedEventFactory - the scripted event factory to usescriptedEventEditor - the scripted event editor to use@NotNull public @NotNull RendererFactory<GameObject,MapArchObject,Archetype> newRendererFactory(@NotNull @NotNull MapViewSettings mapViewSettings, @NotNull @NotNull FilterControl<GameObject,MapArchObject,Archetype> filterControl, @NotNull @NotNull GameObjectParser<GameObject,MapArchObject,Archetype> gameObjectParser, @NotNull @NotNull FaceObjectProviders faceObjectProviders, @NotNull @NotNull ResourceIcons resourceIcons, @NotNull @NotNull SmoothFaces smoothFaces)
EditorFactoryRendererFactory instance.newRendererFactory in interface EditorFactory<GameObject,MapArchObject,Archetype>mapViewSettings - the map view settings to usefilterControl - the filter control to usegameObjectParser - the game object parser for creating tooltip
informationfaceObjectProviders - the face object providers for looking up
facesresourceIcons - the resource icons for creating iconssmoothFaces - the smooth faces to use@NotNull public @NotNull MapViewFactory<GameObject,MapArchObject,Archetype> newMapViewFactory(@NotNull @NotNull RendererFactory<GameObject,MapArchObject,Archetype> rendererFactory, @NotNull @NotNull PathManager pathManager)
EditorFactoryMapViewFactory instance.newMapViewFactory in interface EditorFactory<GameObject,MapArchObject,Archetype>rendererFactory - the renderer factory to usepathManager - the path manager for converting path names view
factories@NotNull public @NotNull MapPropertiesDialogFactory<GameObject,MapArchObject,Archetype> newMapPropertiesDialogFactory(@NotNull @NotNull ProjectSettings projectSettings, @NotNull @NotNull MapManager<GameObject,MapArchObject,Archetype> mapManager)
EditorFactoryMapPropertiesDialogFactory instance.newMapPropertiesDialogFactory in interface EditorFactory<GameObject,MapArchObject,Archetype>projectSettings - the project settings to usemapManager - the map manager to use@NotNull public @NotNull NewMapDialogFactory<GameObject,MapArchObject,Archetype> newNewMapDialogFactory(@NotNull @NotNull MapViewsManager<GameObject,MapArchObject,Archetype> mapViewsManager, @NotNull @NotNull MapArchObjectFactory<MapArchObject> mapArchObjectFactory, @NotNull @NotNull PickmapChooserView<GameObject,MapArchObject,Archetype> pickmapChooserView, @NotNull @NotNull java.awt.Component parent)
EditorFactoryNewMapDialogFactory instance.newNewMapDialogFactory in interface EditorFactory<GameObject,MapArchObject,Archetype>mapViewsManager - the map viewsmapArchObjectFactory - the map arch object factory instancepickmapChooserView - the pickmap chooser view for creating new
pickmapsparent - the parent component of the dialogs@NotNull
public @NotNull net.sf.japi.swing.prefs.PreferencesGroup createPreferencesGroup(@NotNull
@NotNull ProjectSettings projectSettings,
@NotNull
@NotNull EditorSettings editorSettings,
@NotNull
@NotNull DelegatingMapValidator<GameObject,MapArchObject,Archetype> validators,
@NotNull
@NotNull AppPreferencesModel appPreferencesModel,
@NotNull
@NotNull ExitConnectorModel exitConnectorModel,
@NotNull
@NotNull ConfigSourceFactory configSourceFactory)
EditorFactoryPreferencesGroup instance.createPreferencesGroup in interface EditorFactory<GameObject,MapArchObject,Archetype>projectSettings - the project settings to useeditorSettings - the editor settings to usevalidators - the validators to useappPreferencesModel - the app preferences model to useexitConnectorModel - the exit connector model to useconfigSourceFactory - the config source factory to use@NotNull public @NotNull AbstractResources<GameObject,MapArchObject,Archetype> newResources(@NotNull @NotNull GameObjectParser<GameObject,MapArchObject,Archetype> gameObjectParser, @NotNull @NotNull ArchetypeSet<GameObject,MapArchObject,Archetype> archetypeSet, @NotNull @NotNull AbstractArchetypeParser<GameObject,MapArchObject,Archetype,?> archetypeParser, @NotNull @NotNull FaceObjects faceObjects, @NotNull @NotNull AnimationObjects animationObjects, @NotNull @NotNull ArchFaceProvider archFaceProvider, @NotNull @NotNull FaceObjectProviders faceObjectProviders, @NotNull @NotNull SmoothFaces smoothFaces)
ProjectFactoryAbstractResources instance.newResources in interface ProjectFactory<GameObject,MapArchObject,Archetype>gameObjectParser - the game object parser to usearchetypeSet - the archetype set to usearchetypeParser - the archetype parser to usefaceObjects - the face objects to useanimationObjects - the animation objects to usearchFaceProvider - the arch face provider to usefaceObjectProviders - the face object providers for looking up
facessmoothFaces - the smooth faces to use@NotNull public @NotNull EditorAction newServerActions(@NotNull @NotNull FileControl<GameObject,MapArchObject,Archetype> fileControl)
EditorFactorynewServerActions in interface EditorFactory<GameObject,MapArchObject,Archetype>fileControl - the file control for saving mapsnull@NotNull public @NotNull java.lang.String getScriptsDir()
ProjectFactorygetScriptsDir in interface ProjectFactory<GameObject,MapArchObject,Archetype>@Nullable public @Nullable java.lang.String getSpellFile()
ProjectFactorygetSpellFile in interface ProjectFactory<GameObject,MapArchObject,Archetype>null to not load numbered spellspublic int getSpellType()
ProjectFactorygetSpellType in interface ProjectFactory<GameObject,MapArchObject,Archetype>0 to not load game object spells@NotNull public @NotNull javax.swing.filechooser.FileFilter getScriptFileFilter()
EditorFactoryFileFilter for script files.getScriptFileFilter in interface EditorFactory<GameObject,MapArchObject,Archetype>@NotNull public @NotNull java.lang.String getScriptExtension()
EditorFactorygetScriptExtension in interface EditorFactory<GameObject,MapArchObject,Archetype>@NotNull public @NotNull java.lang.String getScriptName()
EditorFactorygetScriptName in interface EditorFactory<GameObject,MapArchObject,Archetype>public boolean isCreateDirectionPane()
EditorFactoryisCreateDirectionPane in interface EditorFactory<GameObject,MapArchObject,Archetype>public int getUndefinedSpellIndex()
EditorFactorygetUndefinedSpellIndex in interface EditorFactory<GameObject,MapArchObject,Archetype>@NotNull public @NotNull CacheFiles getCacheFiles()
EditorFactorygetCacheFiles in interface EditorFactory<GameObject,MapArchObject,Archetype>@NotNull public @NotNull Direction[] getDirectionMap()
EditorFactorygetDirectionMap in interface EditorFactory<GameObject,MapArchObject,Archetype>public boolean isAllowRandomMapParameters()
EditorFactoryisAllowRandomMapParameters in interface EditorFactory<GameObject,MapArchObject,Archetype>@NotNull public @NotNull java.lang.String getCompassIconName()
EditorFactorygetCompassIconName in interface EditorFactory<GameObject,MapArchObject,Archetype>null to display no icon@NotNull public @NotNull java.lang.String getGridartaJarFilename()
EditorFactorygetGridartaJarFilename in interface EditorFactory<GameObject,MapArchObject,Archetype>@NotNull public @NotNull javax.swing.filechooser.FileFilter getMapFileFilter()
EditorFactorygetMapFileFilter in interface EditorFactory<GameObject,MapArchObject,Archetype>public int[] getLockedItemsTypeNumbers()
EditorFactorygetLockedItemsTypeNumbers in interface EditorFactory<GameObject,MapArchObject,Archetype>public boolean isAutoValidatorDefault()
EditorFactoryisAutoValidatorDefault in interface EditorFactory<GameObject,MapArchObject,Archetype>