@Override public boolean isEnabled() { return (getSelectedRow() != -1) && (getSelectedColumn() != -1) && !isEditing() && getSelectedColumn() != getTreeColumnIndex(); } }
public boolean isEnabled() { return getSelectedRow() != -1 && getSelectedColumn() != -1 && !isEditing(); } }
public void actionPerformed(ActionEvent e) { int row = getSelectedRow(); int col = getSelectedColumn(); if (col == 0) { col = 1; } editCellAt(row, col, null); }
public void actionPerformed(ActionEvent e) { if (TreeTable.this.getSelectedColumn() == getTreeColumnIndex()) { //Issue 40075, on JDK 1.5, BasicTreeUI remarkably expects //that action events performed on trees actually come from //trees e.setSource(getTree()); treeAction.actionPerformed(e); } else { tableAction.actionPerformed(e); } } }
public void actionPerformed(ActionEvent e) { int row = getSelectedRow(); int col = getSelectedColumn(); if (col == 0) { col = 1; } editCellAt(row, col, null); }
public void actionPerformed(ActionEvent e) { int row = getSelectedRow(); int col = getSelectedColumn(); if (col == 0) { col = 1; } editCellAt(row, col, null); }
public boolean isEnabled() { return getSelectedRow() != -1 && getSelectedColumn() != -1 && !isEditing(); } }
public void actionPerformed(ActionEvent e) { if (TreeTable.this.getSelectedColumn() == getTreeColumnIndex()) { //Issue 40075, on JDK 1.5, BasicTreeUI remarkably expects //that action events performed on trees actually come from //trees e.setSource(getTree()); treeAction.actionPerformed(e); } }
public void actionPerformed(ActionEvent e) { if (TreeTable.this.getSelectedColumn() == getTreeColumnIndex()) { //Issue 40075, on JDK 1.5, BasicTreeUI remarkably expects //that action events performed on trees actually come from //trees e.setSource(getTree()); treeAction.actionPerformed(e); } }
/** Overridden to manually draw the focused rectangle for the tree column */ @Override public void paintComponent(Graphics g) { super.paintComponent(g); if (hasFocus() && (getSelectedColumn() == 0) && (getSelectedRow() > 0)) { Color bdr = UIManager.getColor("Tree.selectionBorderColor"); //NOI18N if (bdr == null) { //Button focus color doesn't work on win classic - better to //get the color from a value we know will work - Tim if (getForeground().equals(Color.BLACK)) { //typical bdr = getBackground().darker(); } else { bdr = getForeground().darker(); } } g.setColor(bdr); Rectangle r = getCellRect(getSelectedRow(), getSelectedColumn(), false); g.drawRect(r.x + 1, r.y + 1, r.width - 3, r.height - 3); } }
/** Overridden to manually draw the focused rectangle for the tree column */ public void paintComponent(Graphics g) { super.paintComponent(g); if (hasFocus() && getSelectedColumn() == 0 && getSelectedRow() > 0) { Color bdr = UIManager.getColor("Tree.selectionBorderColor"); //NOI18N if (bdr == null) { //Button focus color doesn't work on win classic - better to //get the color from a value we know will work - Tim if (getForeground().equals(Color.BLACK)) { //typical bdr = getBackground().darker(); } else { bdr = getForeground().darker(); } } g.setColor(bdr); Rectangle r = getCellRect (getSelectedRow(), getSelectedColumn(), false); g.drawRect(r.x+1, r.y+1, r.width - 3, r.height - 3); } }
/** Overridden to manually draw the focused rectangle for the tree column */ public void paintComponent(Graphics g) { super.paintComponent(g); if (hasFocus() && getSelectedColumn() == 0 && getSelectedRow() > 0) { Color bdr = UIManager.getColor("Tree.selectionBorderColor"); //NOI18N if (bdr == null) { //Button focus color doesn't work on win classic - better to //get the color from a value we know will work - Tim if (getForeground().equals(Color.BLACK)) { //typical bdr = getBackground().darker(); } else { bdr = getForeground().darker(); } } g.setColor(bdr); Rectangle r = getCellRect (getSelectedRow(), getSelectedColumn(), false); g.drawRect(r.x+1, r.y+1, r.width - 3, r.height - 3); } }
if (getSelectedColumn() == (getColumnCount() - 1)) { targetColumn = 0; targetRow = getSelectedRow() + 1; } else { targetColumn = getSelectedColumn() + 1; targetRow = getSelectedRow(); if (getSelectedColumn() <= 0) { targetColumn = getColumnCount() - 1; targetRow = getSelectedRow() - 1; } else { targetRow = getSelectedRow(); targetColumn = getSelectedColumn() - 1;
int targetColumn; if (direction) { if (getSelectedColumn() == getColumnCount()-1) { targetColumn=0; targetRow = getSelectedRow()+1; } else { targetColumn = getSelectedColumn()+1; targetRow = getSelectedRow(); if (getSelectedColumn() == 0) { targetColumn = getColumnCount()-1; targetRow = getSelectedRow()-1; } else { targetRow = getSelectedRow(); targetColumn = getSelectedColumn() -1;
int targetColumn; if (direction) { if (getSelectedColumn() == getColumnCount()-1) { targetColumn=0; targetRow = getSelectedRow()+1; } else { targetColumn = getSelectedColumn()+1; targetRow = getSelectedRow(); if (getSelectedColumn() == 0) { targetColumn = getColumnCount()-1; targetRow = getSelectedRow()-1; } else { targetRow = getSelectedRow(); targetColumn = getSelectedColumn() -1;