コード例 #1
0
            internal virtual void recenterMap(MouseEvent param1MouseEvent)
            {
                Rectangle rectangle = outerInstance.ViewportBounds;
                double    d1        = rectangle.X + param1MouseEvent.X;
                double    d2        = rectangle.Y + param1MouseEvent.Y;

                outerInstance.Center = new Point2D.Double(d1, d2);
                outerInstance.repaint();
            }
コード例 #2
0
            public virtual void keyPressed(KeyEvent param1KeyEvent)
            {
                sbyte b1 = 0;
                sbyte b2 = 0;

                switch (param1KeyEvent.KeyCode)
                {
                case 37:
                    b1 = -10;
                    break;

                case 39:
                    b1 = 10;
                    break;

                case 38:
                    b2 = -10;
                    break;

                case 40:
                    b2 = 10;
                    break;
                }
                if (b1 != 0 || b2 != 0)
                {
                    Rectangle rectangle = outerInstance.ViewportBounds;
                    double    d1        = rectangle.CenterX + b1;
                    double    d2        = rectangle.CenterY + b2;
                    outerInstance.Center = new Point2D.Double(d1, d2);
                    outerInstance.repaint();
                }
            }
コード例 #3
0
 public void propertyChange(PropertyChangeEvent param1PropertyChangeEvent)
 {
     if ("loaded".Equals(param1PropertyChangeEvent.PropertyName) && true.Equals(param1PropertyChangeEvent.NewValue))
     {
         Tile tile = (Tile)param1PropertyChangeEvent.Source;
         if (tile.Zoom == outerInstance.Zoom)
         {
             outerInstance.repaint();
         }
     }
 }