 |
Gridarta Editor
|
Go to the documentation of this file.
20 package net.sf.gridarta.gui.scripts;
22 import java.util.ArrayList;
23 import java.util.HashMap;
24 import java.util.List;
26 import java.util.Vector;
27 import javax.swing.JList;
32 import org.jetbrains.annotations.NotNull;
33 import org.jetbrains.annotations.Nullable;
66 private final List<String>
eventNames =
new ArrayList<>();
78 final int eventType = pair.getFirst();
79 final String eventName = pair.getSecond();
80 add(eventType, eventName);
89 private void add(
final int eventType, @NotNull
final String eventName) {
118 }
catch (
final NullPointerException ignored) {
132 final Vector<String> content =
new Vector<>();
139 list.setListData(content);
140 list.setSelectedIndex(0);
final Map< Integer, String > allEventTypes
Maps event type to event name.
Base package of all Gridarta classes.
void addEventsToJList(@NotNull final JList< String > list, @NotNull final Iterable<? extends GameObject<?, ?, ?>> gameObject)
Set all ScriptedEvents to appear in the given JList This method should be fast because it may be exec...
Common types for event archetypes.
final String subtypeAttribute
The attribute name for the subtype field.
Reflects a game object (object on a map).
final Map< Integer, Integer > indexToEventType
Maps index into eventNames to event type.
String getEventType(final int eventType)
Returns the type name for an event type.
String[] getEventNames()
Returns all event names.
final List< String > eventNames
All event names.
GameObjects are the objects based on Archetypes found on maps.
int indexToEventType(final int index)
Converts a combo box index to an event type.
This document describes some hints and requirements for general development on the CrossfireEditor If you plan to make changes to the editor code or setup please read the following and keep it in derived from a basic editor application called Gridder by Pasi Ker�nen so please communicate with best through the cf devel mailing list
AbstractScriptArchUtils(@NotNull final Iterable< Pair< Integer, String >> eventTypes, @NotNull final String subtypeAttribute, final int eventTypeNo)
Creates a new instance.
void add(final int eventType, @NotNull final String eventName)
Adds on event description.
String typeName(final int eventType)
Returns a human readable name for an event type.
final int eventTypeNo
The object type for event objects.