Class PluginEditor<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
- java.lang.Object
-
- net.sf.gridarta.gui.dialog.plugin.PluginEditor<G,A,R>
-
public class PluginEditor<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description PluginEditor(@NotNull Plugin<G,A,R> plugin, @NotNull PluginController<G,A,R> pluginController, @NotNull PluginModel<G,A,R> pluginModel, @NotNull PluginParameterViewFactory<G,A,R> pluginParameterViewFactory, @NotNull ResourceIcons resourceIcons)Creates a visual JComponent used to edit the given script.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull java.awt.ComponentgetComponent()Returns theComponentfor this plugin editor.booleanisPluginEditorIsAutoRun()Action method for option to run the editor script automatically.booleanisPluginIsEditorFilter()Action method for option to make an editor script a map filter.booleanisPluginIsScript()Action method for option to add an editor script to the plugins menu.voidpluginEditorAddParameter()Action method to add a parameter to the current plugin script.voidpluginEditorExport()Action method to export the current plugin as an XML file.voidpluginEditorRemoveParameter()Action method to remove the selected parameter from the current plugin script.voidpluginEditorReRegister()Action method to re-register the current plugin.voidpluginEditorRunScript()Action method to execute the selected plugin script.voidsetPluginEditorIsAutoRun(boolean autoRun)Action method for option to run the editor script automatically.voidsetPluginIsEditorFilter(boolean filter)Action method for option to run the editor script automatically.voidsetPluginIsScript(boolean script)Action method for option to add the script to the plugins menu.
-
-
-
Constructor Detail
-
PluginEditor
public PluginEditor(@NotNull @NotNull Plugin<G,A,R> plugin, @NotNull @NotNull PluginController<G,A,R> pluginController, @NotNull @NotNull PluginModel<G,A,R> pluginModel, @NotNull @NotNull PluginParameterViewFactory<G,A,R> pluginParameterViewFactory, @NotNull @NotNull ResourceIcons resourceIcons)Creates a visual JComponent used to edit the given script.- Parameters:
plugin- the script object to editpluginController- the associated script control instanceresourceIcons- the resource icons for creating icons
-
-
Method Detail
-
getComponent
@NotNull public @NotNull java.awt.Component getComponent()
Returns theComponentfor this plugin editor.- Returns:
- the component
-
isPluginEditorIsAutoRun
@ActionMethod public boolean isPluginEditorIsAutoRun()
Action method for option to run the editor script automatically.- Returns:
- whether auto-run is enabled
-
setPluginEditorIsAutoRun
@ActionMethod public void setPluginEditorIsAutoRun(boolean autoRun)
Action method for option to run the editor script automatically.- Parameters:
autoRun- whether auto-run is enabled
-
isPluginIsEditorFilter
@ActionMethod public boolean isPluginIsEditorFilter()
Action method for option to make an editor script a map filter.- Returns:
- whether the editor script is a map filter
-
setPluginIsEditorFilter
@ActionMethod public void setPluginIsEditorFilter(boolean filter)
Action method for option to run the editor script automatically.- Parameters:
filter- whether the editor script is a filter
-
isPluginIsScript
@ActionMethod public boolean isPluginIsScript()
Action method for option to add an editor script to the plugins menu.- Returns:
- whether the editor script should be added to the plugins menu
-
setPluginIsScript
@ActionMethod public void setPluginIsScript(boolean script)
Action method for option to add the script to the plugins menu.- Parameters:
script- whether the editor script should be added to the plugins menu
-
pluginEditorReRegister
@ActionMethod public void pluginEditorReRegister()
Action method to re-register the current plugin.
-
pluginEditorExport
@ActionMethod public void pluginEditorExport()
Action method to export the current plugin as an XML file.
-
pluginEditorAddParameter
@ActionMethod public void pluginEditorAddParameter()
Action method to add a parameter to the current plugin script.
-
pluginEditorRemoveParameter
@ActionMethod public void pluginEditorRemoveParameter()
Action method to remove the selected parameter from the current plugin script.
-
pluginEditorRunScript
@ActionMethod public void pluginEditorRunScript()
Action method to execute the selected plugin script.
-
-