net.sf.gridarta.gui.scripts
public class DefaultScriptArchEditor<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> extends Object implements ScriptArchEditor<G,A,R>
Modifier and Type | Field and Description |
---|---|
private static net.sf.japi.swing.action.ActionBuilder |
ACTION_BUILDER
Action Builder.
|
private JComboBox |
eventTypeBox |
private GlobalSettings |
globalSettings
The
GlobalSettings to use. |
private JLabel |
headingLabel |
private JTextComponent |
inputOptions |
private JTextComponent |
inputScriptPath |
private MapManager<?,?,?> |
mapManager
The
MapManager to use. |
private JDialog |
newScriptFrame |
private PathButtonListener<G,A,R> |
nsOkListener |
private PathManager |
pathManager
The
PathManager for converting path names. |
private JComboBox |
pluginNameBox |
private ScriptArchUtils |
scriptArchUtils
The
ScriptArchUtils instance to use. |
private ScriptedEventFactory<G,A,R> |
scriptedEventFactory
The
ScriptedEventFactory instance to use. |
private ScriptEditControl |
scriptEditControl
The
ScriptEditControl to use. |
private String |
scriptEnding
The ending for scripts.
|
private FileFilter |
scriptFileFilter |
Constructor and Description |
---|
DefaultScriptArchEditor(ScriptedEventFactory<G,A,R> scriptedEventFactory,
String scriptEnding,
String name,
ScriptArchUtils scriptArchUtils,
FileFilter scriptFileFilter,
GlobalSettings globalSettings,
MapManager<?,?,?> mapManager,
PathManager pathManager)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addEventScript(G gameObject,
ScriptArchData<G,A,R> scriptArchData,
Frame parent)
A popup is opened and the user can create a new scripting event which
gets attached to this gameObject.
|
private static JComboBox |
createEventTypeBox(ScriptArchUtils scriptArchUtils) |
void |
createNewEvent(JDialog frame,
ScriptArchData<G,A,R> scriptArchData,
G gameObject) |
void |
setScriptEditControl(ScriptEditControl scriptEditControl)
Deprecated.
|
@NotNull private static final net.sf.japi.swing.action.ActionBuilder ACTION_BUILDER
@NotNull private final ScriptArchUtils scriptArchUtils
ScriptArchUtils
instance to use.@NotNull private final String scriptEnding
@NotNull private final PathManager pathManager
PathManager
for converting path names.@Nullable private ScriptEditControl scriptEditControl
ScriptEditControl
to use.@NotNull private final JComboBox eventTypeBox
@NotNull private final FileFilter scriptFileFilter
@NotNull private final GlobalSettings globalSettings
GlobalSettings
to use.@NotNull private final MapManager<?,?,?> mapManager
MapManager
to use.@NotNull private final JComboBox pluginNameBox
@Nullable private JDialog newScriptFrame
@NotNull private JLabel headingLabel
@NotNull private JTextComponent inputScriptPath
@NotNull private JTextComponent inputOptions
@NotNull private PathButtonListener<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> nsOkListener
@NotNull private final ScriptedEventFactory<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> scriptedEventFactory
ScriptedEventFactory
instance to use.public DefaultScriptArchEditor(@NotNull ScriptedEventFactory<G,A,R> scriptedEventFactory, String scriptEnding, String name, @NotNull ScriptArchUtils scriptArchUtils, @NotNull FileFilter scriptFileFilter, @NotNull GlobalSettings globalSettings, @NotNull MapManager<?,?,?> mapManager, @NotNull PathManager pathManager)
scriptedEventFactory
- the scripted event factory instance to usescriptEnding
- the suffix for script filesname
- the default event typescriptArchUtils
- the script arch utils to usescriptFileFilter
- the script file filter to useglobalSettings
- the global settings to usemapManager
- the map manager instance to usepathManager
- the path manager for converting path names@NotNull private static JComboBox createEventTypeBox(@NotNull ScriptArchUtils scriptArchUtils)
@Deprecated public void setScriptEditControl(@Nullable ScriptEditControl scriptEditControl)
setScriptEditControl
in interface ScriptArchEditor<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
public void addEventScript(G gameObject, ScriptArchData<G,A,R> scriptArchData, @NotNull Frame parent)
addEventScript
in interface ScriptArchEditor<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
gameObject
- the game object to add event toscriptArchData
- the ScriptArchData
instance to
displayparent
- the parent frame for the editorpublic void createNewEvent(@NotNull JDialog frame, @NotNull ScriptArchData<G,A,R> scriptArchData, @NotNull G gameObject)
createNewEvent
in interface ScriptArchEditor<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
Feedback: webmaster
© 2003-2010 The Gridarta Developers. All rights reserved.