[zoom_gui_tweak
douglas@music.columbia.edu**20061216052334
 
 Added + - reset controls for zooming.
 
] {
hunk ./src/com/meapsoft/visualizer/DrawingPanel.java 84
+	
+	public void resetZoom()
+	{
+		iJustZoomed = true;
+		
+		hZoom = 1.0;
+		wZoom = 1.0;
+
+		int w = (int)Math.round(origW * wZoom);
+		int h = (int)Math.round(origH * hZoom);
+		
+		setSize(w, h);
+		setPreferredSize(new Dimension(w, h));
+		image = (BufferedImage)createImage(w, h);
+		scroller.revalidate();
+	}
hunk ./src/com/meapsoft/visualizer/Renderer.java 376
+		zoomPanel.setAlignmentX((float) 0.5);
hunk ./src/com/meapsoft/visualizer/Renderer.java 378
-		JButton zoomInButton = new JButton("zoom in");
+		JLabel zL = new JLabel("zoom:");
+		zL.setAlignmentX((float) 0.5);
+		zL.setBackground(bgColor);
+		zoomPanel.add(zL);
+		
+		JPanel zoomInOutPanel = new JPanel();
+		zoomInOutPanel.setAlignmentX((float) 0.5);
+		zoomInOutPanel.setBackground(bgColor);
+		
+		JButton zoomInButton = new JButton("+");
hunk ./src/com/meapsoft/visualizer/Renderer.java 391
-		zoomPanel.add(zoomInButton);
+		zoomInOutPanel.add(zoomInButton);
hunk ./src/com/meapsoft/visualizer/Renderer.java 393
-		JButton zoomOutButton = new JButton("zoom out");
+		JButton zoomOutButton = new JButton("-");
hunk ./src/com/meapsoft/visualizer/Renderer.java 397
-		zoomPanel.add(zoomOutButton);
+		zoomInOutPanel.add(zoomOutButton);
hunk ./src/com/meapsoft/visualizer/Renderer.java 399
+		zoomPanel.add(zoomInOutPanel);
+		
+		JButton resetZoomButton = new JButton("reset");
+		resetZoomButton.setBackground(bgColor);
+		resetZoomButton.setAlignmentX((float) 0.5);
+		resetZoomButton.setActionCommand("resetZoom");
+		resetZoomButton.addActionListener(this);
+		zoomPanel.add(resetZoomButton);
+				
hunk ./src/com/meapsoft/visualizer/Renderer.java 735
+		else if (command.equals("resetZoom"))
+			drawingPanel.resetZoom();
}
