Gridarta Editor
MapView.java
Go to the documentation of this file.
1 /*
2  * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games.
3  * Copyright (C) 2000-2015 The Gridarta Developers.
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License along
16  * with this program; if not, write to the Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19 
20 package net.sf.gridarta.gui.map.mapview;
21 
22 import java.awt.Component;
23 import java.awt.Point;
24 import java.util.List;
25 import javax.swing.JInternalFrame;
26 import javax.swing.JScrollPane;
35 import org.jetbrains.annotations.NotNull;
36 import org.jetbrains.annotations.Nullable;
37 
43 public interface MapView<G extends GameObject<G, A, R>, A extends MapArchObject<A>, R extends Archetype<G, A, R>> {
44 
48  void closeNotify();
49 
57  @Nullable
59 
65  @NotNull
66  List<G> getSelectedGameObjects();
67 
72  @NotNull
73  String getWindowTitle();
74 
80  @NotNull
81  Component getComponent();
82 
87  @NotNull
89 
93  void activate();
94 
99  @NotNull
100  JInternalFrame getInternalFrame();
101 
106  @NotNull
107  List<MapSquare<G, A, R>> getSelectedSquares();
108 
113  @NotNull
115 
120  @NotNull
122 
127  @NotNull
129 
134  @NotNull
135  JScrollPane getScrollPane();
136 
143  void setCursorLocation(@NotNull Point point);
144 
145 }
JScrollPane getScrollPane()
Returns the JScrollPane of this map view.
void closeNotify()
This function must be called when the view is closed.
List< MapSquare< G, A, R > > getSelectedSquares()
Returns the selected squares.
Graphical User Interface of Gridarta.
MapGrid getMapGrid()
Returns the MapGrid of this view.
MapCursor provides methods to move and drag on map.
Definition: MapCursor.java:57
void activate()
Activate this map view.
MapControl< G, A, R > getMapControl()
Return the controller of this view.
Base package of all Gridarta classes.
Reflects a game object (object on a map).
Definition: GameObject.java:36
String getWindowTitle()
Returns the title for the map window.
GameObjects are the objects based on Archetypes found on maps.
MapRenderer getRenderer()
Returns the MapRenderer for this view.
2D-Grid containing flags for selection, pre-selection, cursor, warnings and errors.
Definition: MapGrid.java:45
Base classes for rendering maps.
void setCursorLocation(@NotNull Point point)
Sets the cursor location.
List< G > getSelectedGameObjects()
Return all selected game objects.
MapCursor< G, A, R > getMapCursor()
Returns the MapCursor of this view.
Currently nothing more than a marker interface for unification.
Definition: MapControl.java:35
A map view consists of a map grid and a map cursor, and is attached to a map control.
Definition: MapView.java:43
Common interface for renderers of map control instances.
G getSelectedGameObject()
Return one selected game object.
Component getComponent()
Returns the component associated with this MapView that can be used as parent for dialogs...
JInternalFrame getInternalFrame()
Returns the JInternalFrame instance for this map view.