Added Ids for components
Signed-off-by: Melanie Retter <melanie.retter@bosch-si.com>
This commit is contained in:
@@ -73,6 +73,7 @@ public class ColorPickerLayout extends GridLayout {
|
|||||||
colorSelect.setWidth("220px");
|
colorSelect.setWidth("220px");
|
||||||
|
|
||||||
redSlider = createRGBSlider("", "red");
|
redSlider = createRGBSlider("", "red");
|
||||||
|
redSlider.setId(SPUIComponentIdProvider.COLOR_PICKER_RED_SLIDER);
|
||||||
greenSlider = createRGBSlider("", "green");
|
greenSlider = createRGBSlider("", "green");
|
||||||
blueSlider = createRGBSlider("", "blue");
|
blueSlider = createRGBSlider("", "blue");
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ package org.eclipse.hawkbit.ui.management.tag;
|
|||||||
|
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
|
|
||||||
|
import org.eclipse.hawkbit.ui.utils.SPUIComponentIdProvider;
|
||||||
|
|
||||||
import com.google.common.base.Throwables;
|
import com.google.common.base.Throwables;
|
||||||
import com.vaadin.data.Property;
|
import com.vaadin.data.Property;
|
||||||
import com.vaadin.data.Property.ValueChangeEvent;
|
import com.vaadin.data.Property.ValueChangeEvent;
|
||||||
@@ -44,7 +46,7 @@ public final class SpColorPickerPreview extends ColorPickerPreview implements Te
|
|||||||
try {
|
try {
|
||||||
final Field textField = ColorPickerPreview.class.getDeclaredField("field");
|
final Field textField = ColorPickerPreview.class.getDeclaredField("field");
|
||||||
textField.setAccessible(true);
|
textField.setAccessible(true);
|
||||||
((TextField) textField.get(this)).setId("color-preview-field");
|
((TextField) textField.get(this)).setId(SPUIComponentIdProvider.COLOR_PREVIEW_FIELD);
|
||||||
((TextField) textField.get(this)).addTextChangeListener(this);
|
((TextField) textField.get(this)).addTextChangeListener(this);
|
||||||
} catch (IllegalArgumentException | IllegalAccessException | NoSuchFieldException | SecurityException e) {
|
} catch (IllegalArgumentException | IllegalAccessException | NoSuchFieldException | SecurityException e) {
|
||||||
Throwables.propagate(e);
|
Throwables.propagate(e);
|
||||||
|
|||||||
@@ -310,6 +310,14 @@ public final class SPUIComponentIdProvider {
|
|||||||
* Id for ColorPickerLayout
|
* Id for ColorPickerLayout
|
||||||
*/
|
*/
|
||||||
public static final String COLOR_PICKER_LAYOUT = "color.picker.layout";
|
public static final String COLOR_PICKER_LAYOUT = "color.picker.layout";
|
||||||
|
/**
|
||||||
|
* Id for ColorPickerLayout's red slider
|
||||||
|
*/
|
||||||
|
public static final String COLOR_PICKER_RED_SLIDER = "color.picker.red.slider";
|
||||||
|
/**
|
||||||
|
* Id for Color preview field with the color code
|
||||||
|
*/
|
||||||
|
public static final String COLOR_PREVIEW_FIELD = "color-preview-field";
|
||||||
/**
|
/**
|
||||||
* Id for OptionGroup Create/Update tag
|
* Id for OptionGroup Create/Update tag
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user