 |
Gridarta Editor
|
Go to the documentation of this file.
20 package net.sf.gridarta.gui.panel.gameobjectattributes;
22 import java.awt.Component;
23 import java.awt.event.FocusEvent;
24 import java.awt.event.FocusListener;
25 import java.util.ArrayList;
26 import java.util.Collection;
31 import org.jetbrains.annotations.NotNull;
32 import org.jetbrains.annotations.Nullable;
43 private final Collection<GameObjectAttributesTabListener<G, A, R>>
listeners =
new ArrayList<>();
65 public void focusGained(
final FocusEvent e) {
70 public void focusLost(
final FocusEvent e) {
90 public void refreshSelectedGameObject() {
95 gameObjectAttributesModel.addGameObjectAttributesModelListener(gameObjectAttributesModelListener);
140 protected abstract void refresh(@Nullable G gameObject);
146 protected abstract void apply(@NotNull G gameObject);
GameObject< G, A, R > getSelectedGameObject()
Returns the currently selected GameObject.
Severity getTabSeverity()
Base package of all Gridarta classes.
G selectedGameObject
The currently selected game object.
final Collection< GameObjectAttributesTabListener< G, A, R > > listeners
The registered listeners.
AbstractGameObjectAttributesTab(@NotNull final GameObjectAttributesModel< G, A, R > gameObjectAttributesModel)
Creates a new instance.
A tab in the game object attributes panel.
Reflects a game object (object on a map).
Base class for GameObjectAttributesTab implementations.
Graphical User Interface of Gridarta.
Severity levels for colors of tabs.
final FocusListener focusListener
The focus listener to implement auto-applying.
GameObjects are the objects based on Archetypes found on maps.
void removeGameObjectAttributesTabListener(@NotNull final GameObjectAttributesTabListener< G, A, R > listener)
Interface for MapArchObjects.
abstract void refresh(@Nullable G gameObject)
Refreshes the display.
void addAutoApply(@NotNull final Component component)
Registers a component that auto-applies when the focus is lost.
Severity tabSeverity
The tab severity.
void setTabSeverity(@NotNull final Severity tabSeverity)
Sets the tab severity.
void fireApply()
Notify all listeners to apply the changes.
void addGameObjectAttributesTabListener(@NotNull final GameObjectAttributesTabListener< G, A, R > listener)
DEFAULT
The tab contents are unchanged from defaults.