min = res;\r
max = res;\r
\r
- if(reveal != null)\r
- {\r
- av.getColumnSelection().revealHiddenColumns(reveal[0], av);\r
- reveal = null;\r
- return;\r
- }\r
+ if(reveal != null && SwingUtilities.isRightMouseButton(evt))\r
+ {\r
+ JPopupMenu pop = new JPopupMenu();\r
+ JMenuItem item = new JMenuItem("Reveal");\r
+ item.addActionListener(new ActionListener()\r
+ {\r
+ public void actionPerformed(ActionEvent e)\r
+ {\r
+ av.getColumnSelection().revealHiddenColumns(reveal[0], av);\r
+ reveal = null;\r
+ ap.repaint();\r
+ }\r
+ });\r
+ pop.add(item);\r
\r
- if (av.getColumnSelection().contains(res))\r
+ if(av.getColumnSelection().hiddenColumns.size()>1)\r
+ {\r
+ item = new JMenuItem("Reveal All");\r
+ item.addActionListener(new ActionListener()\r
+ {\r
+ public void actionPerformed(ActionEvent e)\r
+ {\r
+ av.getColumnSelection().revealAllHiddenColumns(av);\r
+ reveal = null;\r
+ ap.repaint();\r
+ }\r
+ });\r
+ pop.add(item);\r
+ }\r
+\r
+ pop.show(this, evt.getX(), evt.getY());\r
+\r
+ }\r
+ else if (av.getColumnSelection().contains(res))\r
{\r
if( SwingUtilities.isRightMouseButton(evt))\r
{\r
public void actionPerformed(ActionEvent e)\r
{\r
av.getColumnSelection().hideColumns(res, av);\r
+ ap.repaint();\r
}\r
});\r
pop.add(item);\r
else\r
{\r
av.getColumnSelection().removeElement(res);\r
- ap.annotationPanel.removeEditableColumn(res);\r
+ av.setSelectionGroup(null);\r
}\r
}\r
else\r
if(av.hasHiddenColumns)\r
res = av.getColumnSelection().adjustForHiddenColumns(res);\r
\r
- if (av.getColumnSelection() != null)\r
- {\r
- for (int i = 0; i < av.getColumnSelection().size(); i++)\r
- {\r
- ap.annotationPanel.addEditableColumn(av.getColumnSelection()\r
- .columnAt(i));\r
- }\r
- }\r
-\r
if (!stretchingGroup)\r
{\r
ap.repaint();\r
if ((i < sg.getStartRes()) || (i > sg.getEndRes()))\r
{\r
av.getColumnSelection().removeElement(i);\r
- ap.annotationPanel.removeEditableColumn(res);\r
}\r
else\r
{\r