public abstract class AbstractGameObjectAttributesTab<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> extends java.lang.Object implements GameObjectAttributesTab<G,A,R>
GameObjectAttributesTab implementations.| Modifier | Constructor and Description |
|---|---|
protected |
AbstractGameObjectAttributesTab(@NotNull GameObjectAttributesModel<G,A,R> gameObjectAttributesModel)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addAutoApply(@NotNull java.awt.Component component)
Registers a component that auto-applies when the focus is lost.
|
void |
addGameObjectAttributesTabListener(@NotNull GameObjectAttributesTabListener<G,A,R> listener)
Adds a listener.
|
void |
apply()
Applies the current settings.
|
protected abstract void |
apply(G gameObject)
Applies settings to the given game object.
|
protected @Nullable GameObject<G,A,R> |
getSelectedGameObject()
Returns the currently selected
GameObject. |
@NotNull Severity |
getTabSeverity()
Returns the tab severity.
|
protected abstract void |
refresh(G gameObject)
Refreshes the display.
|
void |
removeGameObjectAttributesTabListener(@NotNull GameObjectAttributesTabListener<G,A,R> listener)
Removes a listener.
|
protected void |
setTabSeverity(@NotNull Severity tabSeverity)
Sets the tab severity.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitactivate, canApply, getPanelprotected AbstractGameObjectAttributesTab(@NotNull
@NotNull GameObjectAttributesModel<G,A,R> gameObjectAttributesModel)
gameObjectAttributesModel - the model to trackprotected void setTabSeverity(@NotNull
@NotNull Severity tabSeverity)
tabSeverity - the tab severitypublic void addGameObjectAttributesTabListener(@NotNull
@NotNull GameObjectAttributesTabListener<G,A,R> listener)
GameObjectAttributesTabaddGameObjectAttributesTabListener in interface GameObjectAttributesTab<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>listener - the listenerpublic void removeGameObjectAttributesTabListener(@NotNull
@NotNull GameObjectAttributesTabListener<G,A,R> listener)
GameObjectAttributesTabremoveGameObjectAttributesTabListener in interface GameObjectAttributesTab<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>listener - the listener@NotNull public @NotNull Severity getTabSeverity()
GameObjectAttributesTabgetTabSeverity in interface GameObjectAttributesTab<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>public void apply()
GameObjectAttributesTabGameObjectAttributesTab.canApply() returns true.apply in interface GameObjectAttributesTab<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>protected abstract void refresh(@Nullable
G gameObject)
gameObject - the game object to set the contents fromprotected abstract void apply(@NotNull
G gameObject)
gameObject - the game object to set the contents ofprotected void addAutoApply(@NotNull
@NotNull java.awt.Component component)
component - the component@Nullable protected @Nullable GameObject<G,A,R> getSelectedGameObject()
GameObject.null