use of org.jdesktop.swingx.ux.CellProvider in project GsonFormat by zzz40500.
the class FiledTreeTableModel method getValueAt.
/**
* 返回在单元格中显示的Object
*/
@Override
public Object getValueAt(Object node, int column) {
Object value = "";
if (node instanceof DefaultMutableTreeTableNode) {
DefaultMutableTreeTableNode mutableNode = (DefaultMutableTreeTableNode) node;
Object o = mutableNode.getUserObject();
if (o != null && o instanceof CellProvider) {
CellProvider cellProvider = (CellProvider) o;
value = cellProvider.getCellTitle(column);
}
}
return value;
}
use of org.jdesktop.swingx.ux.CellProvider in project GsonFormat by zzz40500.
the class FiledTreeTableModel method setValueAt.
@Override
public void setValueAt(Object value, Object node, int column) {
super.setValueAt(value, node, column);
if (node instanceof DefaultMutableTreeTableNode) {
DefaultMutableTreeTableNode mutableNode = (DefaultMutableTreeTableNode) node;
Object o = mutableNode.getUserObject();
if (o != null && o instanceof CellProvider) {
CellProvider cellProvider = (CellProvider) o;
cellProvider.setValueAt(column, value.toString());
}
}
}
Aggregations