public Cursor getViewCursor(final int currsorType) {
        Cursor c;
        String imageName;

        if (currsorType == CURSOR_DEFAULT) {
            return Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR);
        } else if (currsorType == CURSOR_WAIT) {
            return Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR);
        } else if (currsorType == CURSOR_SELECT) {
            return Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR);
        } else if (currsorType == CURSOR_HAND_OPEN) {
            imageName = "hand_open.gif";
        } else if (currsorType == CURSOR_HAND_CLOSE) {
            imageName = "hand_closed.gif";
        } else if (currsorType == CURSOR_ZOOM_IN) {
            imageName = "zoom_in.gif";
        } else if (currsorType == CURSOR_ZOOM_OUT) {
            imageName = "zoom_out.gif";
        } else if (currsorType == CURSOR_HAND_ANNOTATION) {
            return Cursor.getPredefinedCursor(Cursor.HAND_CURSOR);
        } else if (currsorType == CURSOR_TEXT_SELECTION) {
            return Cursor.getPredefinedCursor(Cursor.TEXT_CURSOR);
        } else {
            return Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR);
        }

        Toolkit tk = Toolkit.getDefaultToolkit();
        Dimension bestsize = tk.getBestCursorSize(24, 24);
        if (bestsize.width != 0) {

            Point cursorHotSpot = new Point(12, 12);
            try {
                ImageIcon cursorImage = new ImageIcon(Images.get(imageName));
                c = tk.createCustomCursor(cursorImage.getImage(), cursorHotSpot, imageName);
            } catch (RuntimeException ex) {
                if (logger.isLoggable(Level.FINE)) {
                    logger.log(Level.FINE,
                            "Trying to load image: " + imageName, ex);
                }
                throw ex;
            }
        } else {
            c = Cursor.getDefaultCursor();
            logger.warning("System does not support custom cursors");
        }
        return c;
    }