@Override
        public void mouseDragged(MouseEvent e) {
            final int modifiersEx = e.getModifiersEx();
            if ((modifiersEx & MouseEvent.BUTTON2_DOWN_MASK) != 0) {
                int dx = WorkingAreaPanel.this.fromMouseX - e.getX();
                int dy = WorkingAreaPanel.this.fromMouseY - e.getY();
                Point viewPosition = WorkingAreaPanel.this.scrollPane.getViewport().getViewPosition();
                Dimension extentSize = WorkingAreaPanel.this.scrollPane.getViewport().getExtentSize();
                Dimension viewSize = WorkingAreaPanel.this.scrollPane.getViewport().getViewSize();
                int newViewX = viewPosition.x + dx;
                int newViewY = viewPosition.y + dy;
                if (newViewX < 0)
                    newViewX = 0;
                else if (newViewX > viewSize.width - extentSize.width)
                    newViewX = viewSize.width - extentSize.width - 1;
                if (newViewY < 0)
                    newViewY = 0;
                else if (newViewY > viewSize.height - extentSize.height)
                    newViewY = viewSize.height - extentSize.height - 1;
                WorkingAreaPanel.this.scrollPane.getViewport().setViewPosition(new Point(newViewX, newViewY));
                WorkingAreaPanel.this.fromMouseX = e.getX();
                WorkingAreaPanel.this.fromMouseY = e.getY();
                WorkingAreaPanel.this.setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR));
            }
            else {
                WorkingAreaPanel.this.handleMouseMoveAt(e.getX(), e.getY());
                if ((modifiersEx & MouseEvent.ALT_DOWN_MASK) == 0)
                    WorkingAreaPanel.this.handleMouseDown(modifiersEx);
            }
        }