 |
Gridarta Editor
|
Go to the documentation of this file.
20 package net.sf.gridarta.gui.panel.selectedsquare;
22 import java.util.Collection;
23 import java.util.concurrent.CopyOnWriteArrayList;
28 import org.jetbrains.annotations.NotNull;
29 import org.jetbrains.annotations.Nullable;
41 private final Collection<SelectedSquareModelListener<G, A, R>>
listenerList =
new CopyOnWriteArrayList<>();
96 final G head = gameObject ==
null ? null : gameObject.getHead();
104 if (selectedMapSquare ==
null) {
119 if (selectedMapSquare ==
null) {
final Collection< SelectedSquareModelListener< G, A, R > > listenerList
The listeners to inform of changes.
MapSquare< G, A, R > getMapSquareOptional()
Returns the MapSquare this game object is part of.
void fireSelectionChangedEvent()
Notifies all listeners that the selected map square has changed.
Base package of all Gridarta classes.
G selectedGameObject
The currently selected GameObject.
Reflects a game object (object on a map).
void removeSelectedSquareListener(@NotNull final SelectedSquareModelListener< G, A, R > listener)
Removes a SelectedSquareModelListener to be notified.
boolean isSelectedGameObjects(@NotNull final Iterable< G > gameObjects)
GameObjects are the objects based on Archetypes found on maps.
boolean setSelectedMapSquare(@Nullable final MapSquare< G, A, R > mapSquare, @Nullable final G gameObject)
Sets the currently selected map square.
MapSquare< G, A, R > selectedMapSquare
The currently selected MapSquare.
Interface for MapArchObjects.
The model component of the selected square control.
void setSelectedGameObject(@Nullable final G gameObject)
Sets the currently selected GameObject.
void addSelectedSquareListener(@NotNull final SelectedSquareModelListener< G, A, R > listener)
Adds a SelectedSquareModelListener to be notified.
boolean isSelectedMapSquares(@NotNull final Iterable< MapSquare< G, A, R >> mapSquares)
G getSelectedGameObject()
Returns the currently selected GameObject within this list (currently selected MapSquare).
T getMultiNext()
Returns the next of this multi-part object.
MapSquare< G, A, R > getSelectedMapSquare()
Returns the currently selected map square.