Class PluginView<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.PluginView<G,A,R>
-
public class PluginView<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> extends java.lang.ObjectView for Scripts.
-
-
Constructor Summary
Constructors Constructor Description PluginView(@NotNull PluginController<G,A,R> pluginController, @NotNull PluginModel<G,A,R> pluginModel, @NotNull PluginParameterViewFactory<G,A,R> pluginParameterViewFactory, @NotNull ResourceIcons resourceIcons)Creates a PluginView.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull bsh.ConsoleInterfacecreateConsole(@NotNull java.lang.String name)@Nullable java.util.Map<java.lang.String,java.lang.Object>getRunValues(@NotNull Plugin<G,A,R> plugin, @NotNull java.awt.Component parent)Asks the user for input parameter to run a plugin.voidsetMenu(@Nullable javax.swing.JMenu menuScripts)Set the menu to add script commands to.
-
-
-
Constructor Detail
-
PluginView
public PluginView(@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 PluginView.- Parameters:
pluginController- controller of this PluginViewpluginModel- the script modelresourceIcons- the resource icons for creating icons- Warning:
- Creating a view from a controller instead of a model is error prone.
-
-
Method Detail
-
setMenu
public void setMenu(@Nullable @Nullable javax.swing.JMenu menuScripts)Set the menu to add script commands to. Entries already present in the menu are deleted.- Parameters:
menuScripts- the plugins menu
-
createConsole
@NotNull public @NotNull bsh.ConsoleInterface createConsole(@NotNull @NotNull java.lang.String name)
-
getRunValues
@Nullable public @Nullable java.util.Map<java.lang.String,java.lang.Object> getRunValues(@NotNull @NotNull Plugin<G,A,R> plugin, @NotNull @NotNull java.awt.Component parent)Asks the user for input parameter to run a plugin.- Parameters:
plugin- the pluginparent- the parent component for dialogs- Returns:
- the input parameters or
nullto not run the plugin
-
-