public RoiMaskSelector(BindingContext bindingContext) { final Property useRoiMaskProperty = bindingContext.getPropertySet().getProperty(PROPERTY_NAME_USE_ROI_MASK); Assert.argument(useRoiMaskProperty != null, "bindingContext"); Assert.argument(useRoiMaskProperty.getType().equals(Boolean.class) || useRoiMaskProperty.getType() == Boolean.TYPE, "bindingContext"); Assert.argument(bindingContext.getPropertySet().getProperty(PROPERTY_NAME_ROI_MASK) != null, "bindingContext"); Assert.argument(bindingContext.getPropertySet().getProperty(PROPERTY_NAME_ROI_MASK).getType().equals(Mask.class), "bindingContext"); this.productNodeListener = new PNL(); this.bindingContext = bindingContext; useRoiMaskCheckBox = new JCheckBox("Use ROI mask:"); roiMaskComboBox = new JComboBox(); roiMaskComboBox.setRenderer(new DefaultListCellRenderer() { @Override public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); if (value != null) { this.setText(((Mask) value).getName()); } return this; } }); this.showMaskManagerButton = createShowMaskManagerButton(); bindingContext.bind(PROPERTY_NAME_USE_ROI_MASK, useRoiMaskCheckBox); bindingContext.bind(PROPERTY_NAME_ROI_MASK, roiMaskComboBox); bindingContext.bindEnabledState(PROPERTY_NAME_USE_ROI_MASK, true, createUseRoiCondition()); bindingContext.bindEnabledState(PROPERTY_NAME_ROI_MASK, true, createEnableMaskDropDownCondition()); }