Class EventsTab<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
- java.lang.Object
-
- net.sf.gridarta.gui.panel.gameobjectattributes.AbstractGameObjectAttributesTab<G,A,R>
-
- net.sf.gridarta.gui.panel.gameobjectattributes.EventsTab<G,A,R>
-
- All Implemented Interfaces:
GameObjectAttributesTab<G,A,R>
public class EventsTab<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> extends AbstractGameObjectAttributesTab<G,A,R>
The "Events" tab in the game object attributes panel.
-
-
Constructor Summary
Constructors Constructor Description EventsTab(@NotNull java.awt.Frame parent, @NotNull MapManager<G,A,R> mapManager, @NotNull GameObjectAttributesModel<G,A,R> gameObjectAttributesModel, @NotNull ScriptArchEditor<G,A,R> scriptArchEditor, @NotNull ScriptArchData<G,A,R> scriptArchData, @NotNull ScriptArchDataUtils<G,A,R> scriptArchDataUtils, @NotNull ScriptArchUtils scriptArchUtils)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactivate()Sets the focus to this component.protected voidapply(G gameObject)Applies settings to the given game object.booleancanApply()Returns whether a selected game object exists and the current value differs from the initially set value.voideventAddNew()Action method for creating a new event.voideventEdit()Action method for editing an existing event.voideventEditData()Action method for editing the data of an existing event.voideventRemove()Action method for removing an existing event.@NotNull javax.swing.JPanelgetPanel()Creates the contents panel.protected voidrefresh(G gameObject)Refreshes the display.-
Methods inherited from class net.sf.gridarta.gui.panel.gameobjectattributes.AbstractGameObjectAttributesTab
addAutoApply, addGameObjectAttributesTabListener, apply, getSelectedGameObject, getTabSeverity, removeGameObjectAttributesTabListener, setTabSeverity
-
-
-
-
Constructor Detail
-
EventsTab
public EventsTab(@NotNull @NotNull java.awt.Frame parent, @NotNull @NotNull MapManager<G,A,R> mapManager, @NotNull @NotNull GameObjectAttributesModel<G,A,R> gameObjectAttributesModel, @NotNull @NotNull ScriptArchEditor<G,A,R> scriptArchEditor, @NotNull @NotNull ScriptArchData<G,A,R> scriptArchData, @NotNull @NotNull ScriptArchDataUtils<G,A,R> scriptArchDataUtils, @NotNull @NotNull ScriptArchUtils scriptArchUtils)Creates a new instance.- Parameters:
parent- the parent frame for dialog boxesmapManager- the map managergameObjectAttributesModel- the model to trackscriptArchEditor- the script arch editor instance to usescriptArchData- the script arch data instance to usescriptArchDataUtils- the script arch data utils to usescriptArchUtils- the script arch utils to use
-
-
Method Detail
-
getPanel
@NotNull public @NotNull javax.swing.JPanel getPanel()
Description copied from interface:GameObjectAttributesTabCreates the contents panel.- Returns:
- the contents panel
-
canApply
public boolean canApply()
Description copied from interface:GameObjectAttributesTabReturns whether a selected game object exists and the current value differs from the initially set value.- Returns:
- whether
apply()should be called
-
activate
public void activate()
Description copied from interface:GameObjectAttributesTabSets the focus to this component.
-
refresh
protected final void refresh(@Nullable G gameObject)Description copied from class:AbstractGameObjectAttributesTabRefreshes the display.- Specified by:
refreshin classAbstractGameObjectAttributesTab<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>- Parameters:
gameObject- the game object to set the contents from
-
apply
protected void apply(@NotNull G gameObject)Description copied from class:AbstractGameObjectAttributesTabApplies settings to the given game object.- Specified by:
applyin classAbstractGameObjectAttributesTab<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>- Parameters:
gameObject- the game object to set the contents of
-
eventAddNew
@ActionMethod public void eventAddNew()
Action method for creating a new event.
-
eventEditData
@ActionMethod public void eventEditData()
Action method for editing the data of an existing event.
-
eventEdit
@ActionMethod public void eventEdit()
Action method for editing an existing event.
-
eventRemove
@ActionMethod public void eventRemove()
Action method for removing an existing event.
-
-