public void valueChanged(ListSelectionEvent event) { if (table.getSelectedRow() == -1) textArea.setText(null); else { TableItem item = table.getTableItemAt(table.getSelectedRow()); textArea.setText(item.toString()); } textArea.setCaretPosition(0); }
protected void customizeCellRenderer( JTable table, Object value, boolean selected, boolean hasFocus, int row, int column) { setPaintFocusBorder(false); setFocusBorderAroundIcon(true); setBorder(NO_FOCUS_BORDER); final TableItem tableItem = ((TableItem) value); tableItem.getCellAppearance().customize(this); }
public void saveData() { TableUtil.stopEditing(myTable); final int count = myTable.getRowCount(); String[] urls = ArrayUtil.newStringArray(count); for (int row = 0; row < count; row++) { final TableItem item = ((MyTableModel) myTable.getModel()).getTableItemAt(row); urls[row] = item.getUrl(); } getModel().setRootUrls(AnnotationOrderRootType.getInstance(), urls); }