public abstract class AbstractScriptArchUtils extends java.lang.Object implements ScriptArchUtils
Modifier | Constructor and Description |
---|---|
protected |
AbstractScriptArchUtils(@NotNull java.lang.Iterable<Pair<java.lang.Integer,java.lang.String>> eventTypes,
@NotNull java.lang.String subtypeAttribute,
int eventTypeNo)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addEventsToJList(@NotNull javax.swing.JList<java.lang.String> list,
@NotNull java.lang.Iterable<? extends GameObject<?,?,?>> gameObject)
Set all ScriptedEvents to appear in the given JList This method should be
fast because it may be executed when user clicks on map objects.
|
@NotNull java.lang.String[] |
getEventNames()
Returns all event names.
|
protected @Nullable java.lang.String |
getEventType(int eventType)
Returns the type name for an event type.
|
int |
indexToEventType(int index)
Converts a combo box index to an event type.
|
@NotNull java.lang.String |
typeName(int eventType)
Returns a human readable name for an event type.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getArchetypeNameForEventType
protected AbstractScriptArchUtils(@NotNull @NotNull java.lang.Iterable<Pair<java.lang.Integer,java.lang.String>> eventTypes, @NotNull @NotNull java.lang.String subtypeAttribute, int eventTypeNo)
eventTypes
- the event typessubtypeAttribute
- the attribute name for the subtype fieldeventTypeNo
- the object type for event objects@NotNull public @NotNull java.lang.String typeName(int eventType)
ScriptArchUtils
typeName
in interface ScriptArchUtils
eventType
- the event type@Nullable protected @Nullable java.lang.String getEventType(int eventType)
eventType
- the event typenull
for invalid event typespublic int indexToEventType(int index)
ScriptArchUtils
indexToEventType
in interface ScriptArchUtils
index
- the combo box index@NotNull public @NotNull java.lang.String[] getEventNames()
ScriptArchUtils
getEventNames
in interface ScriptArchUtils
public void addEventsToJList(@NotNull @NotNull javax.swing.JList<java.lang.String> list, @NotNull @NotNull java.lang.Iterable<? extends GameObject<?,?,?>> gameObject)
ScriptArchUtils
addEventsToJList
in interface ScriptArchUtils
list
- the JList
gameObject
- the game object to operate on