Index: applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/CalibrationFileFilter.java
===================================================================
--- applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/CalibrationFileFilter.java	(revision 22549)
+++ applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/CalibrationFileFilter.java	(revision 23190)
@@ -30,21 +30,21 @@
  */
 public class CalibrationFileFilter extends FileFilter {
-	
-	// Extension used by calibration files
-	public static final String EXTENSION = ".cal";
 
-	@Override
-	public boolean accept(File f) {
-	    String ext3 = ( f.getName().length() > 4 ) ?  f.getName().substring( f.getName().length() - 4 ).toLowerCase() : "";
+    // Extension used by calibration files
+    public static final String EXTENSION = ".cal";
 
-	    // TODO: check what is supported by Java :)
-	    return ( f.isDirectory() 
-	    	||	ext3.equals( EXTENSION )
-	    	);
-	}
+    @Override
+    public boolean accept(File f) {
+        String ext3 = ( f.getName().length() > 4 ) ?  f.getName().substring( f.getName().length() - 4 ).toLowerCase() : "";
 
-	@Override
-	public String getDescription() {
-		return tr("Calibration Files")+ " (*" + EXTENSION + ")";
-	}
+        // TODO: check what is supported by Java :)
+        return ( f.isDirectory()
+            ||  ext3.equals( EXTENSION )
+            );
+    }
+
+    @Override
+    public String getDescription() {
+        return tr("Calibration Files")+ " (*" + EXTENSION + ")";
+    }
 }
Index: applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/LoadPictureCalibrationAction.java
===================================================================
--- applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/LoadPictureCalibrationAction.java	(revision 22549)
+++ applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/LoadPictureCalibrationAction.java	(revision 23190)
@@ -44,40 +44,40 @@
 public class LoadPictureCalibrationAction extends JosmAction {
 
-	// Owner layer of the action
-	PicLayerAbstract m_owner = null;
-	
-	/**
-	 * Constructor
-	 */
-	public LoadPictureCalibrationAction( PicLayerAbstract owner ) {
-		super(tr("Load Picture Calibration..."), null, tr("Loads calibration data to a file"), null, false);
-		// Remember the owner...
-		m_owner = owner;
-	}
-	
-	/**
-	 * Action handler
-	 */
-	public void actionPerformed(ActionEvent arg0) {
-		// Save dialog
-		final JFileChooser fc = new JFileChooser();
-		fc.setAcceptAllFileFilterUsed( false );
-		fc.setFileFilter( new CalibrationFileFilter() );
-		fc.setSelectedFile( new File(m_owner.getPicLayerName() + CalibrationFileFilter.EXTENSION));
-		int result = fc.showOpenDialog(Main.parent );
+    // Owner layer of the action
+    PicLayerAbstract m_owner = null;
+    
+    /**
+     * Constructor
+     */
+    public LoadPictureCalibrationAction( PicLayerAbstract owner ) {
+        super(tr("Load Picture Calibration..."), null, tr("Loads calibration data to a file"), null, false);
+        // Remember the owner...
+        m_owner = owner;
+    }
+    
+    /**
+     * Action handler
+     */
+    public void actionPerformed(ActionEvent arg0) {
+        // Save dialog
+        final JFileChooser fc = new JFileChooser();
+        fc.setAcceptAllFileFilterUsed( false );
+        fc.setFileFilter( new CalibrationFileFilter() );
+        fc.setSelectedFile( new File(m_owner.getPicLayerName() + CalibrationFileFilter.EXTENSION));
+        int result = fc.showOpenDialog(Main.parent );
 
-		if ( result == JFileChooser.APPROVE_OPTION ) {
-					
-			// Load	
-			try {
-				Properties props = new Properties();
-				props.load(new FileInputStream(fc.getSelectedFile()));
-				m_owner.loadCalibration(props);
-			} catch (Exception e) {
-				// Error
-				e.printStackTrace();
-				JOptionPane.showMessageDialog(Main.parent , tr("Loading file failed: {0}", e.getMessage()));
-			}
-		}
-	}
+        if ( result == JFileChooser.APPROVE_OPTION ) {
+                    
+            // Load 
+            try {
+                Properties props = new Properties();
+                props.load(new FileInputStream(fc.getSelectedFile()));
+                m_owner.loadCalibration(props);
+            } catch (Exception e) {
+                // Error
+                e.printStackTrace();
+                JOptionPane.showMessageDialog(Main.parent , tr("Loading file failed: {0}", e.getMessage()));
+            }
+        }
+    }
 }
Index: applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/MovePictureAction.java
===================================================================
--- applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/MovePictureAction.java	(revision 22549)
+++ applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/MovePictureAction.java	(revision 23190)
@@ -38,23 +38,23 @@
  * This class handles the input during moving the picture.
  */
