 |
Gridarta Editor
|
Go to the documentation of this file.
20 package net.sf.gridarta.gui.scripts;
22 import java.awt.Frame;
23 import javax.swing.JList;
24 import javax.swing.JOptionPane;
32 import org.apache.log4j.Category;
33 import org.apache.log4j.Logger;
34 import org.jetbrains.annotations.NotNull;
103 for (
final G tmp : gameObject) {
105 if (eventCount == eventIndex) {
113 if (oldEvent ==
null) {
114 LOG.error(
"Error in modifyEventScript(): No event selected?");
122 case EVENT_EDIT_PATH:
127 if (JOptionPane.showConfirmDialog(panelList,
"Are you sure you want to remove this \"" +
scriptArchUtils.
typeName(event.getEventType()) +
"\" event which is\n" +
"linked to the script: '" + event.getScriptPath() +
"'?\n" +
"(The script file itself is not going to be deleted)",
"Confirm", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE) == JOptionPane.YES_OPTION) {
Factory for creating ScriptedEvent instances.
static final Category LOG
The Logger for printing log messages.
A MapManager manages all opened maps.
Base package of all Gridarta classes.
final ScriptArchUtils scriptArchUtils
The ScriptArchUtils instance to use.
Common types for event archetypes.
void openScript(@NotNull final MapManager<?, ?, ?> mapManager, @NotNull final String scriptPath, @NotNull final Component parent)
Opens the script pad to display a script.
Reflects a game object (object on a map).
final int eventTypeNo
The object type for event objects.
Class which stores information about one scripted event.
GameObjects are the objects based on Archetypes found on maps.
Interface for MapArchObjects.
final ScriptedEventEditor< G, A, R > scriptedEventEditor
The ScriptedEventEditor to use.
Parameter for operation to perform in ScriptTask, javax.swing.JList, net.sf.gridarta....
String typeName(int eventType)
Returns a human readable name for an event type.
ScriptedEvent< G, A, R > newScriptedEvent(int eventType, @NotNull String pluginName, @NotNull String scriptPath, @NotNull String options)
Creates a new ScriptedEvent instance.
final ScriptedEventFactory< G, A, R > scriptedEventFactory
The ScriptedEventFactory instance to use.
ScriptArchDataUtils(final int eventTypeNo, @NotNull final ScriptArchUtils scriptArchUtils, @NotNull final ScriptedEventFactory< G, A, R > scriptedEventFactory, @NotNull final ScriptedEventEditor< G, A, R > scriptedEventEditor)
Creates a new instance.
void modifyEventScript(final int eventIndex, final ScriptTask task, @NotNull final JList< String > panelList, @NotNull final MapManager<?, ?, ?> mapManager, @NotNull final Frame parent, @NotNull final Iterable< G > gameObject)
If there is a scripted event of the specified type, the script pad is opened and the appropriate scri...
void addEventsToJList(@NotNull JList< String > list, @NotNull Iterable<? extends GameObject<?, ?, ?>> gameObject)
Set all ScriptedEvents to appear in the given JList This method should be fast because it may be exec...
void editParameters(@NotNull final ScriptedEvent< G, A, R > scriptedEvent, @NotNull final Frame parent)
Edit path and plugin name for an event.
net.sf.gridarta.model.scripts.ScriptArchData related functions.