public class TextEditorTab<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> extends AbstractGameObjectAttributesTab<G,A,R>
Constructor and Description |
---|
TextEditorTab(GameObjectAttributesModel<G,A,R> gameObjectAttributesModel,
ArchetypeTypeSet archetypeTypeSet)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
activate()
Sets the focus to this component.
|
protected void |
apply(G gameObject)
Applies settings to the given game object.
|
boolean |
canApply()
Returns whether a selected game object exists and the current value
differs from the initially set value.
|
javax.swing.JPanel |
getPanel()
Creates the contents panel.
|
protected void |
refresh(G gameObject)
Refreshes the display.
|
addAutoApply, addGameObjectAttributesTabListener, apply, getSelectedGameObject, getTabSeverity, removeGameObjectAttributesTabListener, setTabSeverity
public TextEditorTab(@NotNull GameObjectAttributesModel<G,A,R> gameObjectAttributesModel, @NotNull ArchetypeTypeSet archetypeTypeSet)
gameObjectAttributesModel
- the model to trackarchetypeTypeSet
- the archetype type set@NotNull public javax.swing.JPanel getPanel()
protected void refresh(@Nullable G gameObject)
refresh
in class AbstractGameObjectAttributesTab<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
gameObject
- the game object to set the contents frompublic boolean canApply()
apply()
should be calledpublic void activate()
protected void apply(@NotNull G gameObject)
apply
in class AbstractGameObjectAttributesTab<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
gameObject
- the game object to set the contents of