+ rightMouseButtonPressed(evt, res);
+ }
+ else if (SwingUtilities.isRightMouseButton(evt) && !Platform.isAMac())
+ {
+ /*
+ * defer right-mouse click handling to mouse up on Windows
+ * (where isPopupTrigger() will answer true)
+ * but accept Cmd-click on Mac which passes isRightMouseButton
+ */
+ return;
+ }
+ else
+ {
+ leftMouseButtonPressed(evt, res);
+ }
+ }
+
+ /**
+ * Handles right mouse button press. If pressed in a selected column, opens
+ * context menu for 'Hide Columns'. If pressed on a hidden columns marker,
+ * opens context menu for 'Reveal / Reveal All'. Else does nothing.
+ *
+ * @param evt
+ * @param res
+ */
+ protected void rightMouseButtonPressed(MouseEvent evt, final int res)
+ {
+ JPopupMenu pop = new JPopupMenu();
+
+ /*
+ * grab the hidden range in case mouseMoved nulls it
+ */
+ final int[] hiddenRange = reveal;
+ if (hiddenRange != null)
+ {
+ JMenuItem item = new JMenuItem(
+ MessageManager.getString("label.reveal"));
+ item.addActionListener(new ActionListener()