[tiled] r574 - in branches/bjorn/src/tiled: core io io/xml mapeditor mapeditor/brush mapeditor/dialogs mapeditor/dungeon mapeditor/plugin mapeditor/selection mapeditor/undo mapeditor/util mapeditor/widget plugins/mappy plugins/tmw util view
svn@biggeruniverse.com
svn at biggeruniverse.com
Sat Feb 11 03:42:39 PST 2006
Author: bjorn
Date: 2006-02-11 05:42:38 -0600 (Sat, 11 Feb 2006)
New Revision: 574
Modified:
branches/bjorn/src/tiled/core/KeyFrame.java
branches/bjorn/src/tiled/core/Map.java
branches/bjorn/src/tiled/core/MapLayer.java
branches/bjorn/src/tiled/core/MapObject.java
branches/bjorn/src/tiled/core/MultilayerPlane.java
branches/bjorn/src/tiled/core/ObjectGroup.java
branches/bjorn/src/tiled/core/Sprite.java
branches/bjorn/src/tiled/core/Tile.java
branches/bjorn/src/tiled/core/TileIterator.java
branches/bjorn/src/tiled/core/TileLayer.java
branches/bjorn/src/tiled/core/TileSet.java
branches/bjorn/src/tiled/io/ImageHelper.java
branches/bjorn/src/tiled/io/MapHelper.java
branches/bjorn/src/tiled/io/MapReader.java
branches/bjorn/src/tiled/io/MapWriter.java
branches/bjorn/src/tiled/io/PluggableMapIO.java
branches/bjorn/src/tiled/io/xml/XMLMapTransformer.java
branches/bjorn/src/tiled/io/xml/XMLMapWriter.java
branches/bjorn/src/tiled/io/xml/XMLWriter.java
branches/bjorn/src/tiled/io/xml/XMLWriterException.java
branches/bjorn/src/tiled/mapeditor/BrushDialog.java
branches/bjorn/src/tiled/mapeditor/MapEditor.java
branches/bjorn/src/tiled/mapeditor/TilePaletteDialog.java
branches/bjorn/src/tiled/mapeditor/TilesetManager.java
branches/bjorn/src/tiled/mapeditor/brush/AbstractBrush.java
branches/bjorn/src/tiled/mapeditor/brush/Brush.java
branches/bjorn/src/tiled/mapeditor/brush/CustomBrush.java
branches/bjorn/src/tiled/mapeditor/brush/RandomBrush.java
branches/bjorn/src/tiled/mapeditor/brush/ShapeBrush.java
branches/bjorn/src/tiled/mapeditor/dialogs/AboutDialog.java
branches/bjorn/src/tiled/mapeditor/dialogs/ConfigurationDialog.java
branches/bjorn/src/tiled/mapeditor/dialogs/ImageColorDialog.java
branches/bjorn/src/tiled/mapeditor/dialogs/NewMapDialog.java
branches/bjorn/src/tiled/mapeditor/dialogs/NewTilesetDialog.java
branches/bjorn/src/tiled/mapeditor/dialogs/ObjectDialog.java
branches/bjorn/src/tiled/mapeditor/dialogs/PluginDialog.java
branches/bjorn/src/tiled/mapeditor/dialogs/PropertiesDialog.java
branches/bjorn/src/tiled/mapeditor/dialogs/ResizeDialog.java
branches/bjorn/src/tiled/mapeditor/dialogs/SearchDialog.java
branches/bjorn/src/tiled/mapeditor/dialogs/TileDialog.java
branches/bjorn/src/tiled/mapeditor/dialogs/TileImageDialog.java
branches/bjorn/src/tiled/mapeditor/dungeon/Builder.java
branches/bjorn/src/tiled/mapeditor/dungeon/CorridorBuilder.java
branches/bjorn/src/tiled/mapeditor/plugin/PluginClassLoader.java
branches/bjorn/src/tiled/mapeditor/plugin/TiledPlugin.java
branches/bjorn/src/tiled/mapeditor/selection/SelectionLayer.java
branches/bjorn/src/tiled/mapeditor/undo/MapLayerEdit.java
branches/bjorn/src/tiled/mapeditor/undo/MapLayerStateEdit.java
branches/bjorn/src/tiled/mapeditor/undo/MoveLayerEdit.java
branches/bjorn/src/tiled/mapeditor/undo/UndoStack.java
branches/bjorn/src/tiled/mapeditor/util/ImageCellRenderer.java
branches/bjorn/src/tiled/mapeditor/util/LayerTableModel.java
branches/bjorn/src/tiled/mapeditor/util/MapChangeListener.java
branches/bjorn/src/tiled/mapeditor/util/MapChangedEvent.java
branches/bjorn/src/tiled/mapeditor/util/MapEventAdapter.java
branches/bjorn/src/tiled/mapeditor/util/MapPrinter.java
branches/bjorn/src/tiled/mapeditor/util/MultisetListRenderer.java
branches/bjorn/src/tiled/mapeditor/util/PropertiesTableModel.java
branches/bjorn/src/tiled/mapeditor/util/TileDialogListRenderer.java
branches/bjorn/src/tiled/mapeditor/util/TileSelectionEvent.java
branches/bjorn/src/tiled/mapeditor/util/TileSelectionListener.java
branches/bjorn/src/tiled/mapeditor/util/TiledFileFilter.java
branches/bjorn/src/tiled/mapeditor/util/TilesetTableModel.java
branches/bjorn/src/tiled/mapeditor/util/TransparentImageFilter.java
branches/bjorn/src/tiled/mapeditor/widget/BrushBrowser.java
branches/bjorn/src/tiled/mapeditor/widget/ColorButton.java
branches/bjorn/src/tiled/mapeditor/widget/ImageViewPanel.java
branches/bjorn/src/tiled/mapeditor/widget/IntegerSpinner.java
branches/bjorn/src/tiled/mapeditor/widget/MiniMapViewer.java
branches/bjorn/src/tiled/mapeditor/widget/ResizePanel.java
branches/bjorn/src/tiled/mapeditor/widget/TButton.java
branches/bjorn/src/tiled/mapeditor/widget/TMenuItem.java
branches/bjorn/src/tiled/mapeditor/widget/TileButton.java
branches/bjorn/src/tiled/mapeditor/widget/TilePalettePanel.java
branches/bjorn/src/tiled/mapeditor/widget/VerticalStaticJPanel.java
branches/bjorn/src/tiled/plugins/mappy/MappyMapReader.java
branches/bjorn/src/tiled/plugins/mappy/MappyMapWriter.java
branches/bjorn/src/tiled/plugins/tmw/TMWServerMapWriter.java
branches/bjorn/src/tiled/util/TileMergeHelper.java
branches/bjorn/src/tiled/util/TiledConfiguration.java
branches/bjorn/src/tiled/util/Util.java
branches/bjorn/src/tiled/view/HexMapView.java
branches/bjorn/src/tiled/view/IsoMapView.java
branches/bjorn/src/tiled/view/MapView.java
branches/bjorn/src/tiled/view/ObliqueMapView.java
branches/bjorn/src/tiled/view/OrthoMapView.java
branches/bjorn/src/tiled/view/ShiftedMapView.java
Log:
Some small modifications and updated copyright notices.
Modified: branches/bjorn/src/tiled/core/KeyFrame.java
===================================================================
--- branches/bjorn/src/tiled/core/KeyFrame.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/core/KeyFrame.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/core/Map.java
===================================================================
--- branches/bjorn/src/tiled/core/Map.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/core/Map.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/core/MapLayer.java
===================================================================
--- branches/bjorn/src/tiled/core/MapLayer.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/core/MapLayer.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -168,7 +168,7 @@
* shift this layer from the origin of the map.
*
* @param xOff x offset in tiles
- * @parem yOff y offset in tiles
+ * @param yOff y offset in tiles
*/
public void setOffset(int xOff, int yOff) {
bounds.x = xOff;
Modified: branches/bjorn/src/tiled/core/MapObject.java
===================================================================
--- branches/bjorn/src/tiled/core/MapObject.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/core/MapObject.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/core/MultilayerPlane.java
===================================================================
--- branches/bjorn/src/tiled/core/MultilayerPlane.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/core/MultilayerPlane.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/core/ObjectGroup.java
===================================================================
--- branches/bjorn/src/tiled/core/ObjectGroup.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/core/ObjectGroup.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/core/Sprite.java
===================================================================
--- branches/bjorn/src/tiled/core/Sprite.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/core/Sprite.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/core/Tile.java
===================================================================
--- branches/bjorn/src/tiled/core/Tile.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/core/Tile.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/core/TileIterator.java
===================================================================
--- branches/bjorn/src/tiled/core/TileIterator.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/core/TileIterator.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/core/TileLayer.java
===================================================================
--- branches/bjorn/src/tiled/core/TileLayer.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/core/TileLayer.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/core/TileSet.java
===================================================================
--- branches/bjorn/src/tiled/core/TileSet.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/core/TileSet.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/io/ImageHelper.java
===================================================================
--- branches/bjorn/src/tiled/io/ImageHelper.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/io/ImageHelper.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/io/MapHelper.java
===================================================================
--- branches/bjorn/src/tiled/io/MapHelper.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/io/MapHelper.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -219,7 +219,7 @@
TiledConfiguration config = TiledConfiguration.getInstance();
if (config.keyHasValue("tiled.report.io", 1)) {
- if (s.size() > 0) {
+ if (!s.isEmpty()) {
Iterator itr = s.iterator();
StringBuffer warnings = new StringBuffer();
while (itr.hasNext()) {
Modified: branches/bjorn/src/tiled/io/MapReader.java
===================================================================
--- branches/bjorn/src/tiled/io/MapReader.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/io/MapReader.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@
/**
* Used by Tiled to denote a plugin for reading maps. The map file
* can have any format, as long as the MapReader implementor returns
- * instances of tiled.core.Map and tiled.core.TileSet.
+ * instances of {@link Map} and {@link TileSet}.
*/
public interface MapReader extends PluggableMapIO, FileFilter
{
Modified: branches/bjorn/src/tiled/io/MapWriter.java
===================================================================
--- branches/bjorn/src/tiled/io/MapWriter.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/io/MapWriter.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/io/PluggableMapIO.java
===================================================================
--- branches/bjorn/src/tiled/io/PluggableMapIO.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/io/PluggableMapIO.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/io/xml/XMLMapTransformer.java
===================================================================
--- branches/bjorn/src/tiled/io/xml/XMLMapTransformer.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/io/xml/XMLMapTransformer.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -43,15 +43,15 @@
*/
public class XMLMapTransformer implements MapReader
{
- private Map map = null;
- private String xmlPath = null;
+ private Map map;
+ private String xmlPath;
private Stack warnings;
public XMLMapTransformer() {
warnings = new Stack();
}
- private String makeUrl(String filename) throws MalformedURLException {
+ private static String makeUrl(String filename) throws MalformedURLException {
final String url;
if (filename.indexOf("://") > 0 || filename.startsWith("file:")) {
url = filename;
@@ -61,7 +61,7 @@
return url;
}
- private int reflectFindMethodByName(Class c, String methodName) {
+ private static int reflectFindMethodByName(Class c, String methodName) {
Method[] methods = c.getMethods();
for (int i = 0; i < methods.length; i++) {
if (methods[i].getName().equalsIgnoreCase(methodName)) {
@@ -436,17 +436,17 @@
tile.setImage(id);
int rotation = getAttribute(child, "rotation", 0);
String flipped_s = getAttributeValue(child, "flipped");
- boolean flipped = (flipped_s != null
- && flipped_s.equalsIgnoreCase("true"));
+ boolean flipped = flipped_s != null &&
+ flipped_s.equalsIgnoreCase("true");
int orientation;
if (rotation == 90) {
- orientation = (flipped ? 6 : 4);
+ orientation = flipped ? 6 : 4;
} else if (rotation == 180) {
- orientation = (flipped ? 2 : 3);
+ orientation = flipped ? 2 : 3;
} else if (rotation == 270) {
- orientation = (flipped ? 5 : 7);
+ orientation = flipped ? 5 : 7;
} else {
- orientation = (flipped ? 1 : 0);
+ orientation = flipped ? 1 : 0;
}
tile.setImageOrientation(orientation);
}
@@ -483,7 +483,7 @@
/**
* Loads a map layer from a layer node.
*/
- private MapLayer unmarshalLayer(Node t) throws Exception {
+ private MapLayer readLayer(Node t) throws Exception {
int layerWidth = getAttribute(t, "width", map.getWidth());
int layerHeight = getAttribute(t, "height", map.getHeight());
@@ -645,7 +645,7 @@
getAttributeValue(sibs, "value"));
}
else if (sibs.getNodeName().equals("layer")) {
- MapLayer layer = unmarshalLayer(sibs);
+ MapLayer layer = readLayer(sibs);
if (layer != null) {
map.addLayer(layer);
}
Modified: branches/bjorn/src/tiled/io/xml/XMLMapWriter.java
===================================================================
--- branches/bjorn/src/tiled/io/xml/XMLMapWriter.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/io/xml/XMLMapWriter.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/io/xml/XMLWriter.java
===================================================================
--- branches/bjorn/src/tiled/io/xml/XMLWriter.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/io/xml/XMLWriter.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/io/xml/XMLWriterException.java
===================================================================
--- branches/bjorn/src/tiled/io/xml/XMLWriterException.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/io/xml/XMLWriterException.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/mapeditor/BrushDialog.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/BrushDialog.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/BrushDialog.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/mapeditor/MapEditor.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/MapEditor.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/MapEditor.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/mapeditor/TilePaletteDialog.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/TilePaletteDialog.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/TilePaletteDialog.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/mapeditor/TilesetManager.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/TilesetManager.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/TilesetManager.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/mapeditor/brush/AbstractBrush.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/brush/AbstractBrush.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/brush/AbstractBrush.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/mapeditor/brush/Brush.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/brush/Brush.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/brush/Brush.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/mapeditor/brush/CustomBrush.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/brush/CustomBrush.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/brush/CustomBrush.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/mapeditor/brush/RandomBrush.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/brush/RandomBrush.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/brush/RandomBrush.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/mapeditor/brush/ShapeBrush.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/brush/ShapeBrush.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/brush/ShapeBrush.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/mapeditor/dialogs/AboutDialog.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/dialogs/AboutDialog.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/dialogs/AboutDialog.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/mapeditor/dialogs/ConfigurationDialog.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/dialogs/ConfigurationDialog.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/dialogs/ConfigurationDialog.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/mapeditor/dialogs/ImageColorDialog.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/dialogs/ImageColorDialog.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/dialogs/ImageColorDialog.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/mapeditor/dialogs/NewMapDialog.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/dialogs/NewMapDialog.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/dialogs/NewMapDialog.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/mapeditor/dialogs/NewTilesetDialog.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/dialogs/NewTilesetDialog.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/dialogs/NewTilesetDialog.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/mapeditor/dialogs/ObjectDialog.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/dialogs/ObjectDialog.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/dialogs/ObjectDialog.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/mapeditor/dialogs/PluginDialog.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/dialogs/PluginDialog.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/dialogs/PluginDialog.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/mapeditor/dialogs/PropertiesDialog.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/dialogs/PropertiesDialog.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/dialogs/PropertiesDialog.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/mapeditor/dialogs/ResizeDialog.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/dialogs/ResizeDialog.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/dialogs/ResizeDialog.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/mapeditor/dialogs/SearchDialog.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/dialogs/SearchDialog.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/dialogs/SearchDialog.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -31,9 +31,6 @@
{
private final Map myMap;
private JComboBox searchCBox, replaceCBox;
- private JButton bFind, bFindAll;
- private JButton bReplace, bReplaceAll;
- private JButton bClose;
private Point currentMatch;
private SelectionLayer sl;
private static final double LIST_TILE_SCALE = 0.5;
@@ -88,11 +85,11 @@
BorderFactory.createEmptyBorder(0, 5, 5, 5)));
*/
- bFind = new JButton("Find");
- bFindAll = new JButton("Find All");
- bReplace = new JButton("Replace");
- bReplaceAll = new JButton("Replace All");
- bClose = new JButton("Close");
+ final JButton bFind = new JButton("Find");
+ final JButton bFindAll = new JButton("Find All");
+ final JButton bReplace = new JButton("Replace");
+ final JButton bReplaceAll = new JButton("Replace All");
+ final JButton bClose = new JButton("Close");
bFind.addActionListener(this);
bFindAll.addActionListener(this);
Modified: branches/bjorn/src/tiled/mapeditor/dialogs/TileDialog.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/dialogs/TileDialog.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/dialogs/TileDialog.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/mapeditor/dialogs/TileImageDialog.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/dialogs/TileImageDialog.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/dialogs/TileImageDialog.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/mapeditor/dungeon/Builder.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/dungeon/Builder.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/dungeon/Builder.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/mapeditor/dungeon/CorridorBuilder.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/dungeon/CorridorBuilder.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/dungeon/CorridorBuilder.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/mapeditor/plugin/PluginClassLoader.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/plugin/PluginClassLoader.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/plugin/PluginClassLoader.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -229,7 +229,7 @@
return defineClass(className, buffer, 0, buffer.length);
}
- public boolean doesImplement(Class c, String interfaceName)
+ private static boolean doesImplement(Class c, String interfaceName)
throws Exception
{
if (c == null) {
@@ -247,7 +247,7 @@
}
private boolean isReader(Class c) throws Exception {
- return doesImplement(c,"tiled.io.MapReader");
+ return doesImplement(c, "tiled.io.MapReader");
}
private void _add(Class c) throws Exception{
Modified: branches/bjorn/src/tiled/mapeditor/plugin/TiledPlugin.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/plugin/TiledPlugin.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/plugin/TiledPlugin.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -23,8 +23,7 @@
/**
* A true "plugin" implementation that handles both reading and
* writing as the case may be. Instantiated for every reader/writer pair
- * by the {@link tiled.mapeditor.plugin.PluginClassLoader} when all plugins
- * are loaded.
+ * by the {@link PluginClassLoader} when all plugins are loaded.
*/
public class TiledPlugin implements PluggableMapIO, FileFilter
{
@@ -34,8 +33,8 @@
/**
* Instantiates a new plugin to be used internally by Tiled.
*
- * @param reader The {@link tiled.io.MapReader} implementor for the plugin
- * @param writer The {@link tiled.io.MapWriter} implementor for the plugin
+ * @param reader The {@link MapReader} implementor for the plugin
+ * @param writer The {@link MapWriter} implementor for the plugin
*/
public TiledPlugin(MapReader reader, MapWriter writer) {
this.reader = reader;
@@ -69,9 +68,14 @@
*/
public String getFilter() throws Exception {
String filter = "";
- if(reader!=null) filter = filter + reader.getFilter();
+
+ if (reader != null) {
+ filter += reader.getFilter();
+ }
- if(writer!=null) filter = filter + (filter.length() > 0 ? "," : "") + writer.getFilter();
+ if (writer != null) {
+ filter += (filter.length() > 0 ? "," : "") + writer.getFilter();
+ }
return filter;
}
@@ -80,19 +84,16 @@
* Returns the name of the plugin as set in the reader,
* or, if the reader does not exist, from the writer.
*
- * @see tiled.io.PluggableMapIO#getName()
+ * @see PluggableMapIO#getName()
*/
public String getName() {
- if(reader != null) {
+ if (reader != null) {
return reader.getName();
}
return writer.getName();
}
- /* (non-Javadoc)
- * @see tiled.io.PluggableMapIO#getDescription()
- */
public String getDescription() {
// TODO Auto-generated method stub
return null;
@@ -105,7 +106,8 @@
public boolean accept(File pathname) {
- return (reader != null && reader.accept(pathname)) || (writer != null && writer.accept(pathname));
+ return reader != null && reader.accept(pathname) ||
+ writer != null && writer.accept(pathname);
}
Modified: branches/bjorn/src/tiled/mapeditor/selection/SelectionLayer.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/selection/SelectionLayer.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/selection/SelectionLayer.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/mapeditor/undo/MapLayerEdit.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/undo/MapLayerEdit.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/undo/MapLayerEdit.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -12,17 +12,22 @@
package tiled.mapeditor.undo;
-import javax.swing.undo.*;
+import javax.swing.undo.AbstractUndoableEdit;
+import javax.swing.undo.CannotRedoException;
+import javax.swing.undo.CannotUndoException;
+import javax.swing.undo.UndoableEdit;
-import tiled.core.*;
+import tiled.core.MapLayer;
-
+/**
+ * @version $Id$
+ */
public class MapLayerEdit extends AbstractUndoableEdit
{
private MapLayer editedLayer;
- private MapLayer layerUndo = null, layerRedo = null;
+ private MapLayer layerUndo, layerRedo;
private String name;
- private boolean inProgress = false;
+ private boolean inProgress;
public MapLayerEdit(MapLayer layer) {
editedLayer = layer;
@@ -66,7 +71,7 @@
}
public boolean canUndo() {
- return (layerUndo != null && editedLayer != null);
+ return layerUndo != null && editedLayer != null;
}
public void redo() throws CannotRedoException {
@@ -77,7 +82,7 @@
}
public boolean canRedo() {
- return (layerRedo != null && editedLayer != null);
+ return layerRedo != null && editedLayer != null;
}
public void die() {
@@ -87,7 +92,7 @@
}
public boolean addEdit(UndoableEdit anEdit) {
- if (inProgress && anEdit.getClass() == this.getClass()) {
+ if (inProgress && anEdit.getClass() == getClass()) {
//TODO: absorb the edit
//return true;
}
Modified: branches/bjorn/src/tiled/mapeditor/undo/MapLayerStateEdit.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/undo/MapLayerStateEdit.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/undo/MapLayerStateEdit.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/mapeditor/undo/MoveLayerEdit.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/undo/MoveLayerEdit.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/undo/MoveLayerEdit.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/mapeditor/undo/UndoStack.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/undo/UndoStack.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/undo/UndoStack.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/mapeditor/util/ImageCellRenderer.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/util/ImageCellRenderer.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/util/ImageCellRenderer.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/mapeditor/util/LayerTableModel.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/util/LayerTableModel.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/util/LayerTableModel.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/mapeditor/util/MapChangeListener.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/util/MapChangeListener.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/util/MapChangeListener.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/mapeditor/util/MapChangedEvent.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/util/MapChangedEvent.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/util/MapChangedEvent.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/mapeditor/util/MapEventAdapter.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/util/MapEventAdapter.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/util/MapEventAdapter.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/mapeditor/util/MapPrinter.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/util/MapPrinter.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/util/MapPrinter.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/mapeditor/util/MultisetListRenderer.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/util/MultisetListRenderer.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/util/MultisetListRenderer.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/mapeditor/util/PropertiesTableModel.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/util/PropertiesTableModel.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/util/PropertiesTableModel.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/mapeditor/util/TileDialogListRenderer.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/util/TileDialogListRenderer.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/util/TileDialogListRenderer.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/mapeditor/util/TileSelectionEvent.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/util/TileSelectionEvent.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/util/TileSelectionEvent.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/mapeditor/util/TileSelectionListener.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/util/TileSelectionListener.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/util/TileSelectionListener.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/mapeditor/util/TiledFileFilter.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/util/TiledFileFilter.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/util/TiledFileFilter.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/mapeditor/util/TilesetTableModel.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/util/TilesetTableModel.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/util/TilesetTableModel.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/mapeditor/util/TransparentImageFilter.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/util/TransparentImageFilter.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/util/TransparentImageFilter.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/mapeditor/widget/BrushBrowser.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/widget/BrushBrowser.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/widget/BrushBrowser.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/mapeditor/widget/ColorButton.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/widget/ColorButton.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/widget/ColorButton.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/mapeditor/widget/ImageViewPanel.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/widget/ImageViewPanel.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/widget/ImageViewPanel.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/mapeditor/widget/IntegerSpinner.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/widget/IntegerSpinner.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/widget/IntegerSpinner.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/mapeditor/widget/MiniMapViewer.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/widget/MiniMapViewer.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/widget/MiniMapViewer.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/mapeditor/widget/ResizePanel.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/widget/ResizePanel.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/widget/ResizePanel.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -37,7 +37,6 @@
private double zoom;
public ResizePanel() {
- super();
setLayout(new OverlayLayout(this));
setBorder(BorderFactory.createLoweredBevelBorder());
}
@@ -91,8 +90,8 @@
int newOffsetX = offsetX + (e.getX() - startPress.x);
int newOffsetY = offsetY + (e.getY() - startPress.y);
- newOffsetX /= (currentMap.getTileWidth() * zoom);
- newOffsetY /= (currentMap.getTileHeight() * zoom);
+ newOffsetX /= currentMap.getTileWidth() * zoom;
+ newOffsetY /= currentMap.getTileHeight() * zoom;
if (newOffsetX != offsetX) {
firePropertyChange("offsetX", offsetX, newOffsetX);
Modified: branches/bjorn/src/tiled/mapeditor/widget/TButton.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/widget/TButton.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/widget/TButton.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/mapeditor/widget/TMenuItem.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/widget/TMenuItem.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/widget/TMenuItem.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/mapeditor/widget/TileButton.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/widget/TileButton.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/widget/TileButton.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/mapeditor/widget/TilePalettePanel.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/widget/TilePalettePanel.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/widget/TilePalettePanel.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -23,7 +23,9 @@
import tiled.core.*;
import tiled.mapeditor.util.*;
-
+/**
+ * @version $Id$
+ */
public class TilePalettePanel extends JPanel implements Scrollable,
MouseInputListener
{
@@ -74,7 +76,7 @@
}
public Tile getTileAtPoint(int x, int y) {
- Tile ret = null;
+ Tile ret;
TileSet tileset = (TileSet)tilesets.get(0);
int twidth = tileset.getTileWidth() + 1;
int theight = tileset.getTileHeight() + 1;
@@ -110,7 +112,7 @@
int tilesPerRow = Math.max(1, (getWidth() - 1) / twidth);
int startY = clip.y / theight;
- int endY = ((clip.y + clip.height) / theight) + 1;
+ int endY = (clip.y + clip.height) / theight + 1;
int tileAt = tilesPerRow * startY;
for (int y = startY, gy = startY * theight; y < endY; y++) {
@@ -131,7 +133,7 @@
/**
* Draws checkerboard background.
*/
- private void paintBackground(Graphics g) {
+ private static void paintBackground(Graphics g) {
Rectangle clip = g.getClipBounds();
int side = 10;
@@ -156,7 +158,7 @@
}
public Dimension getPreferredSize() {
- if (tilesets == null || tilesets.size() == 0) {
+ if (tilesets == null || tilesets.isEmpty()) {
return new Dimension(0, 0);
}
else {
@@ -165,8 +167,8 @@
int theight = tileset.getTileHeight() + 1;
int tileCount = tileset.size();
int tilesPerRow = Math.max(1, (getWidth() - 1) / twidth);
- int rows = (tileCount / tilesPerRow +
- (((tileCount) % tilesPerRow > 0) ? 1 : 0));
+ int rows = tileCount / tilesPerRow +
+ (tileCount % tilesPerRow > 0 ? 1 : 0);
return new Dimension(tilesPerRow * twidth + 1, rows * theight + 1);
}
@@ -176,7 +178,7 @@
// Scrollable interface
public Dimension getPreferredScrollableViewportSize() {
- if (tilesets != null && tilesets.size() > 0) {
+ if (tilesets != null && !tilesets.isEmpty()) {
int twidth = 35 + 1;
TileSet tileset = (TileSet)tilesets.get(0);
if (tileset != null) {
Modified: branches/bjorn/src/tiled/mapeditor/widget/VerticalStaticJPanel.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/widget/VerticalStaticJPanel.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/mapeditor/widget/VerticalStaticJPanel.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/plugins/mappy/MappyMapReader.java
===================================================================
--- branches/bjorn/src/tiled/plugins/mappy/MappyMapReader.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/plugins/mappy/MappyMapReader.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Mappy Plugin for Tiled, (c) 2004
+ * Mappy Plugin for Tiled, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@
{
private LinkedList chunks;
private Vector blocks;
- private static final int BLKSTR_WIDTH=32;
+ private static final int BLKSTR_WIDTH = 32;
private int twidth, theight;
public static class BlkStr {
@@ -182,7 +182,7 @@
throw new
IOException("Tile bitdepths less than 16 are not supported!");
}
- retProps.setProperty("(s)depth", "" + depth);
+ retProps.setProperty("(s)depth", String.valueOf(depth));
in.skip(2);
int numBlocks = Util.readShort(in);
int numBlocksGfx = Util.readShort(in);
@@ -196,7 +196,7 @@
for(int i=1;i<7;i++) {
//TODO: I believe this should be ObjectGroup
ml = new ObjectGroup(ret, 0, 0);
- ml.setName("ObjectLayer "+i);
+ ml.setName("ObjectLayer " + i);
ret.addLayer(ml);
}
ml = new TileLayer(ret, ret.getWidth(),ret.getHeight());
@@ -227,8 +227,8 @@
}
private void readBKDTChunk(Map m, InputStream in, int num) throws IOException {
- System.out.println("Reading "+num+" blocks...");
- for(int i = 0;i<num;i++) {
+ System.out.println("Reading " + num + " blocks...");
+ for (int i = 0; i < num; i++) {
blocks.add(readBLKSTR(in));
}
}
@@ -283,12 +283,12 @@
}
private BlkStr readBLKSTR(InputStream in) throws IOException {
- MappyMapReader.BlkStr ret = new MappyMapReader.BlkStr();
- long widthMod = (twidth * theight * 512);
- ret.bg = Util.readLongReverse(in)/widthMod;
- ret.fg0 = Util.readLongReverse(in)/widthMod;
- ret.fg1 = Util.readLongReverse(in)/widthMod;
- ret.fg2 = Util.readLongReverse(in)/widthMod;
+ BlkStr ret = new BlkStr();
+ long widthMod = twidth * theight * 512;
+ ret.bg = Util.readLongReverse(in) / widthMod;
+ ret.fg0 = Util.readLongReverse(in) / widthMod;
+ ret.fg1 = Util.readLongReverse(in) / widthMod;
+ ret.fg2 = Util.readLongReverse(in) / widthMod;
ret.user1 = Util.readLongReverse(in);
ret.user2 = Util.readLongReverse(in);
Modified: branches/bjorn/src/tiled/plugins/mappy/MappyMapWriter.java
===================================================================
--- branches/bjorn/src/tiled/plugins/mappy/MappyMapWriter.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/plugins/mappy/MappyMapWriter.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Mappy Plugin for Tiled, (c) 2004
+ * Mappy Plugin for Tiled, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/plugins/tmw/TMWServerMapWriter.java
===================================================================
--- branches/bjorn/src/tiled/plugins/tmw/TMWServerMapWriter.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/plugins/tmw/TMWServerMapWriter.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * The Mana World Plugin for Tiled, (c) 2004
+ * The Mana World Plugin for Tiled, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -30,6 +30,8 @@
*/
public class TMWServerMapWriter implements MapWriter
{
+ private static final int FIRST_BYTE = 0x000000FF;
+
/**
* Loads a map from a file.
*
@@ -53,15 +55,15 @@
ByteArrayOutputStream baos = new ByteArrayOutputStream();
MapLayer layer = map.getLayer(3);
- if (layer != null && (layer instanceof TileLayer)) {
+ if (layer != null && layer instanceof TileLayer) {
int width = layer.getWidth();
int height = layer.getHeight();
// Write width and height
- out.write((width ) & 0x000000FF);
- out.write((width >> 8) & 0x000000FF);
- out.write((height ) & 0x000000FF);
- out.write((height >> 8) & 0x000000FF);
+ out.write(width & FIRST_BYTE);
+ out.write(width >> 8 & FIRST_BYTE);
+ out.write(height & FIRST_BYTE);
+ out.write(height >> 8 & FIRST_BYTE);
for (int y = 0; y < height; y++) {
for (int x= 0; x < width; x++) {
Modified: branches/bjorn/src/tiled/util/TileMergeHelper.java
===================================================================
--- branches/bjorn/src/tiled/util/TileMergeHelper.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/util/TileMergeHelper.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/util/TiledConfiguration.java
===================================================================
--- branches/bjorn/src/tiled/util/TiledConfiguration.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/util/TiledConfiguration.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/util/Util.java
===================================================================
--- branches/bjorn/src/tiled/util/Util.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/util/Util.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/view/HexMapView.java
===================================================================
--- branches/bjorn/src/tiled/view/HexMapView.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/view/HexMapView.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/view/IsoMapView.java
===================================================================
--- branches/bjorn/src/tiled/view/IsoMapView.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/view/IsoMapView.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/view/MapView.java
===================================================================
--- branches/bjorn/src/tiled/view/MapView.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/view/MapView.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/view/ObliqueMapView.java
===================================================================
--- branches/bjorn/src/tiled/view/ObliqueMapView.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/view/ObliqueMapView.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/view/OrthoMapView.java
===================================================================
--- branches/bjorn/src/tiled/view/OrthoMapView.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/view/OrthoMapView.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Modified: branches/bjorn/src/tiled/view/ShiftedMapView.java
===================================================================
--- branches/bjorn/src/tiled/view/ShiftedMapView.java 2006-02-11 03:30:59 UTC (rev 573)
+++ branches/bjorn/src/tiled/view/ShiftedMapView.java 2006-02-11 11:42:38 UTC (rev 574)
@@ -1,5 +1,5 @@
/*
- * Tiled Map Editor, (c) 2004-2005
+ * Tiled Map Editor, (c) 2004-2006
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -12,21 +12,13 @@
package tiled.view;
-import java.awt.Color;
-import java.awt.Dimension;
-import java.awt.Font;
-import java.awt.Graphics2D;
-import java.awt.Point;
-import java.awt.Polygon;
-import java.awt.Rectangle;
-import java.awt.RenderingHints;
-import java.awt.font.FontRenderContext;
-import java.awt.geom.Rectangle2D;
-import java.util.Iterator;
+import java.awt.*;
import javax.swing.SwingConstants;
-import tiled.core.*;
-import tiled.mapeditor.selection.SelectionLayer;
+import tiled.core.Map;
+import tiled.core.ObjectGroup;
+import tiled.core.TileLayer;
+
public class ShiftedMapView extends MapView
{
private int horSide; // Length of horizontal sides
@@ -55,15 +47,15 @@
int orientation, int direction) {
Dimension tsize = getTileSize(zoom);
if (orientation == SwingConstants.VERTICAL) {
- return tsize.height - ((tsize.height - (int)(verSide * zoom)) / 2);
+ return tsize.height - (tsize.height - (int) (verSide * zoom)) / 2;
} else {
- return tsize.width - ((tsize.width - (int)(horSide * zoom)) / 2);
+ return tsize.width - (tsize.width - (int) (horSide * zoom)) / 2;
}
}
public Dimension getPreferredSize() {
Dimension tsize = getTileSize(zoom);
- int border = ((modeFlags & PF_GRIDMODE) != 0) ? 1 : 0;
+ int border = (modeFlags & PF_GRIDMODE) != 0 ? 1 : 0;
int onceX = (tsize.width - (int)(horSide * zoom)) / 2;
int repeatX = tsize.width - onceX;
int onceY = (tsize.height - (int)(verSide * zoom)) / 2;
More information about the tiled-commit
mailing list