public void mouseReleased(MouseEvent e) {
            if (e.isControlDown() || e.isAltDown()) {
                // eyedropper mode, similar to Alt-Click in PhotoShop and Corel Paint.
                updatePalettes(e);
            } else if (e.isMetaDown()) {
                // right-click
                updateCell(e);
            } else {
                recenterCanvas(e);
            }
            updateLocale(e);
        }