public class SelectedSquareModel<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
extends java.lang.Object
| Constructor and Description |
|---|
SelectedSquareModel() |
| Modifier and Type | Method and Description |
|---|---|
void |
addSelectedSquareListener(@NotNull SelectedSquareModelListener<G,A,R> listener)
Adds a
SelectedSquareModelListener to be notified. |
G |
getSelectedGameObject()
Returns the currently selected
GameObject within this list
(currently selected MapSquare). |
@Nullable MapSquare<G,A,R> |
getSelectedMapSquare()
Returns the currently selected map square.
|
boolean |
isSelectedGameObjects(@NotNull java.lang.Iterable<G> gameObjects) |
boolean |
isSelectedMapSquares(@NotNull java.lang.Iterable<MapSquare<G,A,R>> mapSquares) |
void |
removeSelectedSquareListener(@NotNull SelectedSquareModelListener<G,A,R> listener)
Removes a
SelectedSquareModelListener to be notified. |
void |
setSelectedGameObject(G gameObject)
Sets the currently selected
GameObject. |
boolean |
setSelectedMapSquare(@Nullable MapSquare<G,A,R> mapSquare,
G gameObject)
Sets the currently selected map square.
|
@Nullable public @Nullable MapSquare<G,A,R> getSelectedMapSquare()
null if no square
is selected@Nullable public G getSelectedGameObject()
GameObject within this list
(currently selected MapSquare).nullpublic void addSelectedSquareListener(@NotNull
@NotNull SelectedSquareModelListener<G,A,R> listener)
SelectedSquareModelListener to be notified.listener - the listener to addpublic void removeSelectedSquareListener(@NotNull
@NotNull SelectedSquareModelListener<G,A,R> listener)
SelectedSquareModelListener to be notified.listener - the listener to removepublic boolean isSelectedMapSquares(@NotNull
@NotNull java.lang.Iterable<MapSquare<G,A,R>> mapSquares)
public boolean isSelectedGameObjects(@NotNull
@NotNull java.lang.Iterable<G> gameObjects)
public boolean setSelectedMapSquare(@Nullable
@Nullable MapSquare<G,A,R> mapSquare,
@Nullable
G gameObject)
mapSquare - the selected map squaregameObject - the selected game object, or null to deselect
ittrue if the state has changedpublic void setSelectedGameObject(@Nullable
G gameObject)
GameObject.gameObject - the selected game object or null