Class TextEditorTab<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.TextEditorTab<G,A,R>
-
- All Implemented Interfaces:
GameObjectAttributesTab<G,A,R>
public class TextEditorTab<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> extends AbstractGameObjectAttributesTab<G,A,R>
The tab containing the game object text editor.
-
-
Constructor Summary
Constructors Constructor Description TextEditorTab(@NotNull GameObjectAttributesModel<G,A,R> gameObjectAttributesModel, @NotNull ArchetypeTypeSet archetypeTypeSet)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.@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
-
TextEditorTab
public TextEditorTab(@NotNull @NotNull GameObjectAttributesModel<G,A,R> gameObjectAttributesModel, @NotNull @NotNull ArchetypeTypeSet archetypeTypeSet)Creates a new instance.- Parameters:
gameObjectAttributesModel- the model to trackarchetypeTypeSet- the archetype type set
-
-
Method Detail
-
getPanel
@NotNull public @NotNull javax.swing.JPanel getPanel()
Description copied from interface:GameObjectAttributesTabCreates the contents panel.- Returns:
- the contents panel
-
refresh
protected 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
-
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.
-
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
-
-