Package net.mindengine.galen.specs.colors

Examples of net.mindengine.galen.specs.colors.ColorRange


                throw new SyntaxException("No color defined");
            }
           
            Color color = parseColor(colorText);
           
            colorRanges.add(new ColorRange(color, range));
        }
        return colorRanges;
    }
View Full Code Here


          }})),
         
         
          // Color Scheme
         
          row(specColorScheme(new ColorRange(Color.white, between(46, 52)), new ColorRange(Color.black, between(34, 40))), page(new HashMap<String, PageElement>(){{
              put("object", element(10, 10, 400, 300));
          }}, testImage)),
         
          row(specColorScheme(new ColorRange(Color.white, exact(100))), page(new HashMap<String, PageElement>(){{
              put("object", element(10, 10, 50, 40));
          }}, testImage)),


View Full Code Here

              }})),
             
             
          // Color Scheme
          row(new ValidationError(NO_AREA, messages("\"object\" is not visible on page")),
                  specColorScheme(new ColorRange(Color.black, between(30, 33))), page(new HashMap<String, PageElement>(){{
                      put("object", invisibleElement(10, 10, 400, 300));
              }}, testImage)),
          row(new ValidationError(NO_AREA, messages("\"object\" is absent on page")),
                  specColorScheme(new ColorRange(Color.black, between(30, 33))), page(new HashMap<String, PageElement>(){{
                      put("object", absentElement(10, 10, 400, 300));
              }}, testImage)),
          row(new ValidationError(areas(new ErrorArea(new Rect(10, 10, 400, 300), "object")),
                  messages("color #000000 on \"object\" is 36% which is not in range of 10 to 20%")),
                  specColorScheme(new ColorRange(Color.black, between(10, 20))), page(new HashMap<String, PageElement>(){{
                      put("object", element(10, 10, 400, 300));
              }}, testImage)),
             
          row(new ValidationError(areas(new ErrorArea(new Rect(10, 10, 400, 300), "object")),
                  messages("color #ffffff on \"object\" is 48% instead of 30%")),
                  specColorScheme(new ColorRange(Color.white, exact(30))), page(new HashMap<String, PageElement>(){{
                      put("object", element(10, 10, 400, 300));
              }}, testImage)),
             
          row(new ValidationError(areas(new ErrorArea(new Rect(10, 10, 500, 300), "object")),
                      messages("color #3a70d0 on \"object\" is 12% instead of 30%")),
                      specColorScheme(new ColorRange(Color.decode("#3A70D0"), exact(30))), page(new HashMap<String, PageElement>(){{
                          put("object", element(10, 10, 500, 300));
                  }}, testImage)),


View Full Code Here

TOP

Related Classes of net.mindengine.galen.specs.colors.ColorRange

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.