Gridarta Editor
AbstractFlatMapRenderer.java
Go to the documentation of this file.
1 /*
2  * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games.
3  * Copyright (C) 2000-2023 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.var.crossfire.gui.map.renderer;
21 
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;
30 import java.util.Set;
44 import net.sf.gridarta.utils.Size2D;
49 import org.jetbrains.annotations.NotNull;
50 import org.jetbrains.annotations.Nullable;
51 
59 public abstract class AbstractFlatMapRenderer extends AbstractMapRenderer<GameObject, MapArchObject, Archetype> {
60 
64  private static final long serialVersionUID = 1L;
65 
71  @NotNull
72  private final Point borderOffset = new Point();
73 
78  @NotNull
80 
84  @NotNull
86 
91  @NotNull
92  private Size2D mapSize;
93 
97  @NotNull
98  private final MapGrid mapGrid;
99 
104  @NotNull
105  private final Point tmpPoint = new Point();
106 
110  @NotNull
112 
117  @NotNull
118  private final Rectangle tmpRec = new Rectangle();
119 
124  @NotNull
126 
127  @Override
128  public void gridVisibleChanged(final boolean gridVisible) {
129  forceRepaint();
130  }
131 
132  @Override
133  public void lightVisibleChanged(final boolean lightVisible) {
134  forceRepaint();
135  }
136 
137  @Override
138  public void smoothingChanged(final boolean smoothing) {
139  forceRepaint();
140  }
141 
142  @Override
143  public void tileStretchingChanged(final boolean tileStretching) {
144  // does not render tile-stretching
145  }
146 
147  @Override
148  public void doubleFacesChanged(final boolean doubleFaces) {
149  // does not render double faces
150  }
151 
152  @Override
153  public void alphaTypeChanged(final int alphaType) {
154  // does not render alpha types
155  }
156 
157  @Override
158  public void editTypeChanged(final int editType) {
159  // changed game objects will be rendered
160  }
161 
162  @Override
163  public void autojoinChanged(final boolean autojoin) {
164  // does not affect rendering
165  }
166 
167  };
168 
172  @NotNull
174 
175  @Override
176  public void mapSizeChanged(@NotNull final Size2D newSize) {
177  // ignore: will trigger an mapGridChanged() callback
178  }
179 
180  @Override
181  public void mapSquaresChanged(@NotNull final Set<MapSquare<GameObject, MapArchObject, Archetype>> mapSquares) {
182  final Collection<MapSquare<GameObject, MapArchObject, Archetype>> toRepaint = new HashSet<>();
183  for (final MapSquare<GameObject, MapArchObject, Archetype> mapSquare : mapSquares) {
184  getSquaresToRepaint(mapSquare, toRepaint);
185  }
186  for (final MapSquare<GameObject, MapArchObject, Archetype> mapSquare : toRepaint) {
187  paintSquare(mapSquare);
188  }
189  }
190 
191  @Override
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);
196  for (final MapSquare<GameObject, MapArchObject, Archetype> mapSquare : toRepaint) {
197  paintSquare(mapSquare);
198  }
199  }
200 
207  private void addMapSquares(@NotNull final Iterable<GameObject> gameObjects, @NotNull final Collection<MapSquare<GameObject, MapArchObject, Archetype>> toRepaint) {
208  for (final net.sf.gridarta.model.gameobject.GameObject<GameObject, MapArchObject, Archetype> gameObject : gameObjects) {
209  if (!gameObject.isInContainer()) {
210  for (net.sf.gridarta.model.gameobject.GameObject<GameObject, MapArchObject, Archetype> gameObjectPart = gameObject; gameObjectPart != null; gameObjectPart = gameObjectPart.getMultiNext()) {
212  if (square != null) {
213  getSquaresToRepaint(square, toRepaint);
214  }
215  }
216  }
217  }
218  }
219 
226  private void getSquaresToRepaint(@NotNull final MapSquare<GameObject, MapArchObject, Archetype> mapSquare, @NotNull final Collection<MapSquare<GameObject, MapArchObject, Archetype>> toRepaint) {
228  final MapArchObject mapArchObject = mapModel.getMapArchObject();
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);
233  if (mapArchObject.isPointValid(point)) {
234  toRepaint.add(mapModel.getMapSquare(point));
235  }
236  }
237  }
238  } else {
239  toRepaint.add(mapSquare);
240  }
241  }
242 
243  @Override
244  public void errorsChanged(@NotNull final ErrorCollector<GameObject, MapArchObject, Archetype> errors) {
245  // ignore
246  }
247 
248  @Override
249  public void mapFileChanged(@Nullable final MapFile oldMapFile) {
250  // ignore
251  }
252 
253  @Override
254  public void modifiedChanged() {
255  // ignore
256  }
257 
258  };
259 
263  @NotNull
265 
266  @Override
267  public void mapGridChanged(@NotNull final MapGridEvent e) {
268  final Rectangle recChange = mapGrid.getRecChange();
269  updateSquares(recChange);
270  repaint(0L, borderOffset.x + recChange.x * IGUIConstants.SQUARE_WIDTH, borderOffset.y + recChange.y * IGUIConstants.SQUARE_HEIGHT, recChange.width * IGUIConstants.SQUARE_WIDTH, recChange.height * IGUIConstants.SQUARE_HEIGHT);
271  }
272 
273  @Override
274  public void mapGridResized(@NotNull final MapGridEvent e) {
275  resizeMapGrid();
276  }
277 
278  };
279 
291  super(mapModel, gameObjectParser);
292  this.mapViewSettings = mapViewSettings;
293  this.mapModel = mapModel;
294  this.gridMapSquarePainter = gridMapSquarePainter;
295  mapSize = this.mapModel.getMapArchObject().getMapSize();
296  this.mapGrid = mapGrid;
297 
299 
300  setToolTipText("dummy");
301  setFocusable(true);
302  borderOffset.setLocation(borderSize, borderSize);
303  }
304 
308  protected void init() {
309  resizeMapGrid();
310  mapModel.addMapModelListener(mapModelListener);
312  }
313 
314  @Override
315  public void closeNotify() {
316  mapModel.removeMapModelListener(mapModelListener);
319  }
320 
321  @NotNull
322  @Override
323  public Size2D getImageSize() {
325  }
326 
327  @NotNull
328  @Override
329  public BufferedImage getFullImage() {
330  final int viewWidth = IGUIConstants.SQUARE_WIDTH * mapSize.getWidth();
331  final int viewHeight = IGUIConstants.SQUARE_HEIGHT * mapSize.getHeight();
332 
333  // first create a storing place for the image
334  final BufferedImage bufImage = new BufferedImage(viewWidth, viewHeight, BufferedImage.TYPE_INT_ARGB);
335  final Graphics graphics = bufImage.getGraphics();
336  try {
337  graphics.setColor(Color.white);
338  graphics.fillRect(0, 0, viewWidth, viewHeight);
339 
340  // paint the map view into the image
341  final Point storeOffset = new Point(borderOffset);
342  try {
343  borderOffset.setLocation(0, 0);
344  paintComponent(graphics, true, false);
345  } finally {
346  borderOffset.setLocation(storeOffset);
347  }
348  } finally {
349  graphics.dispose();
350  }
351  return bufImage;
352  }
353 
357  @Override
358  public abstract void paintComponent(@NotNull Graphics g);
359 
360  @Override
361  public void forceRepaint() {
362  updateAll();
363  repaint();
364  }
365 
366  @NotNull
367  @Override
368  public Rectangle getSquareBounds(@NotNull final Point p) {
373  return tmpRec;
374  }
375 
380  private void paintSquare(@NotNull final MapSquare<GameObject, MapArchObject, Archetype> square) {
381  final Point pos = square.getMapLocation();
382  updateSquare(pos);
384  }
385 
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());
397  paintMap(graphics, checkClip);
398  if (!isSnapshot) {
399  paintMapGrid(graphics);
400  paintMapSelection(graphics);
401  }
402  }
403 
410  protected void paintSquareGrid(@NotNull final Graphics graphics, @NotNull final Point point) {
414  }
415  }
416 
422  protected void paintSquareSelection(@NotNull final Graphics graphics, @NotNull final Point point) {
423  final int gridFlags = mapGrid.getFlags(point.x, point.y);
424  final boolean light = (isLightVisible() ^ mapViewSettings.isLightVisible()) && mapModel.getMapSquare(point).isLight();
425  gridMapSquarePainter.paint(graphics, gridFlags, light, borderOffset.x + point.x * IGUIConstants.SQUARE_WIDTH, borderOffset.y + point.y * IGUIConstants.SQUARE_HEIGHT, this);
426  }
427 
434  private void paintMap(@NotNull final Graphics graphics, final boolean checkClip) {
435  for (tmpPoint.y = 0; tmpPoint.y < mapGrid.getSize().getHeight(); tmpPoint.y++) {
436  final int y = borderOffset.y + tmpPoint.y * IGUIConstants.SQUARE_HEIGHT;
437  for (tmpPoint.x = 0; tmpPoint.x < mapGrid.getSize().getWidth(); tmpPoint.x++) {
438  final int x = borderOffset.x + tmpPoint.x * IGUIConstants.SQUARE_WIDTH;
439  if (!checkClip || graphics.hitClip(x, y, IGUIConstants.SQUARE_WIDTH, IGUIConstants.SQUARE_HEIGHT)) {
440  paintSquare(graphics, x, y, mapModel.getMapSquare(tmpPoint));
441  }
442  }
443  }
444  }
445 
452  private void paintMapSelection(@NotNull final Graphics graphics) {
453  for (tmpPoint.y = 0; tmpPoint.y < mapSize.getHeight(); tmpPoint.y++) {
454  final int y = borderOffset.y + tmpPoint.y * IGUIConstants.SQUARE_HEIGHT;
455  for (tmpPoint.x = 0; tmpPoint.x < mapSize.getWidth(); tmpPoint.x++) {
456  final int x = borderOffset.x + tmpPoint.x * IGUIConstants.SQUARE_WIDTH;
457  if (graphics.hitClip(x, y, IGUIConstants.SQUARE_WIDTH, IGUIConstants.SQUARE_HEIGHT)) {
458  paintSquareSelection(graphics, tmpPoint);
459  }
460  }
461  }
462  }
463 
470  private void paintMapGrid(@NotNull final Graphics graphics) {
472  final Size2D tmpMapSize = mapGrid.getSize();
473  final int mapWidth = tmpMapSize.getWidth();
474  final int mapHeight = tmpMapSize.getHeight();
475  for (int x = 0; x <= mapWidth; x++) {
477  }
478  for (int y = 0; y <= mapHeight; y++) {
480  }
481  }
482  }
483 
484  @Override
485  public boolean getSquareLocationAt(@NotNull final Point point, @NotNull final Point retPoint) {
486  final int x = point.x - borderOffset.x;
487  final int y = point.y - borderOffset.y;
488  if (x < 0 || y < 0) {
489  return false;
490  }
491  final int xm = x / IGUIConstants.SQUARE_WIDTH;
492  final int ym = y / IGUIConstants.SQUARE_HEIGHT;
493  if (xm >= mapSize.getWidth() || ym >= mapSize.getHeight()) {
494  return false;
495  }
496 
497  retPoint.setLocation(xm, ym);
498  return true;
499  }
500 
506  protected abstract void resizeBackBuffer(@NotNull Dimension size);
507 
515  protected abstract void paintSquare(@NotNull Graphics g, int x, int y, @NotNull MapSquare<GameObject, MapArchObject, Archetype> square);
516 
520  private void resizeMapGrid() {
521  // define how much drawing space we need for the map
522  mapSize = mapGrid.getSize();
523  final Dimension forcedSize = new Dimension(mapSize.getWidth() * IGUIConstants.SQUARE_WIDTH + 2 * borderOffset.x, mapSize.getHeight() * IGUIConstants.SQUARE_HEIGHT + 2 * borderOffset.y);
524  resizeBackBuffer(forcedSize);
525  setPreferredSize(forcedSize);
526  setMinimumSize(forcedSize);
527  revalidate();
528  forceRepaint();
529  }
530 
535  protected abstract void updateSquare(@NotNull Point point);
536 
541  protected abstract void updateSquares(@NotNull Rectangle rectangle);
542 
546  protected abstract void updateAll();
547 
552  protected int getBorderOffsetX() {
553  return borderOffset.x;
554  }
555 
560  protected int getBorderOffsetY() {
561  return borderOffset.y;
562  }
563 
564 }
net.sf.gridarta.model.mapviewsettings.MapViewSettings.removeMapViewSettingsListener
void removeMapViewSettingsListener(@NotNull MapViewSettingsListener listener)
net.sf.gridarta.model.mapmodel.MapFile
Definition: MapFile.java:31
net.sf.gridarta.var.crossfire.gui.map.renderer.AbstractFlatMapRenderer.paintSquareSelection
void paintSquareSelection(@NotNull final Graphics graphics, @NotNull final Point point)
Definition: AbstractFlatMapRenderer.java:422
net.sf.gridarta.model.mapviewsettings.MapViewSettings.isSmoothing
boolean isSmoothing()
net.sf.gridarta.var.crossfire.gui.map.renderer.AbstractFlatMapRenderer.getBorderOffsetY
int getBorderOffsetY()
Definition: AbstractFlatMapRenderer.java:560
net.sf.gridarta.var.crossfire.gui.map.renderer.AbstractFlatMapRenderer.getFullImage
BufferedImage getFullImage()
Definition: AbstractFlatMapRenderer.java:329
net.sf.gridarta.var.crossfire.gui.map.renderer.AbstractFlatMapRenderer.mapModel
final MapModel< GameObject, MapArchObject, Archetype > mapModel
Definition: AbstractFlatMapRenderer.java:79
net.sf.gridarta.var.crossfire.gui.map.renderer.AbstractFlatMapRenderer.mapModelListener
final MapModelListener< GameObject, MapArchObject, Archetype > mapModelListener
Definition: AbstractFlatMapRenderer.java:173
net.sf.gridarta.model.mapgrid.MapGrid
Definition: MapGrid.java:46
net.sf.gridarta.var.crossfire.model.archetype
Definition: Archetype.java:20
net.sf.gridarta.var.crossfire.gui.map.renderer.AbstractFlatMapRenderer.serialVersionUID
static final long serialVersionUID
Definition: AbstractFlatMapRenderer.java:64
net.sf.gridarta
net.sf.gridarta.gui.map.renderer.GridMapSquarePainter
Definition: GridMapSquarePainter.java:34
hell
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
Definition: Developer_README.txt:80
net.sf.gridarta.var.crossfire.IGUIConstants
Definition: IGUIConstants.java:30
net.sf.gridarta.var.crossfire.gui.map.renderer.AbstractFlatMapRenderer.paintSquare
void paintSquare(@NotNull final MapSquare< GameObject, MapArchObject, Archetype > square)
Definition: AbstractFlatMapRenderer.java:380
net.sf.gridarta.var.crossfire.gui.map.renderer.AbstractFlatMapRenderer
Definition: AbstractFlatMapRenderer.java:59
editor
Daimonin Editor like your to identify any bugs in the editor
Definition: ReadMe.txt:5
net.sf.gridarta.model.mapviewsettings
Definition: AbstractMapViewSettings.java:20
files
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
Definition: README.txt:26
net.sf.gridarta.var.crossfire.gui.map.renderer.AbstractFlatMapRenderer.paintSquareGrid
void paintSquareGrid(@NotNull final Graphics graphics, @NotNull final Point point)
Definition: AbstractFlatMapRenderer.java:410
net.sf.gridarta.model.mapgrid.MapGrid.getRecChange
Rectangle getRecChange()
Definition: MapGrid.java:495
net.sf
that
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
Definition: Developer_README.txt:22
net.sf.gridarta.model.mapmodel
Definition: AboveFloorInsertionMode.java:20
it
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
Definition: Developer_README.txt:76
net.sf.gridarta.var.crossfire.gui.map.renderer.AbstractFlatMapRenderer.mapViewSettingsListener
final MapViewSettingsListener mapViewSettingsListener
Definition: AbstractFlatMapRenderer.java:125
net.sf.gridarta.var.crossfire.gui.map.renderer.AbstractFlatMapRenderer.updateAll
abstract void updateAll()
net.sf.gridarta.gui.map.renderer
Definition: AbstractIsoMapRenderer.java:20
net.sf.gridarta.var.crossfire.gui.map.renderer.AbstractFlatMapRenderer.forceRepaint
void forceRepaint()
Definition: AbstractFlatMapRenderer.java:361
net.sf.gridarta.model.io.GameObjectParser
Definition: GameObjectParser.java:37
net.sf.gridarta.var
net.sf.gridarta.model.mapgrid.MapGridEvent
Definition: MapGridEvent.java:29
net.sf.gridarta.gui.map.renderer.AbstractMapRenderer.isLightVisible
boolean isLightVisible()
Definition: AbstractMapRenderer.java:150
I
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)
net.sf.gridarta.gui.map.renderer.AbstractMapRenderer
Definition: AbstractMapRenderer.java:45
net.sf.gridarta.model.mapmodel.MapModel
Definition: MapModel.java:75
net.sf.gridarta.var.crossfire.gui.map.renderer.AbstractFlatMapRenderer.AbstractFlatMapRenderer
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)
Definition: AbstractFlatMapRenderer.java:290
net.sf.gridarta.gui.map.renderer.AbstractMapRenderer.lightVisible
boolean lightVisible
Definition: AbstractMapRenderer.java:80
net.sf.gridarta.model.mapmodel.MapSquare
Definition: MapSquare.java:45
net.sf.gridarta.gui
net.sf.gridarta.model.gameobject.GameObject
Definition: GameObject.java:36
net.sf.gridarta.model.mapgrid.MapGrid.getSize
Size2D getSize()
Definition: MapGrid.java:504
formatting
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
Definition: Developer_README.txt:16
net.sf.gridarta.var.crossfire.IGUIConstants.SQUARE_WIDTH
int SQUARE_WIDTH
Definition: IGUIConstants.java:35
net.sf.gridarta.model.gameobject
Definition: AbstractGameObject.java:20
us
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
Definition: Developer_README.txt:12
area
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
Definition: Developer_README.txt:57
net
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 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
Definition: Developer_README.txt:36
net.sf.gridarta.utils.Size2D
Definition: Size2D.java:30
net.sf.gridarta.var.crossfire.gui.map.renderer.AbstractFlatMapRenderer.paintMap
void paintMap(@NotNull final Graphics graphics, final boolean checkClip)
Definition: AbstractFlatMapRenderer.java:434
net.sf.gridarta.gui.map.renderer.GridMapSquarePainter.paint
void paint(@NotNull final Graphics graphics, final int gridFlags, final boolean light, final int x, final int y, @NotNull final ImageObserver imageObserver)
Definition: GridMapSquarePainter.java:108
net.sf.gridarta.model.mapmodel.MapSquare.getMapSquareOptional
MapSquare< G, A, R > getMapSquareOptional()
Definition: MapSquare.java:156
net.sf.gridarta.var.crossfire.gui.map.renderer.AbstractFlatMapRenderer.getSquareLocationAt
boolean getSquareLocationAt(@NotNull final Point point, @NotNull final Point retPoint)
Definition: AbstractFlatMapRenderer.java:485
errors
errors
Definition: ArchetypeTypeSetParserTest-ignoreDefaultAttribute1-result.txt:1
net.sf.gridarta.var.crossfire
net.sf.gridarta.var.crossfire.gui.map.renderer.AbstractFlatMapRenderer.updateSquares
abstract void updateSquares(@NotNull Rectangle rectangle)
net.sf.gridarta.var.crossfire.model.maparchobject.MapArchObject
Definition: MapArchObject.java:39
net.sf.gridarta.var.crossfire.model
So
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
Definition: Developer_README.txt:56
past
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
Definition: Developer_README.txt:37
net.sf.gridarta.var.crossfire.gui.map.renderer.AbstractFlatMapRenderer.mapGrid
final MapGrid mapGrid
Definition: AbstractFlatMapRenderer.java:98
list
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
Definition: Developer_README.txt:13
violated
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
Definition: Developer_README.txt:84
net.sf.gridarta.var.crossfire.model.gameobject.GameObject
Definition: GameObject.java:41
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 directory
Definition: Developer_README.txt:45
net.sf.gridarta.model.validation
Definition: AbstractValidator.java:20
net.sf.gridarta.gui.map.renderer.AbstractMapRenderer.gameObjectParser
final GameObjectParser< G, A, R > gameObjectParser
Definition: AbstractMapRenderer.java:75
net.sf.gridarta.var.crossfire.gui.map.renderer.AbstractFlatMapRenderer.paintMapGrid
void paintMapGrid(@NotNull final Graphics graphics)
Definition: AbstractFlatMapRenderer.java:470
net.sf.gridarta.var.crossfire.gui.map.renderer.AbstractFlatMapRenderer.resizeBackBuffer
abstract void resizeBackBuffer(@NotNull Dimension size)
net.sf.gridarta.model.mapgrid.MapGrid.removeMapGridListener
void removeMapGridListener(@NotNull final MapGridListener listener)
Definition: MapGrid.java:198
net.sf.gridarta.model.mapviewsettings.MapViewSettings.addMapViewSettingsListener
void addMapViewSettingsListener(@NotNull MapViewSettingsListener listener)
system
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
Definition: Developer_README.txt:71
net.sf.gridarta.model.mapviewsettings.MapViewSettings.isLightVisible
boolean isLightVisible()
net.sf.gridarta.var.crossfire.gui.map.renderer.AbstractFlatMapRenderer.paintComponent
void paintComponent(@NotNull final Graphics graphics, final boolean isSnapshot, final boolean checkClip)
Definition: AbstractFlatMapRenderer.java:394
net.sf.gridarta.var.crossfire.gui.map.renderer.AbstractFlatMapRenderer.paintMapSelection
void paintMapSelection(@NotNull final Graphics graphics)
Definition: AbstractFlatMapRenderer.java:452
net.sf.gridarta.var.crossfire.gui.map.renderer.AbstractFlatMapRenderer.updateSquare
abstract void updateSquare(@NotNull Point point)
net.sf.gridarta.model.io
Definition: AbstractArchetypeParser.java:20
net.sf.gridarta.model.mapgrid.MapGrid.getFlags
int getFlags(final int x, final int y)
Definition: MapGrid.java:476
net.sf.gridarta.utils.Size2D.getHeight
int getHeight()
Definition: Size2D.java:104
allowed
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
Definition: Developer_README.txt:31
net.sf.gridarta.model.mapgrid
Definition: MapGrid.java:20
net.sf.gridarta.var.crossfire.gui.map.renderer.AbstractFlatMapRenderer.mapViewSettings
final MapViewSettings mapViewSettings
Definition: AbstractFlatMapRenderer.java:111
net.sf.gridarta.model.mapviewsettings.MapViewSettings
Definition: MapViewSettings.java:30
net.sf.gridarta.utils.Size2D.getWidth
int getWidth()
Definition: Size2D.java:96
net.sf.gridarta.model
net.sf.gridarta.var.crossfire.model.maparchobject
Definition: DefaultMapArchObjectFactory.java:20
net.sf.gridarta.gui.map
Definition: AbstractPerMapDialogManager.java:20
net.sf.gridarta.var.crossfire.gui.map.renderer.AbstractFlatMapRenderer.paintComponent
abstract void paintComponent(@NotNull Graphics g)
however
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
Definition: Developer_README.txt:26
so
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
Definition: ReadMe.txt:19
net.sf.gridarta.var.crossfire.gui.map.renderer.AbstractFlatMapRenderer.mapSize
Size2D mapSize
Definition: AbstractFlatMapRenderer.java:92
net.sf.gridarta.var.crossfire.gui.map.renderer.AbstractFlatMapRenderer.tmpRec
final Rectangle tmpRec
Definition: AbstractFlatMapRenderer.java:118
net.sf.gridarta.var.crossfire.model.gameobject
Definition: DefaultGameObjectFactory.java:20
net.sf.gridarta.model.maparchobject.AbstractMapArchObject.isPointValid
boolean isPointValid(@Nullable final Point pos)
Definition: AbstractMapArchObject.java:598
net.sf.gridarta.var.crossfire.gui.map.renderer.AbstractFlatMapRenderer.mapGridListener
final MapGridListener mapGridListener
Definition: AbstractFlatMapRenderer.java:264
net.sf.gridarta.var.crossfire.gui.map.renderer.AbstractFlatMapRenderer.tmpPoint
final Point tmpPoint
Definition: AbstractFlatMapRenderer.java:105
net.sf.gridarta.var.crossfire.gui.map.renderer.AbstractFlatMapRenderer.closeNotify
void closeNotify()
Definition: AbstractFlatMapRenderer.java:315
net.sf.gridarta.var.crossfire.model.archetype.Archetype
Definition: Archetype.java:30
net.sf.gridarta.model.mapgrid.MapGridListener
Definition: MapGridListener.java:29
mind
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
Definition: Developer_README.txt:7
net.sf.gridarta.var.crossfire.gui.map.renderer.AbstractFlatMapRenderer.borderOffset
final Point borderOffset
Definition: AbstractFlatMapRenderer.java:72
net.sf.gridarta.model.mapmodel.MapModelListener
Definition: MapModelListener.java:36
net.sf.gridarta.var.crossfire.IGUIConstants.SQUARE_HEIGHT
int SQUARE_HEIGHT
Definition: IGUIConstants.java:40
net.sf.gridarta.var.crossfire.gui.map.renderer.AbstractFlatMapRenderer.getBorderOffsetX
int getBorderOffsetX()
Definition: AbstractFlatMapRenderer.java:552
net.sf.gridarta.model.mapviewsettings.MapViewSettings.isGridVisible
boolean isGridVisible()
net.sf.gridarta.var.crossfire.gui.map.renderer.AbstractFlatMapRenderer.gridMapSquarePainter
final GridMapSquarePainter gridMapSquarePainter
Definition: AbstractFlatMapRenderer.java:85
net.sf.gridarta.var.crossfire.gui.map.renderer.AbstractFlatMapRenderer.getSquareBounds
Rectangle getSquareBounds(@NotNull final Point p)
Definition: AbstractFlatMapRenderer.java:368
Java
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
Definition: Developer_README.txt:34
net.sf.gridarta.model.mapgrid.MapGrid.addMapGridListener
void addMapGridListener(@NotNull final MapGridListener listener)
Definition: MapGrid.java:190
Then
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
Definition: Developer_README.txt:9
net.sf.gridarta.utils
Definition: ActionBuilderUtils.java:20
net.sf.gridarta.var.crossfire.gui.map.renderer.AbstractFlatMapRenderer.init
void init()
Definition: AbstractFlatMapRenderer.java:308
net.sf.gridarta.model.mapviewsettings.MapViewSettingsListener
Definition: MapViewSettingsListener.java:31
net.sf.gridarta.var.crossfire.gui.map.renderer.AbstractFlatMapRenderer.getImageSize
Size2D getImageSize()
Definition: AbstractFlatMapRenderer.java:323
net.sf.gridarta.var.crossfire.gui.map.renderer.AbstractFlatMapRenderer.resizeMapGrid
void resizeMapGrid()
Definition: AbstractFlatMapRenderer.java:520
net.sf.gridarta.model.validation.ErrorCollector
Definition: ErrorCollector.java:33