Examples of JetColorRamp


Examples of org.geoserver.sldservice.utils.classifier.impl.JetColorRamp

        assertEquals("Incorrect value for 1st reverse color", new Color(maxColorInt,maxColorInt,maxColorInt), reverseColors.get(0));
    }

    @Test
    public void jetColorRampTest() throws Exception {
        JetColorRamp jetRamp = new JetColorRamp();
        jetRamp.setNumClasses(10);
        assertEquals(11, jetRamp.getNumClasses());
        List<Color> colors = jetRamp.getRamp();
        assertEquals("Incorrect size for color ramp", 10, colors.size());
        assertEquals("Incorrect value for 1st color", new Color(0,0,255), colors.get(0));
        assertEquals("Incorrect value for last color", new Color(255,0,0), colors.get(9));

        jetRamp.revert();
        List<Color> reverseColors =  jetRamp.getRamp();
        assertEquals("Incorrect value for last reverse color", new Color(0,0,255), reverseColors.get(9));
        assertEquals("Incorrect value for 1st reverse color", new Color(255,0,0), reverseColors.get(0));
    }
View Full Code Here

Examples of org.geoserver.sldservice.utils.classifier.impl.JetColorRamp

        break;
      case GRAY:
        colorRamp = new GrayColorRamp();
        break;
      case JET:
        colorRamp = new JetColorRamp();
        break;
      case RANDOM:
        colorRamp = new RandomColorRamp();
        break;
      }
View Full Code Here

Examples of org.geoserver.sldservice.utils.classifier.impl.JetColorRamp

                else if (colorRamp.equalsIgnoreCase("red"))
                  ramp = (ColorRamp) new RedColorRamp();
                else if (colorRamp.equalsIgnoreCase("blue"))
                  ramp = (ColorRamp) new BlueColorRamp();
                                else if (colorRamp.equalsIgnoreCase("jet"))
                                    ramp = (ColorRamp) new JetColorRamp();
                                else if (colorRamp.equalsIgnoreCase("gray"))
                                    ramp = (ColorRamp) new GrayColorRamp();
                else if (colorRamp.equalsIgnoreCase("custom")) {
                  Color startColor = Color.decode(form.getFirst("startColor").getValue());
                  Color endColor = Color.decode(form.getFirst("endColor").getValue());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.