/** * {@inheritDoc} */ @Override public int getColumnCount(boolean includeHidden) { if (includeHidden) { return initialColumns.size(); } return getColumnCount(); }
/** * {@inheritDoc} */ @Override public int getColumnCount(boolean includeHidden) { if (includeHidden) { return initialColumns.size(); } return getColumnCount(); }
/** * {@inheritDoc} */ @Override public int getColumnCount(boolean includeHidden) { if (includeHidden) { return initialColumns.size(); } return getColumnCount(); }
/** * {@inheritDoc} */ public int getColumnCount(boolean includeHidden) { if (includeHidden) { return initialColumns.size(); } return getColumnCount(); }
/** * {@inheritDoc} */ @Override public int getColumnCount(boolean includeHidden) { if (includeHidden) { return initialColumns.size(); } return getColumnCount(); }
/** * Update internal state after the visibility of the column * was changed to visible. The given column is assumed to * be contained in this model. * * @param col the column which was made visible. */ protected void moveToVisible(TableColumnExt col) { isVisibilityChange = true; // two step process: first add at end of columns // then move to "best" position relative to where it // was before hiding. super.addColumn(col); // this is analogous to the proposed fix in #253-swingx // but uses the currentColumns as reference. Integer addIndex = currentColumns.indexOf(col); for (int i = 0; i < (getColumnCount() - 1); i++) { TableColumn tableCol = getColumn(i); int actualPosition = currentColumns.indexOf(tableCol); if (actualPosition > addIndex) { super.moveColumn(getColumnCount() - 1, i); break; } } isVisibilityChange = false; }
/** * Update internal state after the visibility of the column * was changed to visible. The given column is assumed to * be contained in this model. * * @param col the column which was made visible. */ protected void moveToVisible(TableColumnExt col) { isVisibilityChange = true; // two step process: first add at end of columns // then move to "best" position relative to where it // was before hiding. super.addColumn(col); // this is analogous to the proposed fix in #253-swingx // but uses the currentColumns as reference. Integer addIndex = currentColumns.indexOf(col); for (int i = 0; i < (getColumnCount() - 1); i++) { TableColumn tableCol = getColumn(i); int actualPosition = currentColumns.indexOf(tableCol); if (actualPosition > addIndex) { super.moveColumn(getColumnCount() - 1, i); break; } } isVisibilityChange = false; }
/** * Update internal state after the visibility of the column * was changed to visible. The given column is assumed to * be contained in this model. * * @param col the column which was made visible. */ protected void moveToVisible(TableColumnExt col) { isVisibilityChange = true; // two step process: first add at end of columns // then move to "best" position relative to where it // was before hiding. super.addColumn(col); // this is analogous to the proposed fix in #253-swingx // but uses the currentColumns as reference. Integer addIndex = currentColumns.indexOf(col); for (int i = 0; i < (getColumnCount() - 1); i++) { TableColumn tableCol = getColumn(i); int actualPosition = currentColumns.indexOf(tableCol); if (actualPosition > addIndex) { super.moveColumn(getColumnCount() - 1, i); break; } } isVisibilityChange = false; }
/** * Update internal state after the visibility of the column * was changed to visible. The given column is assumed to * be contained in this model. * * @param col the column which was made visible. */ protected void moveToVisible(TableColumnExt col) { isVisibilityChange = true; // two step process: first add at end of columns // then move to "best" position relative to where it // was before hiding. super.addColumn(col); // this is analogous to the proposed fix in #253-swingx // but uses the currentColumns as reference. Integer addIndex = currentColumns.indexOf(col); for (int i = 0; i < (getColumnCount() - 1); i++) { TableColumn tableCol = getColumn(i); int actualPosition = currentColumns.indexOf(tableCol); if (actualPosition > addIndex) { super.moveColumn(getColumnCount() - 1, i); break; } } isVisibilityChange = false; }
/** * Update internal state after the visibility of the column * was changed to visible. The given column is assumed to * be contained in this model. * * @param col the column which was made visible. */ protected void moveToVisible(TableColumnExt col) { col.putClientProperty(IGNORE_EVENT, Boolean.TRUE); // two step process: first add at end of columns // then move to "best" position relative to where it // was before hiding. super.addColumn(col); // this is analogous to the proposed fix in #253-swingx // but uses the currentColumns as reference. Integer addIndex = currentColumns.indexOf(col); for (int i = 0; i < (getColumnCount() - 1); i++) { TableColumn tableCol = getColumn(i); int actualPosition = currentColumns.indexOf(tableCol); if (actualPosition > addIndex) { super.moveColumn(getColumnCount() - 1, i); break; } } col.putClientProperty(IGNORE_EVENT, null); }