protected void drawControllers(PApplet theApplet) { if (isOpen) { for (ControlWindowCanvas cc : _myControlCanvas) { if (cc.mode() == ControlWindowCanvas.PRE) { cc.draw(theApplet); } } for (ControllerInterface<?> ci : controllers.get()) { if (ci.isVisible()) { ci.updateInternalEvents(theApplet); ci.draw(theApplet); } } for (CDrawable cd : controllers.getDrawables()) { cd.draw(theApplet); } for (ControlWindowCanvas cc : _myControlCanvas) { if (cc.mode() == ControlWindowCanvas.POST) { cc.draw(theApplet); } } } }
/** * Adds a canvas to a controllerGroup such as a tab or group. Use processing's draw methods to add * visual content. * * @param theCanvas * @return ControlWindowCanvas */ public ControlWindowCanvas addCanvas(ControlWindowCanvas theCanvas) { _myControlCanvas.add(theCanvas); theCanvas.setup(cp5.papplet); return theCanvas; }