public class ModelUpdater
extends java.lang.Object
DefaultListModel
instance to reflect the contents of a
MapSquare
instance.Constructor and Description |
---|
ModelUpdater(javax.swing.DefaultListModel model,
MapViewSettings mapViewSettings)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
int |
update(GameObjectContainer<?,?,?> mapSquare,
GameObject<?,?,?> gameObject)
Updates the model to reflect a
MapSquare . |
public ModelUpdater(@NotNull javax.swing.DefaultListModel model, @NotNull MapViewSettings mapViewSettings)
model
- the model to updatemapViewSettings
- the map view settings to usepublic int update(@Nullable GameObjectContainer<?,?,?> mapSquare, @Nullable GameObject<?,?,?> gameObject)
MapSquare
.mapSquare
- the map square selectiongameObject
- the selected game object-1
to select nothing