Skip to content

Commit

Permalink
gs-reactor: Rename @GenericBackgroundColor to @GenericValueBackground…
Browse files Browse the repository at this point in the history
…Color
  • Loading branch information
fducroquet committed Sep 28, 2016
1 parent 023dfff commit b2106ae
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.TYPE })
@Inherited
public @interface GenericBackgroundColor {
public @interface GenericValueBackgroundColor {
}

@Retention(RetentionPolicy.RUNTIME)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import org.genericsystem.reactor.annotations.Styles.Flex;
import org.genericsystem.reactor.annotations.Styles.FlexDirectionStyle;
import org.genericsystem.reactor.annotations.Styles.FlexWrap;
import org.genericsystem.reactor.annotations.Styles.GenericBackgroundColor;
import org.genericsystem.reactor.annotations.Styles.GenericValueBackgroundColor;
import org.genericsystem.reactor.annotations.Styles.Height;
import org.genericsystem.reactor.annotations.Styles.JustifyContent;
import org.genericsystem.reactor.annotations.Styles.KeepFlexDirection;
Expand Down Expand Up @@ -80,7 +80,7 @@ public static class GSComponentEditorDiv extends GSSubcellEditorDiv {
}

@Color("#000000")
@GenericBackgroundColor
@GenericValueBackgroundColor
public static class GSSubcellDiv extends GSComponentEditorDiv {
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
import org.genericsystem.reactor.annotations.Styles.Flex;
import org.genericsystem.reactor.annotations.Styles.FlexDirectionStyle;
import org.genericsystem.reactor.annotations.Styles.FlexWrap;
import org.genericsystem.reactor.annotations.Styles.GenericBackgroundColor;
import org.genericsystem.reactor.annotations.Styles.GenericValueBackgroundColor;
import org.genericsystem.reactor.annotations.Styles.Height;
import org.genericsystem.reactor.annotations.Styles.JustifyContent;
import org.genericsystem.reactor.annotations.Styles.KeepFlexDirection;
Expand Down Expand Up @@ -295,7 +295,7 @@ private static <T extends Tag> void processAnnotations(Class<T> tagClass, Tag re
if (backgroundColor != null)
result.addStyle("background-color", backgroundColor.value());

if (tagClass.getAnnotation(GenericBackgroundColor.class) != null)
if (tagClass.getAnnotation(GenericValueBackgroundColor.class) != null)
result.addPrefixBinding(modelContext -> result.addStyle(modelContext, "background-color",
"Color".equals(StringExtractor.SIMPLE_CLASS_EXTRACTOR.apply(modelContext.getGeneric().getMeta())) ? ((GenericStringDefaults) result).getGenericStringProperty(modelContext).getValue() : "#e5ed00"));
FlexWrap flexWrap = tagClass.getAnnotation(FlexWrap.class);
Expand Down

0 comments on commit b2106ae

Please sign in to comment.