Пример #1
0
 /** Sets current renderers enabled state and order to the preview model. */
 private void updateModelManagedRenderers() {
   PreviewModel model = previewController.getModel();
   if (model != null) {
     ArrayList<ManagedRenderer> managedRenderers = new ArrayList<>();
     for (RendererCheckBox rendererCheckBox : renderersList) {
       managedRenderers.add(
           new ManagedRenderer(rendererCheckBox.renderer, rendererCheckBox.isSelected()));
     }
     model.setManagedRenderers(managedRenderers.toArray(new ManagedRenderer[0]));
   }
 }
Пример #2
0
 private void setAllSelected(boolean selected) {
   for (RendererCheckBox rendererWrapper : renderersList) {
     rendererWrapper.setSelected(selected);
   }
   updateModelManagedRenderers();
 }