-public class MovePictureAction extends MapMode implements MouseListener, MouseMotionListener 
+public class MovePictureAction extends MapMode implements MouseListener, MouseMotionListener
 {
-	// Action ongoing?
-	private boolean mb_dragging = false;
-	
-	// Last mouse position
-	private EastNorth m_prevEastNorth;
-	
-	// The layer we're working on
-	private PicLayerAbstract m_currentLayer = null;
-	
-	/**
-	 * Constructor
-	 */
-	public MovePictureAction(MapFrame frame) {
-		super(tr("PicLayer move"), "move", tr("Drag to move the picture"), frame, ImageProvider.getCursor("crosshair", null));
-	}
+    // Action ongoing?
+    private boolean mb_dragging = false;
 
-    @Override 
+    // Last mouse position
+    private EastNorth m_prevEastNorth;
+
+    // The layer we're working on
+    private PicLayerAbstract m_currentLayer = null;
+
+    /**
+     * Constructor
+     */
+    public MovePictureAction(MapFrame frame) {
+        super(tr("PicLayer move"), "move", tr("Drag to move the picture"), frame, ImageProvider.getCursor("crosshair", null));
+    }
+
+    @Override
     public void enterMode() {
         super.enterMode();
@@ -63,32 +63,32 @@
     }
 
-    @Override 
+    @Override
     public void exitMode() {
         super.exitMode();
         Main.map.mapView.removeMouseListener(this);
         Main.map.mapView.removeMouseMotionListener(this);
-    }	
-	
-    @Override 
+    }
+
+    @Override
     public void mousePressed(MouseEvent e) {
-       
-    	// If everything is OK, we start dragging/moving the picture
-    	if ( Main.map.mapView.getActiveLayer() instanceof PicLayerAbstract ) {
-	        m_currentLayer = (PicLayerAbstract)Main.map.mapView.getActiveLayer();
-	        
-	        if ( m_currentLayer != null && e.getButton() == MouseEvent.BUTTON1 ) {
-	        	mb_dragging = true;
-	        	m_prevEastNorth=Main.map.mapView.getEastNorth(e.getX(),e.getY());
-	        }
-    	}
-    }   
-    
-    @Override 
+
+        // If everything is OK, we start dragging/moving the picture
+        if ( Main.map.mapView.getActiveLayer() instanceof PicLayerAbstract ) {
+            m_currentLayer = (PicLayerAbstract)Main.map.mapView.getActiveLayer();
+
+            if ( m_currentLayer != null && e.getButton() == MouseEvent.BUTTON1 ) {
+                mb_dragging = true;
+                m_prevEastNorth=Main.map.mapView.getEastNorth(e.getX(),e.getY());
+            }
+        }
+    }
+
+    @Override
     public void mouseDragged(MouseEvent e) {
-    	// Picture moving is ongoing
+        // Picture moving is ongoing
         if(mb_dragging) {
             EastNorth eastNorth = Main.map.mapView.getEastNorth(e.getX(),e.getY());
             m_currentLayer.movePictureBy(
-            	eastNorth.east()-m_prevEastNorth.east(), 
+                eastNorth.east()-m_prevEastNorth.east(),
                 eastNorth.north()-m_prevEastNorth.north()
             );
@@ -96,11 +96,11 @@
             Main.map.mapView.repaint();
         }
-    }    
-    
-    @Override 
+    }
+
+    @Override
     public void mouseReleased(MouseEvent e) {
-    	// Stop moving
-    	mb_dragging = false;
-    }    
+        // Stop moving
+        mb_dragging = false;
+    }
 
 }
Index: applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/NewLayerFromClipboardAction.java
===================================================================
--- applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/NewLayerFromClipboardAction.java	(revision 22549)
+++ applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/NewLayerFromClipboardAction.java	(revision 23190)
@@ -35,30 +35,30 @@
  */
 public class NewLayerFromClipboardAction extends JosmAction {
-	
-	/**
-	 * Constructor...
-	 */
-	public NewLayerFromClipboardAction() {
-		super(tr("New picture layer from clipboard"), null, null, null, false);
-	}
 
-	/**
-	 * Action handler
-	 */
-	public void actionPerformed(ActionEvent arg0) {
-		// Create layer from clipboard
-		PicLayerFromClipboard layer = new PicLayerFromClipboard();
-		// Add layer only if successfully initialized
-		try {
-			layer.initialize();
-		}
-		catch (IOException e) {
-			// Failed
-			System.out.println( "NewLayerFromClipboardAction::actionPerformed - " + e.getMessage() );
-			JOptionPane.showMessageDialog(null, e.getMessage() );  
-			return;
-		}
-		// Add layer
-		Main.main.addLayer( layer );
-	}
+    /**
+     * Constructor...
+     */
+    public NewLayerFromClipboardAction() {
+        super(tr("New picture layer from clipboard"), null, null, null, false);
+    }
+
+    /**
+     * Action handler
+     */
+    public void actionPerformed(ActionEvent arg0) {
+        // Create layer from clipboard
+        PicLayerFromClipboard layer = new PicLayerFromClipboard();
+        // Add layer only if successfully initialized
+        try {
+            layer.initialize();
+        }
+        catch (IOException e) {
+            // Failed
+            System.out.println( "NewLayerFromClipboardAction::actionPerformed - " + e.getMessage() );
+            JOptionPane.showMessageDialog(null, e.getMessage() );
+            return;
+        }
+        // Add layer
+        Main.main.addLayer( layer );
+    }
 }
