+ }\r
+ }\r
+\r
+ /**\r
+ * add in any unselected columns from the given column selection, excluding\r
+ * any that are hidden.\r
+ * \r
+ * @param colsel\r
+ */\r
+ public void addElementsFrom(ColumnSelection colsel)\r
+ {\r
+ if (colsel != null && colsel.size() > 0)\r
+ {\r
+ Enumeration e = colsel.getSelected().elements();\r
+ while (e.hasMoreElements())\r
+ {\r
+ Object eo = e.nextElement();\r
+ if (hiddenColumns != null && isVisible(((Integer) eo).intValue()))\r
+ {\r
+ if (!selected.contains(eo))\r
+ {\r
+ selected.addElement(eo);\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }\r
+\r
+ /**\r
+ * set the selected columns the given column selection, excluding any columns\r
+ * that are hidden.\r
+ * \r
+ * @param colsel\r
+ */\r
+ public void setElementsFrom(ColumnSelection colsel)\r
+ {\r
+ selected = new Vector();\r
+ if (colsel.selected != null && colsel.selected.size() > 0)\r
+ {\r
+ if (hiddenColumns != null && hiddenColumns.size() > 0)\r
+ {\r
+ // only select visible columns in this columns selection\r
+ selected = new Vector();\r
+ addElementsFrom(colsel);\r
+ }\r
+ else\r
+ {\r
+ // add everything regardless\r
+ Enumeration en = colsel.selected.elements();\r
+ while (en.hasMoreElements())\r
+ {\r
+ selected.addElement(en.nextElement());\r
+ }\r
+ }\r
+ }\r