public class PluginController<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> extends java.lang.Object implements EditorAction
| Constructor and Description |
|---|
PluginController(FilterControl<G,A,R> filterControl,
PluginModel<G,A,R> pluginModel,
PluginParameters pluginParameters,
java.awt.Component parent,
PluginParameterViewFactory<G,A,R> pluginParameterViewFactory,
java.io.File pluginsDir,
ResourceIcons resourceIcons)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canExit()
Prompts the user for all unsaved plugins.
|
javax.swing.Action |
createRunAction(Plugin<G,A,R> plugin)
Creates an action to run a plugin plugin.
|
PluginView<G,A,R> |
getView() |
void |
runPlugin(Plugin<G,A,R> plugin) |
void |
runPlugin(java.lang.String name) |
void |
saveAllPlugins()
Saves all modified plugins.
|
boolean |
savePluginAs(Plugin<G,A,R> plugin,
boolean updatePluginFile)
Prompts the user for a file name to save a plugin.
|
void |
setAction(javax.swing.Action action,
java.lang.String name)
Sets the
Action instance for this editor action. |
public PluginController(@NotNull
FilterControl<G,A,R> filterControl,
@NotNull
PluginModel<G,A,R> pluginModel,
@NotNull
PluginParameters pluginParameters,
@NotNull
java.awt.Component parent,
@NotNull
PluginParameterViewFactory<G,A,R> pluginParameterViewFactory,
@NotNull
java.io.File pluginsDir,
@NotNull
ResourceIcons resourceIcons)
public boolean canExit()
public void saveAllPlugins()
public boolean savePluginAs(@NotNull
Plugin<G,A,R> plugin,
boolean updatePluginFile)
plugin - the plugin to saveupdatePluginFile - if set, update the plugin file to the save
location@ActionMethod
public void runPlugin(@NotNull
java.lang.String name)
@NotNull public PluginView<G,A,R> getView()
@NotNull
public javax.swing.Action createRunAction(@NotNull
Plugin<G,A,R> plugin)
plugin - the plugin to runpublic void setAction(@NotNull
javax.swing.Action action,
@NotNull
java.lang.String name)
Action instance for this editor action.setAction in interface EditorActionaction - the action instancename - the name of the action