Index: applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/NewLayerFromFileAction.java
===================================================================
--- applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/NewLayerFromFileAction.java	(revision 22549)
+++ applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/NewLayerFromFileAction.java	(revision 23190)
@@ -39,68 +39,68 @@
  */
 public class NewLayerFromFileAction extends JosmAction {
-	
-	/**
-	 * Provides filtering of only image files.
-	 */
-	private class ImageFileFilter extends FileFilter {
 
-		@Override
-		public boolean accept(File f) {
-		    
-		    String ext3 = ( f.getName().length() > 4 ) ?  f.getName().substring( f.getName().length() - 4 ).toLowerCase() : "";
-		    String ext4 = ( f.getName().length() > 5 ) ?  f.getName().substring( f.getName().length() - 5 ).toLowerCase() : "";
+    /**
+     * Provides filtering of only image files.
+     */
+    private class ImageFileFilter extends FileFilter {
 
-		    // TODO: check what is supported by Java :)
-		    return ( f.isDirectory() 
-		    	||	ext3.equals( ".jpg" )
-		    	||	ext4.equals( ".jpeg" )
-		    	||	ext3.equals( ".png" )
-		    	);
-		}
+        @Override
+        public boolean accept(File f) {
+
+            String ext3 = ( f.getName().length() > 4 ) ?  f.getName().substring( f.getName().length() - 4 ).toLowerCase() : "";
+            String ext4 = ( f.getName().length() > 5 ) ?  f.getName().substring( f.getName().length() - 5 ).toLowerCase() : "";
+
+            // TODO: check what is supported by Java :)
+            return ( f.isDirectory()
+                ||  ext3.equals( ".jpg" )
+                ||  ext4.equals( ".jpeg" )
+                ||  ext3.equals( ".png" )
+                );
+        }
 
 
-		@Override
-		public String getDescription() {
-			return tr("Image files");
-		}
-		
-	}
-	
-	/**
-	 * Constructor...
-	 */
-	public NewLayerFromFileAction() {
-		super(tr("New picture layer from file..."), null, null, null, false);
-	}
+        @Override
+        public String getDescription() {
+            return tr("Image files");
+        }
 
-	/**
-	 * Action handler
-	 */
-	public void actionPerformed(ActionEvent arg0) {
-		
-		// Choose a file
-		JFileChooser fc = new JFileChooser();
-		fc.setAcceptAllFileFilterUsed( false );
-		fc.setFileFilter( new ImageFileFilter() );
-		int result = fc.showOpenDialog( Main.parent );
-		
-		// Create a layer?
-		if ( result == JFileChooser.APPROVE_OPTION ) {
-			// Create layer from file
-			PicLayerFromFile layer = new PicLayerFromFile( fc.getSelectedFile() );
-			// Add layer only if successfully initialized
-			try {
-				layer.initialize();
-			}
-			catch (IOException e) {
-				// Failed
-				System.out.println( "NewLayerFromFileAction::actionPerformed - " + e.getMessage() );
-				JOptionPane.showMessageDialog(null, e.getMessage() );  
-				return;
-			}
-			// Add layer
-			Main.main.addLayer( layer );
-		}
-		
-	}
+    }
+
+    /**
+     * Constructor...
+     */
+    public NewLayerFromFileAction() {
+        super(tr("New picture layer from file..."), null, null, null, false);
+    }
+
+    /**
+     * Action handler
+     */
+    public void actionPerformed(ActionEvent arg0) {
+
+        // Choose a file
+        JFileChooser fc = new JFileChooser();
+        fc.setAcceptAllFileFilterUsed( false );
+        fc.setFileFilter( new ImageFileFilter() );
+        int result = fc.showOpenDialog( Main.parent );
+
+        // Create a layer?
+        if ( result == JFileChooser.APPROVE_OPTION ) {
+            // Create layer from file
+            PicLayerFromFile layer = new PicLayerFromFile( fc.getSelectedFile() );
+            // Add layer only if successfully initialized
+            try {
+                layer.initialize();
+            }
+            catch (IOException e) {
+                // Failed
+                System.out.println( "NewLayerFromFileAction::actionPerformed - " + e.getMessage() );
+                JOptionPane.showMessageDialog(null, e.getMessage() );
+                return;
+            }
+            // Add layer
+            Main.main.addLayer( layer );
+        }
+
+    }
 }
Index: applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/PicLayerAbstract.java
===================================================================
--- applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/PicLayerAbstract.java	(revision 22549)
+++ applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/PicLayerAbstract.java	(revision 23190)
@@ -275,13 +275,13 @@
      */
     public void saveCalibration( Properties props ) {
-    	// Save
-    	props.put(INITIAL_POS_X, "" + m_initial_position.getX());
-    	props.put(INITIAL_POS_Y, "" + m_initial_position.getY());
-    	props.put(POSITION_X, "" + m_position.getX());
-    	props.put(POSITION_Y, "" + m_position.getY());
-    	props.put(INITIAL_SCALE, "" + m_initial_scale);
-    	props.put(SCALEX, "" + m_scalex);
-    	props.put(SCALEY, "" + m_scaley);
-    	props.put(ANGLE, "" + m_angle);
+        // Save
+        props.put(INITIAL_POS_X, "" + m_initial_position.getX());
+        props.put(INITIAL_POS_Y, "" + m_initial_position.getY());
+        props.put(POSITION_X, "" + m_position.getX());
+        props.put(POSITION_Y, "" + m_position.getY());
+        props.put(INITIAL_SCALE, "" + m_initial_scale);
+        props.put(SCALEX, "" + m_scalex);
+        props.put(SCALEY, "" + m_scaley);
+        props.put(ANGLE, "" + m_angle);
     }
 
