Example #1
0
 @Override
 public void setVisible(boolean b) {
   if (b) {
     SwingUtil.centerOver(this, getOwner());
   }
   super.setVisible(b);
 }
Example #2
0
 /*
  * (non-Javadoc)
  *
  * @see java.awt.event.MouseWheelListener#mouseWheelMoved(java.awt.event.MouseWheelEvent)
  */
 @Override
 public void mouseWheelMoved(MouseWheelEvent e) {
   ZoneRenderer renderer = (ZoneRenderer) e.getSource();
   if (SwingUtil.isControlDown(e)) {
     if (e.getWheelRotation() > 0) {
       renderer.zoomOut(e.getX(), e.getY());
     } else {
       renderer.zoomIn(e.getX(), e.getY());
     }
   } else {
     if (e.getWheelRotation() > 0) {
       adjustGridSize(renderer, Size.Increase);
     } else {
       adjustGridSize(renderer, Size.Decrease);
     }
   }
 }