![]() |
Gridarta Editor
|
Base class for GameObjectAttributesTab implementations. More...
Public Member Functions | |
void | addGameObjectAttributesTabListener (@NotNull final GameObjectAttributesTabListener< G, A, R > listener) |
void | apply () |
Severity | getTabSeverity () |
void | removeGameObjectAttributesTabListener (@NotNull final GameObjectAttributesTabListener< G, A, R > listener) |
![]() | |
void | activate () |
Sets the focus to this component. More... | |
void | addGameObjectAttributesTabListener ( @NotNull GameObjectAttributesTabListener< G, A, R > listener) |
Adds a listener. More... | |
void | apply () |
Applies the current settings. More... | |
boolean | canApply () |
Returns whether a selected game object exists and the current value differs from the initially set value. More... | |
JPanel | getPanel () |
Creates the contents panel. More... | |
Severity | getTabSeverity () |
Returns the tab severity. More... | |
void | removeGameObjectAttributesTabListener ( @NotNull GameObjectAttributesTabListener< G, A, R > listener) |
Removes a listener. More... | |
Protected Member Functions | |
AbstractGameObjectAttributesTab (@NotNull final GameObjectAttributesModel< G, A, R > gameObjectAttributesModel) | |
Creates a new instance. More... | |
void | addAutoApply (@NotNull final Component component) |
Registers a component that auto-applies when the focus is lost. More... | |
abstract void | apply (@NotNull G gameObject) |
Applies settings to the given game object. More... | |
GameObject< G, A, R > | getSelectedGameObject () |
Returns the currently selected GameObject. More... | |
abstract void | refresh (@Nullable G gameObject) |
Refreshes the display. More... | |
void | setTabSeverity (@NotNull final Severity tabSeverity) |
Sets the tab severity. More... | |
Private Member Functions | |
void | fireApply () |
Notify all listeners to apply the changes. More... | |
Private Attributes | |
final FocusListener | focusListener |
The focus listener to implement auto-applying. More... | |
final Collection< GameObjectAttributesTabListener< G, A, R > > | listeners = new ArrayList<>() |
The registered listeners. More... | |
G | selectedGameObject |
The currently selected game object. More... | |
Severity | tabSeverity = Severity.DEFAULT |
The tab severity. More... | |
Base class for GameObjectAttributesTab implementations.
Definition at line 38 of file AbstractGameObjectAttributesTab.java.
|
protected |
Creates a new instance.
gameObjectAttributesModel | the model to track |
Definition at line 80 of file AbstractGameObjectAttributesTab.java.
|
protected |
Registers a component that auto-applies when the focus is lost.
component | the component |
Definition at line 161 of file AbstractGameObjectAttributesTab.java.
void net.sf.gridarta.gui.panel.gameobjectattributes.AbstractGameObjectAttributesTab< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.addGameObjectAttributesTabListener | ( | @NotNull final GameObjectAttributesTabListener< G, A, R > | listener | ) |
Definition at line 114 of file AbstractGameObjectAttributesTab.java.
void net.sf.gridarta.gui.panel.gameobjectattributes.AbstractGameObjectAttributesTab< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.apply | ( | ) |
Definition at line 130 of file AbstractGameObjectAttributesTab.java.
Referenced by net.sf.gridarta.gui.panel.gameobjectattributes.AbstractGameObjectAttributesTab< G, A, R >.apply().
|
abstractprotected |
Applies settings to the given game object.
gameObject | the game object to set the contents of |
|
private |
Notify all listeners to apply the changes.
Definition at line 151 of file AbstractGameObjectAttributesTab.java.
|
protected |
Returns the currently selected GameObject.
Definition at line 170 of file AbstractGameObjectAttributesTab.java.
Severity net.sf.gridarta.gui.panel.gameobjectattributes.AbstractGameObjectAttributesTab< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getTabSeverity | ( | ) |
Definition at line 125 of file AbstractGameObjectAttributesTab.java.
|
abstractprotected |
Refreshes the display.
gameObject | the game object to set the contents from |
Referenced by net.sf.gridarta.gui.panel.gameobjectattributes.AbstractGameObjectAttributesTab< G, A, R >.AbstractGameObjectAttributesTab().
void net.sf.gridarta.gui.panel.gameobjectattributes.AbstractGameObjectAttributesTab< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.removeGameObjectAttributesTabListener | ( | @NotNull final GameObjectAttributesTabListener< G, A, R > | listener | ) |
Definition at line 119 of file AbstractGameObjectAttributesTab.java.
|
protected |
Sets the tab severity.
tabSeverity | the tab severity |
Definition at line 102 of file AbstractGameObjectAttributesTab.java.
|
private |
The focus listener to implement auto-applying.
See {}.
Definition at line 62 of file AbstractGameObjectAttributesTab.java.
Referenced by net.sf.gridarta.gui.panel.gameobjectattributes.AbstractGameObjectAttributesTab< G, A, R >.addAutoApply().
|
private |
The registered listeners.
Definition at line 43 of file AbstractGameObjectAttributesTab.java.
Referenced by net.sf.gridarta.gui.panel.gameobjectattributes.AbstractGameObjectAttributesTab< G, A, R >.addGameObjectAttributesTabListener(), net.sf.gridarta.gui.panel.gameobjectattributes.AbstractGameObjectAttributesTab< G, A, R >.fireApply(), net.sf.gridarta.gui.panel.gameobjectattributes.AbstractGameObjectAttributesTab< G, A, R >.removeGameObjectAttributesTabListener(), and net.sf.gridarta.gui.panel.gameobjectattributes.AbstractGameObjectAttributesTab< G, A, R >.setTabSeverity().
|
private |
The currently selected game object.
Definition at line 55 of file AbstractGameObjectAttributesTab.java.
Referenced by net.sf.gridarta.gui.panel.gameobjectattributes.AbstractGameObjectAttributesTab< G, A, R >.AbstractGameObjectAttributesTab(), net.sf.gridarta.gui.panel.gameobjectattributes.AbstractGameObjectAttributesTab< G, A, R >.apply(), and net.sf.gridarta.gui.panel.gameobjectattributes.AbstractGameObjectAttributesTab< G, A, R >.getSelectedGameObject().
|
private |
The tab severity.
Definition at line 49 of file AbstractGameObjectAttributesTab.java.
Referenced by net.sf.gridarta.gui.panel.gameobjectattributes.AbstractGameObjectAttributesTab< G, A, R >.getTabSeverity(), and net.sf.gridarta.gui.panel.gameobjectattributes.AbstractGameObjectAttributesTab< G, A, R >.setTabSeverity().