private void resetWidgetProcedures() { for (JobOwner owner : widgets) { if (owner instanceof JobWidget) { ((JobWidget) owner).procedure(null); } } }
public void handle(org.nlogo.window.Events.CompiledEvent e) { if (e.sourceOwner == this) { procedure(e.procedure); // use setter method, so subclasses can catch error(e.error); } if (error() == null) { setForeground(java.awt.Color.BLACK); // setEnabled ( true ) ; } else { setForeground(java.awt.Color.RED); // setEnabled ( false ) ; } }