Interface ObjectChooserTab<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
-
- All Known Implementing Classes:
ArchetypeChooserControl,PickmapChooserControl
public interface ObjectChooserTab<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>Interface for classes being part of the object chooser.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NotNull java.awt.ComponentgetComponent()Returns the component to show in the object chooser.@Nullable BaseObject<G,A,R,?>getSelection()Returns the selected game object.@NotNull java.util.List<? extends BaseObject<G,A,R,?>>getSelections()Returns the selected game objects.@NotNull java.lang.StringgetTitle()Returns the title to display in the object chooser.booleanisMatching(G gameObject)Returns whether the current selection matches the given game object.voidsetActive(boolean active)Called whenever this tab becomes active or inactive.
-
-
-
Method Detail
-
getComponent
@NotNull @NotNull java.awt.Component getComponent()
Returns the component to show in the object chooser.- Returns:
- the component to show
-
setActive
void setActive(boolean active)
Called whenever this tab becomes active or inactive.- Parameters:
active- whether this tab is active
-
isMatching
boolean isMatching(@NotNull G gameObject)Returns whether the current selection matches the given game object.- Parameters:
gameObject- the game object to compare to- Returns:
- whether the game object matches
-
getSelection
@Nullable @Nullable BaseObject<G,A,R,?> getSelection()
Returns the selected game object.- Returns:
- one of the selected game objects or
nullif no game objects are selected
-
getSelections
@NotNull @NotNull java.util.List<? extends BaseObject<G,A,R,?>> getSelections()
Returns the selected game objects.- Returns:
- the selected game objects
-
getTitle
@NotNull @NotNull java.lang.String getTitle()
Returns the title to display in the object chooser.- Returns:
- the title
-
-