 |
Gridarta Editor
|
Go to the documentation of this file.
20 package net.sf.gridarta.gui.scripts;
22 import java.awt.Component;
23 import javax.swing.Action;
24 import javax.swing.JFileChooser;
31 import net.
sf.japi.swing.action.ActionMethod;
32 import org.jetbrains.annotations.NotNull;
67 final JFileChooser choose =
new JFileChooser();
68 choose.setDialogTitle(
"import plugin");
70 if (choose.showOpenDialog(
parent) == JFileChooser.APPROVE_OPTION) {
76 public void setAction(@NotNull
final Action action, @NotNull
final String
name) {
The action for importing a plugin from a file.
Base package of all Gridarta classes.
boolean addPlugin(@NotNull final Plugin< G, A, R > plugin)
Add a new plugin.
static void sanitizeCurrentDirectory(@NotNull final JFileChooser fileChooser)
Makes sure the current directory of a JFileChooser is valid.
Reflects a game object (object on a map).
ImportPluginAction(@NotNull final PluginModel< G, A, R > pluginModel, @NotNull final Component parent)
Creates a new instance.
void setAction(@NotNull final Action action, @NotNull final String name)
Sets the Action instance for this editor action.
GameObjects are the objects based on Archetypes found on maps.
Interface for MapArchObjects.
void importPlugin()
Import a plugin from a file.
final Component parent
The parent component for dialog boxes.
Utility class for JFileChooser related functions.
final PluginModel< G, A, R > pluginModel
The plugin model to update.