 |
Gridarta Editor
|
Go to the documentation of this file.
20 package net.sf.gridarta.gui.panel.connectionview;
22 import java.awt.Point;
23 import java.awt.event.MouseAdapter;
24 import java.awt.event.MouseEvent;
25 import java.util.Iterator;
26 import javax.swing.JPanel;
34 import org.jetbrains.annotations.NotNull;
61 public void mousePressed(
final MouseEvent e) {
63 if (e.getClickCount() == 2) {
93 if (mapView ==
null) {
100 final Point point =
new Point();
Iterable< Connection< K > > getSelectedConnections()
Returns a list of all selected connections.
MapGrid getMapGrid()
Returns the MapGrid of this view.
MapView< G, A, R > getMapView()
Returns the current map view.
Base package of all Gridarta classes.
int getMapX()
Returns the X coordinate of this GameObject on its map.
abstract void doubleClick(@NotNull Connection< K > connection)
Called if an entry is double-clicked.
Reflects a game object (object on a map).
Control(@NotNull final View< K, G, A, R > view)
Creates a new instance.
Graphical User Interface of Gridarta.
GameObjects are the objects based on Archetypes found on maps.
void highlightSelectedEntries()
Sets the map selection to the currently selected entries.
Interface for MapArchObjects.
A map view consists of a map grid and a map cursor, and is attached to a map control.
Modes that describe how squares get selected.
void select(@NotNull final Point pos, @NotNull final SelectionMode selectionMode)
Selects or deselects a single square.
2D-Grid containing flags for selection, pre-selection, cursor, warnings and errors.
ADD
All squares that are preselected get selected.
int getMapY()
Returns the Y coordinate of this GameObject on its map.
void addListSelectionListener(@NotNull final ListSelectionListener listener)
Registers a ListSelectionListener for the connection list.
void addListMouseListener(@NotNull final MouseListener listener)
Registers a MouseListener for the connection list.
Abstract controller base class for map view controls.
JPanel getView()
Returns the view for this controller.
Stores GameObjects related to key values.
Base classes for rendering maps.
void unSelect()
Clears all selection and pre-selection flags from the grid.
This document describes some hints and requirements for general development on the CrossfireEditor If you plan to make changes to the editor code or setup please read the following and keep it in derived from a basic editor application called Gridder by Pasi Ker�nen so please communicate with best through the cf devel mailing before considering any fundamental changes About code DO NOT USE TABS No matter what Java development platform you are please configure insert indent Tabs are displayed totally different in every editor and there are millions of different editors out there The insertion of tabs in the source code is messing up the syntax formatting in a way that is UNREPAIRABLE Apart from please keep code indentation accurate This is not just good it helps to keep code readable and in that way dramatically decreases the chance for overlooked bugs Everyone is welcomed to correct indentation errors wherever they are spotted Before you start to do this please double check that your editor is really configured to insert spaces Line feeds may be checked in either in windows or in unix linux style All reasonable text and java editors can deal with both linefeed formats Converting line feeds is but in this case please make sure that only linefeed characters are changed and nothing else is affected Due to the platform independent nature of the editor has the potential to run on almost any given operating system the build process differs greatly between systems as well as java environments In the several people have attempted to add build scripts along with structural changes to optimize the setup on one particular system environment which has led to conflict Please do *not *attempt to change the structure or any directories for the mere purpose of improving a build process or performance in a java environment Build scripts may be placed in the root it would be especially fine if it is just one or two files but the latter is not required Please excuse me for placing such restriction I and many users of the editor greatly appreciate build scripts We just had some real troubles over this issue in the past and I don t want to have them repeated the editor has relatively high performance requirements I ve spent a lot of extra work to keep everything as fast and memory efficient as possible when you add new data fields or calculations in the archetype please make sure they are as efficient as possible and worth both the time and space they consume Now don t be afraid too much No development would be possible without adding calculations and data at all Just bear in mind unlike for many other open source performance does make a difference for the CrossfireEditor The for as many systems as possible In case you are unexperienced with java and note that the graphics look different on every and with every font They also have different sizes proportions and behave different A seemingly trivial and effectless change can wreck havoc for the same GUI run on another system please don t be totally afraid of it
final View< K, G, A, R > view
The view of this controller.