@@ -292,20 +292,20 @@
      */
     public void loadCalibration( Properties props ) {
-    	// Load
-    		double pos_x = Double.valueOf( props.getProperty(POSITION_X));
-    		double pos_y = Double.valueOf( props.getProperty(POSITION_Y));
-    		double in_pos_x = Double.valueOf( props.getProperty(INITIAL_POS_X));
-    		double in_pos_y = Double.valueOf( props.getProperty(INITIAL_POS_Y));
-    		double angle = Double.valueOf( props.getProperty(ANGLE));
-    		double in_scale = Double.valueOf( props.getProperty(INITIAL_SCALE));
-    		double scale_x = Double.valueOf( props.getProperty(SCALEX));
-    		double scale_y = Double.valueOf( props.getProperty(SCALEY));
-  			m_position.setLocation(pos_x, pos_y);
-    		m_initial_position.setLocation(pos_x, pos_y);
-    		m_angle = angle;
-    		m_scalex = scale_x;
-    		m_scaley = scale_y;
-    		m_initial_scale = in_scale;
-    		// Refresh
+        // Load
+            double pos_x = Double.valueOf( props.getProperty(POSITION_X));
+            double pos_y = Double.valueOf( props.getProperty(POSITION_Y));
+            double in_pos_x = Double.valueOf( props.getProperty(INITIAL_POS_X));
+            double in_pos_y = Double.valueOf( props.getProperty(INITIAL_POS_Y));
+            double angle = Double.valueOf( props.getProperty(ANGLE));
+            double in_scale = Double.valueOf( props.getProperty(INITIAL_SCALE));
+            double scale_x = Double.valueOf( props.getProperty(SCALEX));
+            double scale_y = Double.valueOf( props.getProperty(SCALEY));
+            m_position.setLocation(pos_x, pos_y);
+            m_initial_position.setLocation(pos_x, pos_y);
+            m_angle = angle;
+            m_scalex = scale_x;
+            m_scaley = scale_y;
+            m_initial_scale = in_scale;
+            // Refresh
             Main.map.mapView.repaint();
     }
@@ -313,24 +313,24 @@
     private class ResetSubmenuAction extends AbstractAction implements LayerAction {
 
-    	public ResetSubmenuAction() {
-    		super(tr("Reset"));
-		}
-
-		public void actionPerformed(ActionEvent e) {
-		}
-
-		public Component createMenuComponent() {
-			JMenu reset_submenu = new JMenu(this);
-	        reset_submenu.add( new ResetPictureAllAction( PicLayerAbstract.this ) );
-	        reset_submenu.addSeparator();
-	        reset_submenu.add( new ResetPicturePositionAction( PicLayerAbstract.this ) );
-	        reset_submenu.add( new ResetPictureAngleAction( PicLayerAbstract.this ) );
-	        reset_submenu.add( new ResetPictureScaleAction( PicLayerAbstract.this ) );
-	        return reset_submenu;
-		}
-
-		public boolean supportLayers(List<Layer> layers) {
-			return layers.size() == 1 && layers.get(0) instanceof PicLayerAbstract;
-		}
+        public ResetSubmenuAction() {
+            super(tr("Reset"));
+        }
+
+        public void actionPerformed(ActionEvent e) {
+        }
+
+        public Component createMenuComponent() {
+            JMenu reset_submenu = new JMenu(this);
+            reset_submenu.add( new ResetPictureAllAction( PicLayerAbstract.this ) );
+            reset_submenu.addSeparator();
+            reset_submenu.add( new ResetPicturePositionAction( PicLayerAbstract.this ) );
+            reset_submenu.add( new ResetPictureAngleAction( PicLayerAbstract.this ) );
+            reset_submenu.add( new ResetPictureScaleAction( PicLayerAbstract.this ) );
+            return reset_submenu;
+        }
+
+        public boolean supportLayers(List<Layer> layers) {
+            return layers.size() == 1 && layers.get(0) instanceof PicLayerAbstract;
+        }
 
     }
Index: applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/PicLayerFromClipboard.java
===================================================================
--- applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/PicLayerFromClipboard.java	(revision 22549)
+++ applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/PicLayerFromClipboard.java	(revision 23190)
@@ -35,15 +35,15 @@
 public class PicLayerFromClipboard extends PicLayerAbstract {
 
-	@Override
-	protected Image createImage() throws IOException {
-		// Return item
-		Image image = null;
-		// Access the clipboard
+    @Override
+    protected Image createImage() throws IOException {
+        // Return item
+        Image image = null;
+        // Access the clipboard
         Transferable t = Toolkit.getDefaultToolkit().getSystemClipboard().getContents(null);
         // Check result
         if ( t == null ) {
-        	throw new IOException(tr("Nothing in clipboard"));
+            throw new IOException(tr("Nothing in clipboard"));
         }
-        
+
         // TODO: Why is it so slow?
         // Try to make it an image data
@@ -52,17 +52,17 @@
                 image = (Image)t.getTransferData(DataFlavor.imageFlavor);
             } else {
-            	throw new IOException(tr("The clipboard data is not an image"));
+                throw new IOException(tr("The clipboard data is not an image"));
             }
         } catch (UnsupportedFlavorException e) {
-        	throw new IOException( e.getMessage() );
-        } 
-        
+            throw new IOException( e.getMessage() );
+        }
+
         return image;
-	}
+    }
 
-	@Override
-	protected String getPicLayerName() {
-		return "Clipboard";
-	}
+    @Override
+    protected String getPicLayerName() {
+        return "Clipboard";
+    }
 
 }
Index: applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/PicLayerFromFile.java
===================================================================
--- applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/PicLayerFromFile.java	(revision 22549)
+++ applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/PicLayerFromFile.java	(revision 23190)
@@ -30,28 +30,28 @@
  */
 public class PicLayerFromFile extends PicLayerAbstract {
-	
-	// File to load from.
-	private File m_file;
-	// Tooltip text
-	private String m_tooltiptext;
+
+    // File to load from.
+    private File m_file;
+    // Tooltip text
+    private String m_tooltiptext;
 
     public PicLayerFromFile( File file ) {
-    	// Remember the file
-    	m_file = file;
-    	// Generate tooltip text
-    	m_tooltiptext = m_file.getAbsolutePath();
-    }	
-    
-	@Override
-	protected Image createImage() throws IOException {
+        // Remember the file
+        m_file = file;
+        // Generate tooltip text
+        m_tooltiptext = m_file.getAbsolutePath();
+    }
+
+    @Override
+    protected Image createImage() throws IOException {
         // Try to load file
-		Image image = null;
-		image = ImageIO.read( m_file );
-		return image;
-	}
+        Image image = null;
+        image = ImageIO.read( m_file );
+        return image;
+    }
 
-	@Override
-	protected String getPicLayerName() {
-		return m_tooltiptext;
-	}	
+    @Override
+    protected String getPicLayerName() {
+        return m_tooltiptext;
+    }
 }
Index: applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/PicLayerPlugin.java
===================================================================
--- applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/PicLayerPlugin.java	(revision 22549)
+++ applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/PicLayerPlugin.java	(revision 23190)
@@ -59,6 +59,6 @@
      */
     public PicLayerPlugin(PluginInformation info) {
-    	super(info);
-    	
+        super(info);
+
         // Create menu entry
         if ( Main.main.menu != null ) {
Index: applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/ResetPictureAllAction.java
===================================================================
--- applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/ResetPictureAllAction.java	(revision 22549)
+++ applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/ResetPictureAllAction.java	(revision 23190)
@@ -35,26 +35,26 @@
 public class ResetPictureAllAction extends JosmAction {
 
-	// Owner layer of the action
-	PicLayerAbstract m_owner = null;
-	
-	/**
-	 * Constructor
-	 */
-	public ResetPictureAllAction( PicLayerAbstract owner ) {
-		super(tr("All"), null, tr("Resets picture calibration"), null, false);
-		// Remember the owner...
-		m_owner = owner;
-	}
-	
-	/**
-	 * Action handler
-	 */
-	public void actionPerformed(ActionEvent arg0) {
-		// Reset
-		m_owner.resetAngle();
-		m_owner.resetPosition();
-		m_owner.resetScale();
-		// Redraw
+    // Owner layer of the action
+    PicLayerAbstract m_owner = null;
+    
+    /**
+     * Constructor
+     */
+    public ResetPictureAllAction( PicLayerAbstract owner ) {
+        super(tr("All"), null, tr("Resets picture calibration"), null, false);
+        // Remember the owner...
+        m_owner = owner;
+    }
+    
+    /**
+     * Action handler
+     */
+    public void actionPerformed(ActionEvent arg0) {
+        // Reset
+        m_owner.resetAngle();
+        m_owner.resetPosition();
+        m_owner.resetScale();
+        // Redraw
         Main.map.mapView.repaint();
-	}
+    }
 }
Index: applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/ResetPictureAngleAction.java
===================================================================
--- applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/ResetPictureAngleAction.java	(revision 22549)
+++ applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/ResetPictureAngleAction.java	(revision 23190)
@@ -35,24 +35,24 @@
 public class ResetPictureAngleAction extends JosmAction {
 
-	// Owner layer of the action
-	PicLayerAbstract m_owner = null;
-	
-	/**
-	 * Constructor
-	 */
-	public ResetPictureAngleAction( PicLayerAbstract owner ) {
-		super(tr("Angle"), null, tr("Resets picture rotation"), null, false);
-		// Remember the owner...
-		m_owner = owner;
-	}
-	
-	/**
-	 * Action handler
-	 */
-	public void actionPerformed(ActionEvent arg0) {
-		// Reset
-		m_owner.resetAngle();
-		// Redraw
+    // Owner layer of the action
+    PicLayerAbstract m_owner = null;
+    
+    /**
+     * Constructor
+     */
+    public ResetPictureAngleAction( PicLayerAbstract owner ) {
+        super(tr("Angle"), null, tr("Resets picture rotation"), null, false);
+        // Remember the owner...
+        m_owner = owner;
+    }
+    
+    /**
+     * Action handler
+     */
+    public void actionPerformed(ActionEvent arg0) {
+        // Reset
+        m_owner.resetAngle();
+        // Redraw
         Main.map.mapView.repaint();
-	}
+    }
 }
Index: applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/ResetPicturePositionAction.java
===================================================================
--- applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/ResetPicturePositionAction.java	(revision 22549)
+++ applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/ResetPicturePositionAction.java	(revision 23190)
@@ -35,24 +35,24 @@
 public class ResetPicturePositionAction extends JosmAction {
 
-	// Owner layer of the action
-	PicLayerAbstract m_owner = null;
-	
-	/**
-	 * Constructor
-	 */
-	public ResetPicturePositionAction( PicLayerAbstract owner ) {
-		super(tr("Reset position"), null, tr("Resets picture position"), null, false);
-		// Remember the owner...
-		m_owner = owner;
-	}
-	
-	/**
-	 * Action handler
-	 */
-	public void actionPerformed(ActionEvent arg0) {
-		// Reset
-		m_owner.resetPosition();
-		// Redraw
+    // Owner layer of the action
+    PicLayerAbstract m_owner = null;
+    
+    /**
+     * Constructor
+     */
+    public ResetPicturePositionAction( PicLayerAbstract owner ) {
+        super(tr("Reset position"), null, tr("Resets picture position"), null, false);
+        // Remember the owner...
+        m_owner = owner;
+    }
+    
+    /**
+     * Action handler
+     */
+    public void actionPerformed(ActionEvent arg0) {
+        // Reset
+        m_owner.resetPosition();
+        // Redraw
         Main.map.mapView.repaint();
-	}
+    }
 }
Index: applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/ResetPictureScaleAction.java
===================================================================
--- applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/ResetPictureScaleAction.java	(revision 22549)
+++ applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/ResetPictureScaleAction.java	(revision 23190)
@@ -35,24 +35,24 @@
 public class ResetPictureScaleAction extends JosmAction {
 
-	// Owner layer of the action
-	PicLayerAbstract m_owner = null;
-	
-	/**
-	 * Constructor
-	 */
-	public ResetPictureScaleAction( PicLayerAbstract owner ) {
-		super(tr("Scale"), null, tr("Resets picture scale"), null, false);
-		// Remember the owner...
-		m_owner = owner;
-	}
-	
-	/**
-	 * Action handler
-	 */
-	public void actionPerformed(ActionEvent arg0) {
-		// Reset
-		m_owner.resetScale();
-		// Redraw
+    // Owner layer of the action
+    PicLayerAbstract m_owner = null;
+    
+    /**
+     * Constructor
+     */
+    public ResetPictureScaleAction( PicLayerAbstract owner ) {
+        super(tr("Scale"), null, tr("Resets picture scale"), null, false);
+        // Remember the owner...
+        m_owner = owner;
+    }
+    
+    /**
+     * Action handler
+     */
+    public void actionPerformed(ActionEvent arg0) {
+        // Reset
+        m_owner.resetScale();
+        // Redraw
         Main.map.mapView.repaint();
-	}
+    }
 }
Index: applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/RotatePictureAction.java
===================================================================
--- applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/RotatePictureAction.java	(revision 22549)
+++ applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/RotatePictureAction.java	(revision 23190)
@@ -37,24 +37,24 @@
  * This class handles the input during rotating the picture.
  */
-public class RotatePictureAction extends MapMode implements MouseListener, MouseMotionListener 
+public class RotatePictureAction extends MapMode implements MouseListener, MouseMotionListener
 {
-	// Action ongoing?
-	private boolean mb_dragging = false;
-	
-	// Last mouse position
-	private int m_prevY;
-	
-	// Layer we're working on
-	private PicLayerAbstract m_currentLayer = null;
-	
-	/**
-	 * Constructor
-	 */
-	public RotatePictureAction(MapFrame frame) {
-		super(tr("PicLayer rotate"), "rotate", tr("Drag to rotate the picture"), frame, ImageProvider.getCursor("crosshair", null));
-		// TODO Auto-generated constructor stub
-	}
+    // Action ongoing?
+    private boolean mb_dragging = false;
 
-    @Override 
+    // Last mouse position
+    private int m_prevY;
+
+    // Layer we're working on
+    private PicLayerAbstract m_currentLayer = null;
+
+    /**
+     * Constructor
+     */
+    public RotatePictureAction(MapFrame frame) {
+        super(tr("PicLayer rotate"), "rotate", tr("Drag to rotate the picture"), frame, ImageProvider.getCursor("crosshair", null));
+        // TODO Auto-generated constructor stub
+    }
+
+    @Override
     public void enterMode() {
         super.enterMode();
@@ -63,27 +63,27 @@
     }
 
-    @Override 
+    @Override
     public void exitMode() {
         super.exitMode();
         Main.map.mapView.removeMouseListener(this);
         Main.map.mapView.removeMouseMotionListener(this);
-    }	
-	
-    @Override 
+    }
+
+    @Override
     public void mousePressed(MouseEvent e) {
-    	// Start rotating
-    	if ( Main.map.mapView.getActiveLayer() instanceof PicLayerAbstract ) {
-	        m_currentLayer = (PicLayerAbstract)Main.map.mapView.getActiveLayer();
-	        
-	        if ( m_currentLayer != null && e.getButton() == MouseEvent.BUTTON1 ) {
-	        	mb_dragging = true;
-	        	m_prevY=e.getY();
-	        }
-    	}
-    }   
-    
-    @Override 
+        // Start rotating
+        if ( Main.map.mapView.getActiveLayer() instanceof PicLayerAbstract ) {
+            m_currentLayer = (PicLayerAbstract)Main.map.mapView.getActiveLayer();
+
+            if ( m_currentLayer != null && e.getButton() == MouseEvent.BUTTON1 ) {
+                mb_dragging = true;
+                m_prevY=e.getY();
+            }
+        }
+    }
+
+    @Override
     public void mouseDragged(MouseEvent e) {
-    	// Rotate the picture
+        // Rotate the picture
         if(mb_dragging) {
             // TODO: Magic number
@@ -92,10 +92,10 @@
             Main.map.mapView.repaint();
         }
-    }    
-    
+    }
+
     @Override public void mouseReleased(MouseEvent e) {
-    	// End rotating
-    	mb_dragging = false;
-    }    
+        // End rotating
+        mb_dragging = false;
+    }
 
 }
