- /**
- * ColumnSelection
- */
- public HiddenColumns()
- {
- }
-
- /**
- * Copy constructor
- *
- * @param copy
- */
- public HiddenColumns(HiddenColumns copy)
- {
- try
- {
-
- LOCK.readLock().lock();
- if (copy != null)
- {
- if (copy.hiddenColumns != null)
- {
- hiddenColumns = copy.copyHiddenRegions();
- }
- }
- }
- finally
- {
- LOCK.readLock().unlock();
- }
- }
-
- private Vector<int[]> copyHiddenRegions()
- {
- Vector<int[]> copy = new Vector<>(hiddenColumns.size());
- for (int i = 0, j = hiddenColumns.size(); i < j; i++)
- {
- int[] rh;
- int[] cp;
- rh = hiddenColumns.elementAt(i);
- if (rh != null)
- {
- cp = new int[rh.length];
- System.arraycopy(rh, 0, cp, 0, rh.length);
- copy.addElement(cp);
- }
- }
- return copy;
- }
-