private void revalidateTextField() { int row = TreeTable.this.editingRow; if (row == -1) { offset = 0; return; } determineOffset(tree.getPathForRow(row).getLastPathComponent(), TreeTable.this.isRowSelected(row), row); ((TreeTableTextField) super.getComponent()).offset = offset; getComponent().setBounds(TreeTable.this.getCellRect(row, getTreeColumnIndex(), false)); }
private void revalidateTextField() { int row = TreeTable.this.editingRow; if (row == -1) { offset = 0; return; } determineOffset(tree.getPathForRow(row).getLastPathComponent(), TreeTable.this.isRowSelected(row), row); ((TreeTableTextField)super.getComponent()).offset = offset; getComponent().setBounds(TreeTable.this.getCellRect(row, getTreeColumnIndex(), false)); }
private void revalidateTextField() { int row = TreeTable.this.editingRow; if (row == -1) { offset = 0; return; } determineOffset(tree.getPathForRow(row).getLastPathComponent(), TreeTable.this.isRowSelected(row), row); ((TreeTableTextField)super.getComponent()).offset = offset; getComponent().setBounds(TreeTable.this.getCellRect(row, getTreeColumnIndex(), false)); }
/** * Overridden to determine an offset that tree would place the * editor at. The offset is determined from the * <code>getRowBounds</code> JTree method, and additionally * from the icon DefaultTreeCellRenderer will use. * <p>The offset is then set on the TreeTableTextField component * created in the constructor, and returned. */ public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int r, int c) { Component component = super.getTableCellEditorComponent (table, value, isSelected, r, c); determineOffset(value, isSelected, r); ((TreeTableTextField)getComponent()).offset = offset; return component; }
/** * Overridden to determine an offset that tree would place the * editor at. The offset is determined from the * <code>getRowBounds</code> JTree method, and additionally * from the icon DefaultTreeCellRenderer will use. * <p>The offset is then set on the TreeTableTextField component * created in the constructor, and returned. */ public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int r, int c) { Component component = super.getTableCellEditorComponent (table, value, isSelected, r, c); determineOffset(value, isSelected, r); ((TreeTableTextField)getComponent()).offset = offset; return component; }
/** * Overridden to determine an offset that tree would place the * editor at. The offset is determined from the * <code>getRowBounds</code> JTree method, and additionally * from the icon DefaultTreeCellRenderer will use. * <p>The offset is then set on the TreeTableTextField component * created in the constructor, and returned. */ @Override public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int r, int c) { Component component = super.getTableCellEditorComponent(table, value, isSelected, r, c); determineOffset(value, isSelected, r); ((TreeTableTextField) getComponent()).offset = offset; return component; }