@Override protected JTableHeader createDefaultTableHeader() { return new TreeTableHeader( getColumnModel() ); }
public Rectangle getVisibleRect() { Rectangle visibleRect = TreeTable.this.getVisibleRect(); visibleRect.x = positionX; visibleRect.width = TreeTable.this.getColumnModel().getColumn(getTreeColumnIndex()).getWidth(); return visibleRect; }
@Override public Rectangle getVisibleRect() { Rectangle visibleRect = TreeTable.this.getVisibleRect(); visibleRect.x = positionX; visibleRect.width = TreeTable.this.getColumnModel().getColumn(getTreeColumnIndex()).getWidth(); return visibleRect; }
/** * Overridden to always set the size to the height of the TreeTable * and the width of column 0. The paint() method will translate the * coordinates to the correct position. */ public void setBounds(int x, int y, int w, int h) { transY = -y; super.setBounds(0,0, TreeTable.this.getColumnModel().getColumn(0).getWidth(), TreeTable.this.getHeight()); }
public Rectangle getVisibleRect() { Rectangle visibleRect = TreeTable.this.getVisibleRect(); visibleRect.x = positionX; visibleRect.width = TreeTable.this.getColumnModel().getColumn(getTreeColumnIndex()).getWidth(); return visibleRect; }
/** * Overridden to always set the size to the height of the TreeTable * and the width of column 0. The paint() method will translate the * coordinates to the correct position. */ public void setBounds(int x, int y, int w, int h) { transY = -y; super.setBounds(0,0, TreeTable.this.getColumnModel().getColumn(0).getWidth(), TreeTable.this.getHeight()); }
/** * Overridden to always set the size to the height of the TreeTable * and the width of column 0. The paint() method will translate the * coordinates to the correct position. * Fire width property change so that we can revalidate horizontal scrollbar in TreeTableView. */ @Override public void setBounds(int x, int y, int w, int h) { transY = -y; int oldW = getWidth(); super.setBounds(0, 0, TreeTable.this.getColumnModel().getColumn(0).getWidth(), TreeTable.this.getHeight()); if (oldW != w) { firePropertyChange("width", oldW, w); } }
public void tableChanged(TableModelEvent e) { // update tree column name int modelColumn = getTreeColumnIndex(); if (e.getFirstRow() <= 0 && modelColumn != -1 && getColumnCount() > 0) { String columnName = getModel().getColumnName(modelColumn); TableColumn aColumn = getColumnModel().getColumn(modelColumn); aColumn.setHeaderValue(columnName); } ignoreClearSelection = true; try { super.tableChanged(e); } finally { ignoreClearSelection = false; } }
public void tableChanged(TableModelEvent e) { // update tree column name int modelColumn = getTreeColumnIndex(); if (e.getFirstRow() <= 0 && modelColumn != -1 && getColumnCount() > 0) { String columnName = getModel().getColumnName(modelColumn); TableColumn aColumn = getColumnModel().getColumn(modelColumn); aColumn.setHeaderValue(columnName); } ignoreClearSelection = true; try { super.tableChanged(e); } finally { ignoreClearSelection = false; } }
@Override public void tableChanged(TableModelEvent e) { // update tree column name int modelColumn = getTreeColumnIndex(); if ((e.getFirstRow() <= 0) && (modelColumn != -1) && (getColumnCount() > 0)) { String columnName = getModel().getColumnName(modelColumn); TableColumn aColumn = getColumnModel().getColumn(modelColumn); aColumn.setHeaderValue(columnName); } ignoreClearSelection = true; try { super.tableChanged(e); //#61728 - force update of tree's horizontal scrollbar if( null != getTree() ) { firePropertyChange( "positionX", -1, getPositionX() ); } } finally { ignoreClearSelection = false; } }