 |
Gridarta Editor
|
Go to the documentation of this file.
20 package net.sf.gridarta.var.crossfire.gui.map.renderer;
22 import java.awt.Color;
23 import java.awt.Dimension;
24 import java.awt.Graphics;
25 import java.awt.Point;
26 import java.awt.Rectangle;
27 import java.awt.image.BufferedImage;
28 import java.util.Collection;
29 import java.util.HashSet;
49 import org.jetbrains.annotations.NotNull;
50 import org.jetbrains.annotations.Nullable;
118 private final Rectangle
tmpRec =
new Rectangle();
128 public void gridVisibleChanged(
final boolean gridVisible) {
133 public void lightVisibleChanged(
final boolean lightVisible) {
138 public void smoothingChanged(
final boolean smoothing) {
143 public void tileStretchingChanged(
final boolean tileStretching) {
148 public void doubleFacesChanged(
final boolean doubleFaces) {
153 public void alphaTypeChanged(
final int alphaType) {
158 public void editTypeChanged(
final int editType) {
163 public void autojoinChanged(
final boolean autojoin) {
176 public void mapSizeChanged(@NotNull
final Size2D newSize) {
182 final Collection<MapSquare<GameObject, MapArchObject, Archetype>> toRepaint =
new HashSet<>();
184 getSquaresToRepaint(mapSquare, toRepaint);
192 public void mapObjectsChanged(@NotNull
final Set<GameObject> gameObjects, @NotNull
final Set<GameObject> transientGameObjects) {
193 final Collection<MapSquare<GameObject, MapArchObject, Archetype>> toRepaint =
new HashSet<>();
194 addMapSquares(gameObjects, toRepaint);
195 addMapSquares(transientGameObjects, toRepaint);
209 if (!gameObject.isInContainer()) {
212 if (square !=
null) {
213 getSquaresToRepaint(square, toRepaint);
229 final Point point =
new Point();
230 for (
int dx = -1; dx <= 1; dx++) {
231 for (
int dy = -1; dy <= 1; dy++) {
232 mapSquare.getMapLocation(point, dx, dy);
234 toRepaint.add(
mapModel.getMapSquare(point));
239 toRepaint.add(mapSquare);
249 public void mapFileChanged(@Nullable
final MapFile oldMapFile) {
254 public void modifiedChanged() {
267 public void mapGridChanged(@NotNull
final MapGridEvent e) {
274 public void mapGridResized(@NotNull
final MapGridEvent e) {
295 mapSize = this.mapModel.getMapArchObject().getMapSize();
300 setToolTipText(
"dummy");
334 final BufferedImage bufImage =
new BufferedImage(viewWidth, viewHeight, BufferedImage.TYPE_INT_ARGB);
335 final Graphics graphics = bufImage.getGraphics();
337 graphics.setColor(Color.white);
338 graphics.fillRect(0, 0, viewWidth, viewHeight);
381 final Point pos = square.getMapLocation();
394 protected void paintComponent(@NotNull
final Graphics graphics,
final boolean isSnapshot,
final boolean checkClip) {
395 graphics.setColor(getBackground());
396 graphics.fillRect(0, 0, getWidth(), getHeight());
410 protected void paintSquareGrid(@NotNull
final Graphics graphics, @NotNull
final Point point) {
434 private void paintMap(@NotNull
final Graphics graphics,
final boolean checkClip) {
473 final int mapWidth = tmpMapSize.
getWidth();
474 final int mapHeight = tmpMapSize.
getHeight();
475 for (
int x = 0; x <= mapWidth; x++) {
478 for (
int y = 0; y <= mapHeight; y++) {
488 if (x < 0 || y < 0) {
497 retPoint.setLocation(xm, ym);
525 setPreferredSize(forcedSize);
526 setMinimumSize(forcedSize);
535 protected abstract void updateSquare(@NotNull Point point);
541 protected abstract void updateSquares(@NotNull Rectangle rectangle);
abstract void updateSquares(@NotNull Rectangle rectangle)
Callback function that is called when multiple squares may have changed.
void addMapGridListener(@NotNull final MapGridListener listener)
Registers a MapGridListener.
int getWidth()
Returns the width of the area.
A MapModel reflects the data of a map.
int getFlags(final int x, final int y)
Returns the flags of a square.
MapSquare< G, A, R > getMapSquareOptional()
Returns the MapSquare this game object is part of.
boolean isSmoothing()
Returns the smoothing setting.
final MapGridListener mapGridListener
The MapGridListener to track changes in mapGrid.
int getBorderOffsetX()
Returns the x offset to map borders.
Base package of all Gridarta classes.
boolean isLightVisible()
Get the visibility of the light.
void paintSquare(@NotNull final MapSquare< GameObject, MapArchObject, Archetype > square)
Paints one square.
Standard Edition Runtime Environment README Import and export control rules on cryptographic software vary from country to country The Java Cryptography Java provides two different sets of cryptographic policy files
boolean isGridVisible()
Get the visibility of 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 that
boolean isPointValid(@Nullable final Point pos)
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 mind
void addMapViewSettingsListener(@NotNull MapViewSettingsListener listener)
Register a MapViewSettingsListener.
BufferedImage getFullImage()
Returns an image of the entire map view.
boolean lightVisible
Whether the setting for lighted map squares is inverted.
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 directory
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 Then
void paintMap(@NotNull final Graphics graphics, final boolean checkClip)
Paints the whole map.
final MapViewSettingsListener mapViewSettingsListener
The MapViewSettingsListener attached to {}.
final Rectangle tmpRec
Temporary rectangle.
Size2D getImageSize()
Returns the size of an image of the entire map view in pixels.
Reflects a game object (object on a map).
Container for settings that affect the rendering of maps.
final GridMapSquarePainter gridMapSquarePainter
The GridMapSquarePainter to use.
void paint(@NotNull final Graphics graphics, final int gridFlags, final boolean light, final int x, final int y, @NotNull final ImageObserver imageObserver)
Paints overlay images for one grid square.
This is the default renderer of a map.
static final long serialVersionUID
The serial version UID.
Paints overlays for map grids.
Daimonin Editor like your to identify any bugs in the that are reported by the debuggers If a problem does exist you can forward the error message that appears in your debugging console you must have built the editor with debug flag To do so
Rectangle getRecChange()
Returns a rectangle where the grid was changed.
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 I(Andreas Vogl) have added the countless features necessary to turn this application into a real useful CF map-editor. We have both spent a lot of time on the editor(take a glimpse at the CHANGES.txt file)
Graphical User Interface of Gridarta.
Abstract base class for classes implementing MapRenderer.
final GameObjectParser< G, A, R > gameObjectParser
The GameObjectParser for creating tooltip information or.
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 Java
Defines common UI constants used in different dialogs and all used icon files.
void removeMapViewSettingsListener(@NotNull MapViewSettingsListener listener)
Unregister a MapViewSettingsListener.
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 So
GameObjects are the objects based on Archetypes found on maps.
abstract void resizeBackBuffer(@NotNull Dimension size)
Resizes the backing buffer to the new grid size.
boolean isLightVisible()
Returns whether the setting for lighted map squares should be inverted.
int getHeight()
Returns the height of the area.
Implements Crossfire archetypes.
final Point borderOffset
The offset to map borders (32 for std.
MapArchObject contains the specific meta data about a map that is stored in the map-arch,...
final MapGrid mapGrid
The MapGrid to render.
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 Unfortunately
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 allowed
Main package of Gridarta4Crossfire, contains all classes specific to the Crossfire version of the Gri...
final MapModel< GameObject, MapArchObject, Archetype > mapModel
The MapModel to render.
Size2D getSize()
Returns size of 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 however
void paintMapSelection(@NotNull final Graphics graphics)
Paints the selection for the whole map.
final MapViewSettings mapViewSettings
The MapViewSettings instance to use.
Size2D mapSize
The map size in squares.
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 list
void forceRepaint()
Repaint the view because some view parameters may have changed.
final Point tmpPoint
Temporary point.
abstract void updateAll()
Callback function that is called when any square may have changed.
int SQUARE_WIDTH
The width of a square in pixels.
An interface for classes that collect errors.
void resizeMapGrid()
Updates cached information to new map grid size.
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 formatting
void removeMapGridListener(@NotNull final MapGridListener listener)
Removes a MapGridListener.
This package contains the framework for validating maps.
AbstractFlatMapRenderer(@NotNull final MapViewSettings mapViewSettings, @NotNull final MapModel< GameObject, MapArchObject, Archetype > mapModel, @NotNull final MapGrid mapGrid, final int borderSize, @NotNull final GridMapSquarePainter gridMapSquarePainter, @NotNull final GameObjectParser< GameObject, MapArchObject, Archetype > gameObjectParser)
Creates a new instance.
abstract void updateSquare(@NotNull Point point)
Callback function that is called when a square may have changed.
The location of a map file with a map directory.
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 just keep it in mind Nobody is gonna eat you alive when your code causes a GUI bug The best way to deal with it is to test on different systems Another good thing is to design all GUIs with care and avoid fixed sizes like hell
Rectangle getSquareBounds(@NotNull final Point p)
Returns coordinates, length and width of map square.
Reading and writing of maps, handling of paths.
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 area
Interface for listeners listening on MapModel events.
2D-Grid containing flags for selection, pre-selection, cursor, warnings and errors.
final MapModelListener< GameObject, MapArchObject, Archetype > mapModelListener
The MapModelListener to track changes in mapModel.
void paintComponent(@NotNull final Graphics graphics, final boolean isSnapshot, final boolean checkClip)
Paints this component.
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 past
abstract void paintComponent(@NotNull Graphics g)
@noinspection AbstractMethodOverridesConcreteMethod
Base classes for rendering maps.
Interface for event listeners that are interested in changes on {}.
Handles the Crossfire variants of GameObjects and Archetypes.
void paintSquareSelection(@NotNull final Graphics graphics, @NotNull final Point point)
Paints the selection for one square.
Daimonin Editor like your to identify any bugs in the editor
boolean getSquareLocationAt(@NotNull final Point point, @NotNull final Point retPoint)
Returns the map location at the given point.
Handles the Crossfire GameObjects.
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 us
Interface for listeners listening to MapGridEvents.
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 just keep it in mind Nobody is gonna eat you alive when your code causes a GUI bug The best way to deal with it is to test on different systems Another good thing is to design all GUIs with care and avoid fixed sizes like wherever you can You might notice that the basic structure of the code obeys the model view controller scheme Too bad it is halfway messed up and violated
void init()
Finishes initialization of this instance.
void closeNotify()
Must be called when this renderer is not used anymore.
This event is created by MapGrid.
Interface for classes that read or write GameObject instances.
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 system
The class Size2D represents a 2d rectangular area.
int getBorderOffsetY()
Returns the y offset to map borders.
void paintMapGrid(@NotNull final Graphics graphics)
Paints the grid of the whole map.
void paintSquareGrid(@NotNull final Graphics graphics, @NotNull final Point point)
Paints the grid for one square.
int SQUARE_HEIGHT
The height of a square in pixels.
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