Skip to content
Snippets Groups Projects
Commit 23d046ad authored by Andreas Bayha's avatar Andreas Bayha
Browse files

Annotations: Factored our color constants

Constants used for backgrouind colors in the table are factored out.

Issue-Ref: 4014
Issue-Url: https://af3-developer.fortiss.org/issues/4014


Signed-off-by: default avatarAndreas Bayha <bayha@fortiss.org>
parent 35b67747
No related branches found
No related tags found
1 merge request!1254014
This commit is part of merge request !125. Comments created here will be created in the context of that merge request.
......@@ -87,6 +87,15 @@ public class AnnotationViewFXController extends CompositeFXControllerBase<SplitP
/** Option text for the annotation type filter combo box. */
private static final String SHOW_ALL_ANNOTATION_TYPES = "Show all annotation types";
/** Background color for table cells, which are not editable and empty. */
public static final Color READ_ONLY_EMPTY_ANNOTATION_BACKGROUND_COLOR = LIGHTGREY;
/** Background color for table cells, which are not editable. */
public static final Color READ_ONLY_ANNOTATION_BACKGROUND_COLOR = BISQUE;
/** Background color for table cells of the selected element. */
protected static final Color SELECTED_ANNOTATION_BACKGROUND_COLOR = LIGHTSEAGREEN;
/** {@link TextField} for entering the filter pattern. */
@FXML
private TextField txtFilterText;
......@@ -508,7 +517,7 @@ public class AnnotationViewFXController extends CompositeFXControllerBase<SplitP
@Override
public Color getBackgroundColor(int column, AnnotationEntry element) {
if(element.getModelElement().equals(selected)) {
return LIGHTSEAGREEN;
return READ_ONLY_EMPTY_ANNOTATION_BACKGROUND_COLOR;
}
if(column > 1 && colIdxAnnotationMap.containsKey(column)) {
......@@ -518,11 +527,11 @@ public class AnnotationViewFXController extends CompositeFXControllerBase<SplitP
element.getAnnotationValueProvider(spec.getClass());
if(valueProvider != null && valueProvider.getAnnotationValue(spec) != null &&
!isEditable(column, element)) {
return BISQUE;
return READ_ONLY_ANNOTATION_BACKGROUND_COLOR;
}
if(!isEditable(column, element)) {
return LIGHTGREY;
return READ_ONLY_ANNOTATION_BACKGROUND_COLOR;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment