public void mouseClicked(MouseEvent e) { //////////////////////////// mouseClicked() // Object obj = e.getSource(); // Get source of click if (! mouseSupport.fireMapMouseClicked(e)) { // if (!(obj instanceof MapBean)) // If not from MapBean return; // then return MapBean map = (MapBean)obj; // Get as MapBean Projection projection = map.getProjection(); // Get projection Proj p = (Proj)projection; // Cast to Proj LatLonPoint llp = p.inverse(e.getPoint()); // Get click point -> lat,lon p.setCenter(llp); // Centre map on this point if ((e.getModifiers() & InputEvent.BUTTON1_MASK) != 0) // If left button click p.setScale(map.getScale() * 0.5f); // zoom in else // Else other button click p.setScale(map.getScale() * 2.0f); // zoom out map.setProjection(p); // Set map to new projection } // return; // // } /////////////////////////////////////////////////////////////// End of mouseClicked()