private IView<SComponent> createColorPropertyView( IColorPropertyDescriptor propertyDescriptor, IActionHandler actionHandler, @SuppressWarnings("unused") Locale locale) { SColorPicker viewComponent = createSColorPicker(); if (propertyDescriptor.getDefaultValue() != null) { int[] rgba = ColorHelper.fromHexString((String) propertyDescriptor .getDefaultValue()); viewComponent .setResetValue(new Color(rgba[0], rgba[1], rgba[2], rgba[3])); } SColorPickerConnector connector = new SColorPickerConnector( propertyDescriptor.getName(), viewComponent); connector.setExceptionHandler(actionHandler); return constructView(viewComponent, null, connector); }
/** * {@inheritDoc} */ @Override protected IView<SComponent> createColorPropertyView( IPropertyViewDescriptor propertyViewDescriptor, IActionHandler actionHandler, @SuppressWarnings("unused") Locale locale) { IColorPropertyDescriptor propertyDescriptor = (IColorPropertyDescriptor) propertyViewDescriptor .getModelDescriptor(); SColorPicker viewComponent = createSColorPicker(); if (propertyDescriptor.getDefaultValue() != null) { int[] rgba = ColorHelper.fromHexString((String) propertyDescriptor .getDefaultValue()); viewComponent .setResetValue(new Color(rgba[0], rgba[1], rgba[2], rgba[3])); } SColorPickerConnector connector = new SColorPickerConnector( propertyDescriptor.getName(), viewComponent); connector.setExceptionHandler(actionHandler); return constructView(viewComponent, propertyViewDescriptor, connector); }