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(GameObjectAttributesModel<G,A,R> gameObjectAttributesModel)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addAutoApply(java.awt.Component component)
Registers a component that auto-applies when the focus is lost.
|
void |
addGameObjectAttributesTabListener(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 GameObject<G,A,R> |
getSelectedGameObject()
Returns the currently selected
GameObject . |
Severity |
getTabSeverity()
Returns the tab severity.
|
protected abstract void |
refresh(G gameObject)
Refreshes the display.
|
void |
removeGameObjectAttributesTabListener(GameObjectAttributesTabListener<G,A,R> listener)
Removes a listener.
|
protected void |
setTabSeverity(Severity tabSeverity)
Sets the tab severity.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
activate, canApply, getPanel
protected AbstractGameObjectAttributesTab(@NotNull GameObjectAttributesModel<G,A,R> gameObjectAttributesModel)
gameObjectAttributesModel
- the model to trackprotected void setTabSeverity(@NotNull Severity tabSeverity)
tabSeverity
- the tab severitypublic void addGameObjectAttributesTabListener(@NotNull GameObjectAttributesTabListener<G,A,R> listener)
addGameObjectAttributesTabListener
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 GameObjectAttributesTabListener<G,A,R> listener)
removeGameObjectAttributesTabListener
in interface GameObjectAttributesTab<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
listener
- the listener@NotNull public Severity getTabSeverity()
getTabSeverity
in interface GameObjectAttributesTab<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
public void apply()
GameObjectAttributesTab.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 java.awt.Component component)
component
- the component@Nullable protected GameObject<G,A,R> getSelectedGameObject()
GameObject
.null