[tiled] r567 - in branches/bjorn/src/tiled/mapeditor: . dialog
svn@biggeruniverse.com
svn at biggeruniverse.com
Sat Feb 4 05:52:20 PST 2006
Author: bjorn
Date: 2006-02-04 07:52:19 -0600 (Sat, 04 Feb 2006)
New Revision: 567
Modified:
branches/bjorn/src/tiled/mapeditor/MapEditor.java
branches/bjorn/src/tiled/mapeditor/dialog/AboutDialog.java
Log:
Fixed loading AboutDialog image and some cleanup in MapEditor.
Modified: branches/bjorn/src/tiled/mapeditor/MapEditor.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/MapEditor.java 2006-01-27 10:13:03 UTC (rev 566)
+++ branches/bjorn/src/tiled/mapeditor/MapEditor.java 2006-02-04 13:52:19 UTC (rev 567)
@@ -131,10 +131,8 @@
// Actions
Action zoomInAction, zoomOutAction, zoomNormalAction;
- Action undoAction, redoAction;
Action rot90Action, rot180Action, rot270Action;
Action flipHorAction, flipVerAction;
- Action copyAction, cutAction, pasteAction;
Action selectAllAction, inverseAction, cancelSelectionAction;
public MapEditor() {
@@ -177,16 +175,11 @@
zoomInAction = new ZoomInAction();
zoomOutAction = new ZoomOutAction();
zoomNormalAction = new ZoomNormalAction();
- undoAction = new UndoAction();
- redoAction = new RedoAction();
rot90Action = new LayerTransformAction(MapLayer.ROTATE_90);
rot180Action = new LayerTransformAction(MapLayer.ROTATE_180);
rot270Action = new LayerTransformAction(MapLayer.ROTATE_270);
flipHorAction = new LayerTransformAction(MapLayer.MIRROR_HORIZONTAL);
flipVerAction = new LayerTransformAction(MapLayer.MIRROR_VERTICAL);
- copyAction = new CopyAction();
- pasteAction = new PasteAction();
- cutAction = new CutAction();
selectAllAction = new SelectAllAction();
cancelSelectionAction = new CancelSelectionAction();
inverseAction = new InverseSelectionAction();
@@ -295,14 +288,14 @@
fileMenu.add(createMenuItem("Exit", null, "Exit the map editor",
"control Q"));
- undoMenuItem = new TMenuItem(undoAction);
- redoMenuItem = new TMenuItem(redoAction);
+ undoMenuItem = new TMenuItem(new UndoAction());
+ redoMenuItem = new TMenuItem(new RedoAction());
undoMenuItem.setEnabled(false);
redoMenuItem.setEnabled(false);
- copyMenuItem = new TMenuItem(copyAction);
- cutMenuItem = new TMenuItem(cutAction);
- pasteMenuItem = new TMenuItem(pasteAction);
+ copyMenuItem = new TMenuItem(new CopyAction());
+ cutMenuItem = new TMenuItem(new CutAction());
+ pasteMenuItem = new TMenuItem(new PasteAction());
copyMenuItem.setEnabled(false);
cutMenuItem.setEnabled(false);
pasteMenuItem.setEnabled(false);
@@ -515,7 +508,6 @@
}
private void createData() {
- JButton b;
JToolBar tabsPanel = new JToolBar();
JTabbedPane paintPanel = new JTabbedPane();
Modified: branches/bjorn/src/tiled/mapeditor/dialog/AboutDialog.java
===================================================================
--- branches/bjorn/src/tiled/mapeditor/dialog/AboutDialog.java 2006-01-27 10:13:03 UTC (rev 566)
+++ branches/bjorn/src/tiled/mapeditor/dialog/AboutDialog.java 2006-02-04 13:52:19 UTC (rev 567)
@@ -33,8 +33,8 @@
ImageIcon icon;
try {
- icon = new ImageIcon(ImageIO.read(
- getClass().getResourceAsStream("resources/logo.png")));
+ icon = new ImageIcon(ImageIO.read(MapEditor.class.
+ getResourceAsStream("resources/logo.png")));
JPanel content = new JPanel();
JLabel label = new JLabel(icon);
More information about the tiled-commit
mailing list