/** * Dumps the layout's column groups to the console. * * @param layout * the <code>FormLayout</code> to inspect */ public static void dumpColumnGroups(FormLayout layout) { dumpGroups("COLUMN GROUPS: ", layout.getColumnGroups()); }
/** * Dumps the layout's column groups to the console. * * @param layout the <code>FormLayout</code> to inspect */ public static void dumpColumnGroups(FormLayout layout) { dumpGroups("COLUMN GROUPS: ", layout.getColumnGroups()); }
/** * Dumps the layout's column groups to the console. * * @param layout the {@code FormLayout} to inspect */ public static void dumpColumnGroups(FormLayout layout) { dumpGroups("COLUMN GROUPS: ", layout.getColumnGroups()); }
/** * Adds the specified column index to the last column group. * In case there are no groups, a new group will be created. * * @param columnIndex the column index to be set grouped */ public void addGroupedColumn(int columnIndex) { int[][] newColGroups = getColumnGroups(); // Create a group if none exists. if (newColGroups.length == 0) { newColGroups = new int[][]{{columnIndex}}; } else { int lastGroupIndex = newColGroups.length-1; int[] lastGroup = newColGroups[lastGroupIndex]; int groupSize = lastGroup.length; int[] newLastGroup = new int[groupSize+1]; System.arraycopy(lastGroup, 0, newLastGroup, 0, groupSize); newLastGroup[groupSize] = columnIndex; newColGroups[lastGroupIndex] = newLastGroup; } setColumnGroups(newColGroups); }
/** * Adds the specified column index to the last column group. * In case there are no groups, a new group will be created. * * @param columnIndex the column index to be set grouped */ public void addGroupedColumn(int columnIndex) { int[][] newColGroups = getColumnGroups(); // Create a group if none exists. if (newColGroups.length == 0) { newColGroups = new int[][]{{columnIndex}}; } else { int lastGroupIndex = newColGroups.length-1; int[] lastGroup = newColGroups[lastGroupIndex]; int groupSize = lastGroup.length; int[] newLastGroup = new int[groupSize+1]; System.arraycopy(lastGroup, 0, newLastGroup, 0, groupSize); newLastGroup[groupSize] = columnIndex; newColGroups[lastGroupIndex] = newLastGroup; } setColumnGroups(newColGroups); }
/** * Adds the specified column index to the last column group. In case there * are no groups, a new group will be created. * * @param columnIndex * the column index to be set grouped */ public void addGroupedColumn(int columnIndex) { int[][] newColGroups = getColumnGroups(); // Create a group if none exists. if (newColGroups.length == 0) { newColGroups = new int[][] { { columnIndex } }; } else { int lastGroupIndex = newColGroups.length - 1; int[] lastGroup = newColGroups[lastGroupIndex]; int groupSize = lastGroup.length; int[] newLastGroup = new int[groupSize + 1]; System.arraycopy(lastGroup, 0, newLastGroup, 0, groupSize); newLastGroup[groupSize] = columnIndex; newColGroups[lastGroupIndex] = newLastGroup; } setColumnGroups(newColGroups); }
/** * Updates the local column groups reference so that it is consistent with * the form layout. The column groups are stored in a FormGroupSet variable. * This variable is updated to correspond to the column groups in the * FormLayout. */ public void updateColumnGroups() { try { FormGroupSet gset = new FormGroupSet(); int[][] groups = m_formlayout.getColumnGroups(); for (int gindex = 0; gindex < groups.length; gindex++) { int[] cols = groups[gindex]; if (cols != null) { Integer ckey = new Integer(gindex + 1); for (int cindex = 0; cindex < cols.length; cindex++) { gset.assignToGroup(ckey, cols[cindex]); } } } m_col_groups = gset; } catch (Exception e) { FormsLogger.debug(e); } }