1 19 20 package org.netbeans.modules.tasklist.usertasks.renderers; 21 22 import java.awt.Component ; 23 import javax.swing.JTable ; 24 import org.netbeans.modules.tasklist.usertasks.UserTaskTreeTableNode; 25 import org.netbeans.modules.tasklist.usertasks.model.UserTask; 26 import org.netbeans.modules.tasklist.usertasks.treetable.BooleanTableCellRenderer; 27 import org.netbeans.modules.tasklist.usertasks.treetable.TreeTable; 28 29 34 public class DoneTreeTableCellRenderer extends BooleanTableCellRenderer { 35 @Override 36 public java.awt.Component getTableCellRendererComponent( 37 JTable table, 38 Object value, boolean isSelected, boolean hasFocus, 39 int row, int column) { 40 Object node = ((TreeTable) table).getNodeForRow(row); 41 Component cmp = super.getTableCellRendererComponent( 42 table, value, isSelected, hasFocus, 43 row, column); 44 if (value == null) 45 return cmp; 46 47 UserTask ut = ((UserTaskTreeTableNode) node).getUserTask(); 48 setEnabled(!ut.isValuesComputed() && ut.areDependenciesDone()); 49 50 return this; 51 } 52 } 53 | Popular Tags |