public TreeTableCellEditor(JTree tree) { super(new TreeTableTextField()); if (tree == null) { throw new IllegalArgumentException("null tree"); } // JW: no need to... this.tree = tree; // immutable }
private int getColumnPositionBidi() { int width = 0; int column = getBidiTreeColumn(); for(int iter = 0 ; iter < column ; iter++) { width += table.getColumnModel().getColumn(iter).getWidth(); } return width; } }
((TreeTableTextField) getComponent()).init(offset, column, bounds.width, table);
int newOffset = offset - getInsets().left; int newOffset = offset + getInsets().left; int pos = getColumnPositionBidi(); width = table.getColumnModel().getColumn(getBidiTreeColumn()).getWidth(); width = width - (width - newOffset - this.width); super.reshape(pos, y, width, height);
/** * @param row * @param isSelected */ protected void initEditorOffset(JTable table, int row, int column, boolean isSelected) { if (tree == null) return; // Rectangle bounds = tree.getRowBounds(row); // int offset = bounds.x; Object node = tree.getPathForRow(row).getLastPathComponent(); boolean leaf = tree.getModel().isLeaf(node); boolean expanded = tree.isExpanded(row); TreeCellRenderer tcr = tree.getCellRenderer(); Component editorComponent = tcr.getTreeCellRendererComponent(tree, node, isSelected, expanded, leaf, row, false); ((TreeTableTextField) getComponent()).init(row, column, table, tree, editorComponent); }
/** * @param row * @param isSelected */ protected void initEditorOffset(JTable table, int row, int column, boolean isSelected) { if (tree == null) return; // Rectangle bounds = tree.getRowBounds(row); // int offset = bounds.x; Object node = tree.getPathForRow(row).getLastPathComponent(); boolean leaf = tree.getModel().isLeaf(node); boolean expanded = tree.isExpanded(row); TreeCellRenderer tcr = tree.getCellRenderer(); Component editorComponent = tcr.getTreeCellRendererComponent(tree, node, isSelected, expanded, leaf, row, false); ((TreeTableTextField) getComponent()).init(row, column, table, tree, editorComponent); }
/** * @param row * @param isSelected */ protected void initEditorOffset(JTable table, int row, int column, boolean isSelected) { if (tree == null) return; // Rectangle bounds = tree.getRowBounds(row); // int offset = bounds.x; Object node = tree.getPathForRow(row).getLastPathComponent(); boolean leaf = tree.getModel().isLeaf(node); boolean expanded = tree.isExpanded(row); TreeCellRenderer tcr = tree.getCellRenderer(); Component editorComponent = tcr.getTreeCellRendererComponent(tree, node, isSelected, expanded, leaf, row, false); ((TreeTableTextField) getComponent()).init(row, column, table, tree, editorComponent); }
/** * @param row * @param isSelected */ protected void initEditorOffset(JTable table, int row, int column, boolean isSelected) { if (tree == null) return; // Rectangle bounds = tree.getRowBounds(row); // int offset = bounds.x; Object node = tree.getPathForRow(row).getLastPathComponent(); boolean leaf = tree.getModel().isLeaf(node); boolean expanded = tree.isExpanded(row); TreeCellRenderer tcr = tree.getCellRenderer(); Component editorComponent = tcr.getTreeCellRendererComponent(tree, node, isSelected, expanded, leaf, row, false); ((TreeTableTextField) getComponent()).init(row, column, table, tree, editorComponent); }
void init(int offset, int column, int width, JTable table) { this.offset = offset; this.column = column; this.width = width; this.table = table; setComponentOrientation(table.getComponentOrientation()); }
void init(int row, int column, JTable table, JTree tree, Component editorComponent) { this.column = column; this.row = row; this.table = table; this.tree = tree; updateIconWidth(editorComponent); setComponentOrientation(table.getComponentOrientation()); }
public TreeTableCellEditor(JTree tree) { super(new TreeTableTextField()); if (tree == null) { throw new IllegalArgumentException("null tree"); } // JW: no need to... this.tree = tree; // immutable }
public TreeTableCellEditor(JTree tree) { super(new TreeTableTextField()); if (tree == null) { throw new IllegalArgumentException("null tree"); } // JW: no need to... this.tree = tree; // immutable }
public TreeTableCellEditor(JTree tree) { super(new TreeTableTextField()); if (tree == null) { throw new IllegalArgumentException("null tree"); } // JW: no need to... this.tree = tree; // immutable }
void init(int row, int column, JTable table, JTree tree, Component editorComponent) { this.column = column; this.row = row; this.table = table; this.tree = tree; updateIconWidth(editorComponent); setComponentOrientation(table.getComponentOrientation()); }
void init(int row, int column, JTable table, JTree tree, Component editorComponent) { this.column = column; this.row = row; this.table = table; this.tree = tree; updateIconWidth(editorComponent); setComponentOrientation(table.getComponentOrientation()); }
public TreeTableCellEditor(JTree tree) { super(new TreeTableTextField()); if (tree == null) { throw new IllegalArgumentException("null tree"); } // JW: no need to... this.tree = tree; // immutable }
void init(int row, int column, JTable table, JTree tree, Component editorComponent) { this.column = column; this.row = row; this.table = table; this.tree = tree; updateIconWidth(editorComponent); setComponentOrientation(table.getComponentOrientation()); }