 |
Gridarta Editor
|
Go to the documentation of this file.
20 package net.sf.gridarta.gui.mainwindow;
22 import java.awt.event.FocusEvent;
23 import java.awt.event.FocusListener;
43 import org.jetbrains.annotations.NotNull;
44 import org.jetbrains.annotations.Nullable;
103 public void mapCreated(@NotNull
final MapControl<G, A, R> mapControl,
final boolean interactive) {
128 public void preBeginTransaction() {
134 public void beginTransaction(@NotNull
final String
name) {
144 public void postEndTransaction() {
157 public void mapSizeChanged(@NotNull
final Size2D newSize) {
168 for (
final Iterable<G> mapSquare : mapSquares) {
169 for (
final G gameObject : mapSquare) {
170 if (gameObject == topGameObject) {
178 public void mapObjectsChanged(@NotNull
final Set<G> gameObjects, @NotNull
final Set<G> transientGameObjects) {
192 public void mapFileChanged(@Nullable
final MapFile oldMapFile) {
197 public void modifiedChanged() {
215 public GameObjectTextEditorTab(@NotNull
final String
ident, @NotNull
final GameObjectTextEditor gameObjectTextEditor, @NotNull
final Location defaultLocation,
final boolean alternativeLocation,
final int index,
final boolean defaultOpen, @NotNull
final SelectedSquareModel<G, A, R> selectedSquareModel, @NotNull
final MapManager<G, A, R> mapManager) {
218 selectedSquareModel.addSelectedSquareListener((mapSquare, gameObject) -> {
235 public void focusGained(
final FocusEvent e) {
240 public void focusLost(
final FocusEvent e) {
257 if (mapSquare ==
null) {
void refreshDisplay()
Refreshes the tab's state from a selectedGameObject.
A MapModel reflects the data of a map.
boolean alternativeLocation
Whether the tab is shown in the alternative location (.
A MapManager manages all opened maps.
Base package of all Gridarta classes.
G selectedGameObject
The currently selected game object.
void endTransaction()
End a transaction.
Interface for listeners listening on map transactions of MapModels.
void beginTransaction(@NotNull String name)
Starts a new transaction.
Interface for listeners listening to MapManager changes.
The Tab displaying the game object text editor.
final int index
The tab's index for ordering.
Implements the "Game Object Text Editor".
GameObjectTextEditorTab(@NotNull final String ident, @NotNull final GameObjectTextEditor gameObjectTextEditor, @NotNull final Location defaultLocation, final boolean alternativeLocation, final int index, final boolean defaultOpen, @NotNull final SelectedSquareModel< G, A, R > selectedSquareModel, @NotNull final MapManager< G, A, R > mapManager)
Creates a new instance.
Reflects a game object (object on a map).
final MapModelListener< G, A, R > mapModelListener
The map model listener which is attached to currentMapControl.
void applyChanges(@NotNull final GameObject<?, ?, ?> gameObject)
Updates a GameObject's attributes from the input field.
void addMapModelListener(@NotNull MapModelListener< G, A, R > listener)
Register a map listener.
A tab in a TabbedPanel component.
Component getTextPane()
Returns the text input pane.
Graphical User Interface of Gridarta.
Records a set of changed map squares.
boolean isInMapTransaction
Records whether a map transaction is active.
GameObjects are the objects based on Archetypes found on maps.
final String ident
The tab's identification string.
void removeMapModelListener(@NotNull MapModelListener< G, A, R > listener)
Unregister a map listener.
Interface for MapArchObjects.
The model component of the selected square control.
final MapManagerListener< G, A, R > mapManagerListener
The map manager listener.
void removeMapTransactionListener(@NotNull MapTransactionListener< G, A, R > listener)
Unregisters a map transaction listener.
An interface for classes that collect errors.
final GameObjectTextEditor gameObjectTextEditor
The displayed GameObjectTextEditor instance.
This package contains the framework for validating maps.
void autoApplyArchPanelChanges()
Applies pending changed.
The location of a map file with a map directory.
void addMapTransactionListener(@NotNull MapTransactionListener< G, A, R > listener)
Registers a map transaction listener.
MapModel< G, A, R > getMapModel()
Returns the MapModel this map square is part of.
Interface for listeners listening on MapModel events.
Severity refreshDisplay(@Nullable final GameObject<?, ?, ?> gameObject)
Refreshes the input field to show the attributes of a {}.
MapControl< G, A, R > currentMapControl
Last known active map.
MapSquare< G, A, R > getMapSquareOptional()
Returns the MapSquare this game object is part of.
boolean isInAutoApplyArchPanelChanges
Whether autoApplyArchPanelChanges() is currently running.
final MapTransactionListener< G, A, R > mapTransactionListener
The map transaction listener which is attached to {}.
void setSeverity(@NotNull final Severity severity)
Sets the tab's Severity.
Currently nothing more than a marker interface for unification.
MapModel< G, A, R > getMapModel()
Returns the map model.
Displays the contents of the currently selected map square.
The class Size2D represents a 2d rectangular area.