Index: applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/SavePictureCalibrationAction.java
===================================================================
--- applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/SavePictureCalibrationAction.java	(revision 22549)
+++ applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/SavePictureCalibrationAction.java	(revision 23190)
@@ -43,47 +43,47 @@
 public class SavePictureCalibrationAction extends JosmAction {
 
-	// Owner layer of the action
-	PicLayerAbstract m_owner = null;
-	
-	/**
-	 * Constructor
-	 */
-	public SavePictureCalibrationAction( PicLayerAbstract owner ) {
-		super(tr("Save Picture Calibration..."), null, tr("Saves calibration data to a file"), null, false);
-		// Remember the owner...
-		m_owner = owner;
-	}
-	
-	/**
-	 * Action handler
-	 */
-	public void actionPerformed(ActionEvent arg0) {
-		// Save dialog
-		final JFileChooser fc = new JFileChooser();
-		fc.setAcceptAllFileFilterUsed( false );
-		fc.setFileFilter( new CalibrationFileFilter() );
-		fc.setSelectedFile( new File(m_owner.getPicLayerName() + CalibrationFileFilter.EXTENSION));
-		int result = fc.showSaveDialog( Main.parent );
+    // Owner layer of the action
+    PicLayerAbstract m_owner = null;
+    
+    /**
+     * Constructor
+     */
+    public SavePictureCalibrationAction( PicLayerAbstract owner ) {
+        super(tr("Save Picture Calibration..."), null, tr("Saves calibration data to a file"), null, false);
+        // Remember the owner...
+        m_owner = owner;
+    }
+    
+    /**
+     * Action handler
+     */
+    public void actionPerformed(ActionEvent arg0) {
+        // Save dialog
+        final JFileChooser fc = new JFileChooser();
+        fc.setAcceptAllFileFilterUsed( false );
+        fc.setFileFilter( new CalibrationFileFilter() );
+        fc.setSelectedFile( new File(m_owner.getPicLayerName() + CalibrationFileFilter.EXTENSION));
+        int result = fc.showSaveDialog( Main.parent );
 
-		if ( result == JFileChooser.APPROVE_OPTION ) {
-			// Check file extension and force it to be valid
-			File file = fc.getSelectedFile();
-			String path = file.getAbsolutePath();
-			if ( path.length() < CalibrationFileFilter.EXTENSION.length()
-				|| !path.substring( path.length() - 4 ).equals(CalibrationFileFilter.EXTENSION)) {
-				file = new File( path + CalibrationFileFilter.EXTENSION );
-			}
-						
-			// Save
-			Properties props = new Properties();
-			m_owner.saveCalibration(props);
-			try {
-				props.store(new FileOutputStream(file), tr("JOSM PicLayer plugin calibration data"));
-			} catch (Exception e) {
-				// Error
-				e.printStackTrace();
-				JOptionPane.showMessageDialog(Main.parent , tr("Saving file failed: {0}", e.getMessage()));
-			}
-		}	
-	}
+        if ( result == JFileChooser.APPROVE_OPTION ) {
+            // Check file extension and force it to be valid
+            File file = fc.getSelectedFile();
+            String path = file.getAbsolutePath();
+            if ( path.length() < CalibrationFileFilter.EXTENSION.length()
+                || !path.substring( path.length() - 4 ).equals(CalibrationFileFilter.EXTENSION)) {
+                file = new File( path + CalibrationFileFilter.EXTENSION );
+            }
+                        
+            // Save
+            Properties props = new Properties();
+            m_owner.saveCalibration(props);
+            try {
+                props.store(new FileOutputStream(file), tr("JOSM PicLayer plugin calibration data"));
+            } catch (Exception e) {
+                // Error
+                e.printStackTrace();
+                JOptionPane.showMessageDialog(Main.parent , tr("Saving file failed: {0}", e.getMessage()));
+            }
+        }   
+    }
 }
Index: applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/ScalePictureActionAbstract.java
===================================================================
--- applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/ScalePictureActionAbstract.java	(revision 22549)
+++ applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/ScalePictureActionAbstract.java	(revision 23190)
@@ -35,24 +35,24 @@
  * This class handles the input during scaling the picture.
  */
-public abstract class ScalePictureActionAbstract extends MapMode implements MouseListener, MouseMotionListener 
+public abstract class ScalePictureActionAbstract extends MapMode implements MouseListener, MouseMotionListener
 {
-	// Scaling ongoing?
-	private boolean mb_dragging = false;
-	
-	// Last mouse position
-	private int m_prevY;
-	
-	// Layer we're working on
-	protected PicLayerAbstract m_currentLayer = null;
-	
-	/**
-	 * Constructor
-	 */
-	public ScalePictureActionAbstract (String name, String icon, String tooltip, MapFrame frame) {
-		super(name, icon, tooltip, frame, ImageProvider.getCursor("crosshair", null));
-		// TODO Auto-generated constructor stub
-	}
+    // Scaling ongoing?
+    private boolean mb_dragging = false;
 
-    @Override 
+    // Last mouse position
+    private int m_prevY;
+
+    // Layer we're working on
+    protected PicLayerAbstract m_currentLayer = null;
+
+    /**
+     * Constructor
+     */
+    public ScalePictureActionAbstract (String name, String icon, String tooltip, MapFrame frame) {
+        super(name, icon, tooltip, frame, ImageProvider.getCursor("crosshair", null));
+        // TODO Auto-generated constructor stub
+    }
+
+    @Override
     public void enterMode() {
         super.enterMode();
@@ -61,27 +61,27 @@
     }
 
-    @Override 
+    @Override
     public void exitMode() {
         super.exitMode();
         Main.map.mapView.removeMouseListener(this);
         Main.map.mapView.removeMouseMotionListener(this);
-    }	
-	
-    @Override 
+    }
+
+    @Override
     public void mousePressed(MouseEvent e) {
-    	// Start scaling
-    	if ( Main.map.mapView.getActiveLayer() instanceof PicLayerAbstract ) {
-	        m_currentLayer = (PicLayerAbstract)Main.map.mapView.getActiveLayer();
-	        
-	        if ( m_currentLayer != null && e.getButton() == MouseEvent.BUTTON1 ) {
-	        	mb_dragging = true;
-	        	m_prevY = e.getY();
-	        }
-    	}
-    }   
-    
-    @Override 
+        // Start scaling
+        if ( Main.map.mapView.getActiveLayer() instanceof PicLayerAbstract ) {
+            m_currentLayer = (PicLayerAbstract)Main.map.mapView.getActiveLayer();
+
+            if ( m_currentLayer != null && e.getButton() == MouseEvent.BUTTON1 ) {
+                mb_dragging = true;
+                m_prevY = e.getY();
+            }
+        }
+    }
+
+    @Override
     public void mouseDragged(MouseEvent e) {
-    	// Scale the picture
+        // Scale the picture
         if(mb_dragging) {
             doTheScale( ( e.getY() - m_prevY ) / 500.0 );
@@ -90,11 +90,11 @@
         }
     }
-    
-    @Override 
+
+    @Override
     public void mouseReleased(MouseEvent e) {
-    	// Stop scaling
-    	mb_dragging = false;
+        // Stop scaling
+        mb_dragging = false;
     }
-    
+
     /**
     * Does the actual scaling in the inherited class.
Index: applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/ScaleXPictureAction.java
===================================================================
--- applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/ScaleXPictureAction.java	(revision 22549)
+++ applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/ScaleXPictureAction.java	(revision 23190)
@@ -33,15 +33,15 @@
  * This class handles the input during scaling the picture.
  */
-public class ScaleXPictureAction extends ScalePictureActionAbstract 
+public class ScaleXPictureAction extends ScalePictureActionAbstract
 {
-	/*
-	 * Constructor
-	 */
-	public ScaleXPictureAction(MapFrame frame) {
-		super(tr("PicLayer scale X"), "scale_x", tr("Drag to scale the picture in the X Axis"), frame);
-		// TODO Auto-generated constructor stub
-	}
+    /*
+     * Constructor
+     */
+    public ScaleXPictureAction(MapFrame frame) {
+        super(tr("PicLayer scale X"), "scale_x", tr("Drag to scale the picture in the X Axis"), frame);
+        // TODO Auto-generated constructor stub
+    }
 
-	public void doTheScale( double scale ) {
+    public void doTheScale( double scale ) {
             m_currentLayer.scalePictureBy( scale, 0.0 );
         }
Index: applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/ScaleXYPictureAction.java
===================================================================
--- applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/ScaleXYPictureAction.java	(revision 22549)
+++ applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/ScaleXYPictureAction.java	(revision 23190)
@@ -33,15 +33,15 @@
  * This class handles the input during scaling the picture.
  */
-public class ScaleXYPictureAction extends ScalePictureActionAbstract 
+public class ScaleXYPictureAction extends ScalePictureActionAbstract
 {
-	/*
-	 * Constructor
-	 */
-	public ScaleXYPictureAction(MapFrame frame) {
-		super(tr("PicLayer scale"), "scale", tr("Drag to scale the picture in the X and Y Axis"), frame);
-		// TODO Auto-generated constructor stub
-	}
+    /*
+     * Constructor
+     */
+    public ScaleXYPictureAction(MapFrame frame) {
+        super(tr("PicLayer scale"), "scale", tr("Drag to scale the picture in the X and Y Axis"), frame);
+        // TODO Auto-generated constructor stub
+    }
 
-	public void doTheScale( double scale ) {
+    public void doTheScale( double scale ) {
             m_currentLayer.scalePictureBy( scale, scale );
         }
Index: applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/ScaleYPictureAction.java
===================================================================
--- applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/ScaleYPictureAction.java	(revision 22549)
+++ applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/ScaleYPictureAction.java	(revision 23190)
@@ -33,15 +33,15 @@
  * This class handles the input during scaling the picture.
  */
-public class ScaleYPictureAction extends ScalePictureActionAbstract 
+public class ScaleYPictureAction extends ScalePictureActionAbstract
 {
-	/*
-	 * Constructor
-	 */
-	public ScaleYPictureAction(MapFrame frame) {
-		super(tr("PicLayer scale Y"), "scale_y", tr("Drag to scale the picture in the Y Axis"), frame);
-		// TODO Auto-generated constructor stub
-	}
+    /*
+     * Constructor
+     */
+    public ScaleYPictureAction(MapFrame frame) {
+        super(tr("PicLayer scale Y"), "scale_y", tr("Drag to scale the picture in the Y Axis"), frame);
+        // TODO Auto-generated constructor stub
+    }
 
-	public void doTheScale( double scale ) {
+    public void doTheScale( double scale ) {
             m_currentLayer.scalePictureBy( 0.0, scale );
         }
