Package net.sf.gridarta.maincontrol
Interface EditorFactory<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
-
- All Superinterfaces:
ProjectFactory<G,A,R>
- All Known Implementing Classes:
DefaultEditorFactory,DefaultEditorFactory,DefaultEditorFactory
public interface EditorFactory<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> extends ProjectFactory<G,A,R>
A factory to create editor-dependent objects.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NotNull net.sf.japi.swing.prefs.PreferencesGroupcreatePreferencesGroup(@NotNull ProjectSettings projectSettings, @NotNull EditorSettings editorSettings, @NotNull DelegatingMapValidator<G,A,R> validators, @NotNull AppPreferencesModel appPreferencesModel, @NotNull ExitConnectorModel exitConnectorModel, @NotNull ConfigSourceFactory configSourceFactory)Creates a newPreferencesGroupinstance.@NotNull CacheFilesgetCacheFiles()Returns the cache files for icon and preview images.@Nullable java.lang.StringgetCompassIconName()Returns the icon name to display in the selected square view.@NotNull Direction @NotNull []getDirectionMap()Returns a map of relative direction to map window direction.@NotNull java.lang.StringgetGridartaJarFilename()Returns the filename of the editor's .jar file.int @NotNull []getLockedItemsTypeNumbers()Returns the type numbers of game objects being locked items.@NotNull javax.swing.filechooser.FileFiltergetMapFileFilter()Returns the file filter for map files.@NotNull java.lang.StringgetScriptExtension()Returns the extension for script files.@NotNull javax.swing.filechooser.FileFiltergetScriptFileFilter()Returns theFileFilterfor script files.@NotNull java.lang.StringgetScriptName()Returns the display name for script files.intgetUndefinedSpellIndex()Returns the index for "no spell".booleanisAllowRandomMapParameters()Returns whether exit paths may point to random map parameters.booleanisAutoValidatorDefault()Returns whether the auto validator is enabled by default.booleanisCreateDirectionPane()Returns whether the direction panel should be created.@NotNull MapPropertiesDialogFactory<G,A,R>newMapPropertiesDialogFactory(@NotNull ProjectSettings projectSettings, @NotNull MapManager<G,A,R> mapManager)Creates a newMapPropertiesDialogFactoryinstance.@NotNull MapViewFactory<G,A,R>newMapViewFactory(@NotNull RendererFactory<G,A,R> rendererFactory, @NotNull PathManager pathManager)Creates a newMapViewFactoryinstance.@NotNull NewMapDialogFactory<G,A,R>newNewMapDialogFactory(@NotNull MapViewsManager<G,A,R> mapViewsManager, @NotNull MapArchObjectFactory<A> mapArchObjectFactory, @NotNull PickmapChooserView<G,A,R> pickmapChooserView, @NotNull java.awt.Component parent)Creates a newNewMapDialogFactoryinstance.@NotNull ProjectSettingsnewProjectSettings(@NotNull EditorSettings editorSettings)Creates a newProjectSettingsinstance.@NotNull 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 newRendererFactoryinstance.@NotNull ScriptArchData<G,A,R>newScriptArchData()Creates a newScriptArchDatainstance.@NotNull ScriptArchDataUtils<G,A,R>newScriptArchDataUtils(@NotNull ScriptArchUtils scriptArchUtils, @NotNull ScriptedEventFactory<G,A,R> scriptedEventFactory, @NotNull ScriptedEventEditor<G,A,R> scriptedEventEditor)Creates a newScriptArchDataUtilsinstance.@NotNull ScriptArchUtilsnewScriptArchUtils(@NotNull ArchetypeTypeList eventTypes)Creates a newScriptArchUtilsinstance.@NotNull 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 newScriptedEventFactoryinstance.@Nullable EditorActionnewServerActions(@NotNull FileControl<G,A,R> fileControl)Creates the "open in client" action.-
Methods inherited from interface net.sf.gridarta.project.ProjectFactory
getDoubleFaceOffset, getIncludeFaceNumbers, getScriptsDir, getSpellFile, getSpellType, loadAttributeRangeChecker, newArchetypeFactory, newArchetypeParser, newArchetypeSet, newGameObjectFactory, newGameObjectParserFactory, newMapArchObjectFactory, newMapArchObjectParserFactory, newMapControlFactory, newResources
-
-
-
-
Method Detail
-
newProjectSettings
@NotNull @NotNull ProjectSettings newProjectSettings(@NotNull @NotNull EditorSettings editorSettings)
Creates a newProjectSettingsinstance.- Parameters:
editorSettings- the editor settings instance for default values- Returns:
- the new instance
-
newScriptArchUtils
@NotNull @NotNull ScriptArchUtils newScriptArchUtils(@NotNull @NotNull ArchetypeTypeList eventTypes)
Creates a newScriptArchUtilsinstance.- Parameters:
eventTypes- the event types to use- Returns:
- the new instance
-
newScriptedEventFactory
@NotNull @NotNull ScriptedEventFactory<G,A,R> newScriptedEventFactory(@NotNull @NotNull ScriptArchUtils scriptArchUtils, @NotNull @NotNull GameObjectFactory<G,A,R> gameObjectFactory, @NotNull @NotNull ScriptedEventEditor<G,A,R> scriptedEventEditor, @NotNull @NotNull ArchetypeSet<G,A,R> archetypeSet)
Creates a newScriptedEventFactoryinstance.- Parameters:
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- Returns:
- the new instance
-
newScriptArchData
@NotNull @NotNull ScriptArchData<G,A,R> newScriptArchData()
Creates a newScriptArchDatainstance.- Returns:
- the new instance
-
newScriptArchDataUtils
@NotNull @NotNull ScriptArchDataUtils<G,A,R> newScriptArchDataUtils(@NotNull @NotNull ScriptArchUtils scriptArchUtils, @NotNull @NotNull ScriptedEventFactory<G,A,R> scriptedEventFactory, @NotNull @NotNull ScriptedEventEditor<G,A,R> scriptedEventEditor)
Creates a newScriptArchDataUtilsinstance.- Parameters:
scriptArchUtils- the script arch utils to usescriptedEventFactory- the scripted event factory to usescriptedEventEditor- the scripted event editor to use- Returns:
- the new instance
-
newRendererFactory
@NotNull @NotNull RendererFactory<G,A,R> newRendererFactory(@NotNull @NotNull MapViewSettings mapViewSettings, @NotNull @NotNull FilterControl<G,A,R> filterControl, @NotNull @NotNull GameObjectParser<G,A,R> gameObjectParser, @NotNull @NotNull FaceObjectProviders faceObjectProviders, @NotNull @NotNull ResourceIcons resourceIcons, @NotNull @NotNull SmoothFaces smoothFaces)
Creates a newRendererFactoryinstance.- Parameters:
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- Returns:
- the new instance
-
newMapViewFactory
@NotNull @NotNull MapViewFactory<G,A,R> newMapViewFactory(@NotNull @NotNull RendererFactory<G,A,R> rendererFactory, @NotNull @NotNull PathManager pathManager)
Creates a newMapViewFactoryinstance.- Parameters:
rendererFactory- the renderer factory to usepathManager- the path manager for converting path names view factories- Returns:
- the new instance
-
newMapPropertiesDialogFactory
@NotNull @NotNull MapPropertiesDialogFactory<G,A,R> newMapPropertiesDialogFactory(@NotNull @NotNull ProjectSettings projectSettings, @NotNull @NotNull MapManager<G,A,R> mapManager)
Creates a newMapPropertiesDialogFactoryinstance.- Parameters:
projectSettings- the project settings to usemapManager- the map manager to use- Returns:
- the new instance
-
newNewMapDialogFactory
@NotNull @NotNull NewMapDialogFactory<G,A,R> newNewMapDialogFactory(@NotNull @NotNull MapViewsManager<G,A,R> mapViewsManager, @NotNull @NotNull MapArchObjectFactory<A> mapArchObjectFactory, @NotNull @NotNull PickmapChooserView<G,A,R> pickmapChooserView, @NotNull @NotNull java.awt.Component parent)
Creates a newNewMapDialogFactoryinstance.- Parameters:
mapViewsManager- the map viewsmapArchObjectFactory- the map arch object factory instancepickmapChooserView- the pickmap chooser view for creating new pickmapsparent- the parent component of the dialogs- Returns:
- the new new map dialog factory instance
-
createPreferencesGroup
@NotNull @NotNull net.sf.japi.swing.prefs.PreferencesGroup createPreferencesGroup(@NotNull @NotNull ProjectSettings projectSettings, @NotNull @NotNull EditorSettings editorSettings, @NotNull @NotNull DelegatingMapValidator<G,A,R> validators, @NotNull @NotNull AppPreferencesModel appPreferencesModel, @NotNull @NotNull ExitConnectorModel exitConnectorModel, @NotNull @NotNull ConfigSourceFactory configSourceFactory)Creates a newPreferencesGroupinstance.- Parameters:
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- Returns:
- the new instance
-
newServerActions
@Nullable @Nullable EditorAction newServerActions(@NotNull @NotNull FileControl<G,A,R> fileControl)
Creates the "open in client" action. Does nothing if this editor does not support this action.- Parameters:
fileControl- the file control for saving maps- Returns:
- the action or
null
-
getScriptFileFilter
@NotNull @NotNull javax.swing.filechooser.FileFilter getScriptFileFilter()
Returns theFileFilterfor script files.- Returns:
- the file filter
-
getScriptExtension
@NotNull @NotNull java.lang.String getScriptExtension()
Returns the extension for script files.- Returns:
- the extension
-
getScriptName
@NotNull @NotNull java.lang.String getScriptName()
Returns the display name for script files.- Returns:
- the display name
-
isCreateDirectionPane
boolean isCreateDirectionPane()
Returns whether the direction panel should be created.- Returns:
- whether the direction panel should be created
-
getUndefinedSpellIndex
int getUndefinedSpellIndex()
Returns the index for "no spell".- Returns:
- tne index
-
getCacheFiles
@NotNull @NotNull CacheFiles getCacheFiles()
Returns the cache files for icon and preview images.- Returns:
- the cache files
-
getDirectionMap
@NotNull @NotNull Direction @NotNull [] getDirectionMap()
Returns a map of relative direction to map window direction.- Returns:
- the map
-
isAllowRandomMapParameters
boolean isAllowRandomMapParameters()
Returns whether exit paths may point to random map parameters.- Returns:
- whether exit paths may point to random map parameters
-
getCompassIconName
@Nullable @Nullable java.lang.String getCompassIconName()
Returns the icon name to display in the selected square view.- Returns:
- the icon name or
nullto display no icon
-
getGridartaJarFilename
@NotNull @NotNull java.lang.String getGridartaJarFilename()
Returns the filename of the editor's .jar file.- Returns:
- the filename
-
getMapFileFilter
@NotNull @NotNull javax.swing.filechooser.FileFilter getMapFileFilter()
Returns the file filter for map files.- Returns:
- the file filter for map files
-
getLockedItemsTypeNumbers
int @NotNull [] getLockedItemsTypeNumbers()
Returns the type numbers of game objects being locked items.- Returns:
- the type numbers
-
isAutoValidatorDefault
boolean isAutoValidatorDefault()
Returns whether the auto validator is enabled by default.- Returns:
- whether the auto validator is enabled by default
-
-