Search in sources :

Example 1 with XMLTwoColourRamp

use of com.sldeditor.common.xml.ui.XMLTwoColourRamp in project sldeditor by robward-scisys.

the class ColourRampPanel method createColourRampList.

/**
 * Creates the colour ramp list.
 *
 * @param xmlTwoColourRampList the xml two colour ramp list
 * @return the list
 */
private List<ColourRamp> createColourRampList(XMLTwoColourRampList xmlTwoColourRampList) {
    List<ColourRamp> colourRampList = new ArrayList<ColourRamp>();
    for (XMLTwoColourRamp ramp : xmlTwoColourRampList.getTwoColourRamp()) {
        ColourRamp colourRamp = new ColourRamp();
        Color startColour = ColourUtils.toColour(ramp.getStart());
        Color endColour = ColourUtils.toColour(ramp.getEnd());
        colourRamp.setColourRamp(startColour, endColour);
        colourRampList.add(colourRamp);
    }
    return colourRampList;
}
Also used : XMLTwoColourRamp(com.sldeditor.common.xml.ui.XMLTwoColourRamp) XMLTwoColourRamp(com.sldeditor.common.xml.ui.XMLTwoColourRamp) ColourRamp(com.sldeditor.colourramp.ColourRamp) Color(java.awt.Color) ArrayList(java.util.ArrayList)

Aggregations

ColourRamp (com.sldeditor.colourramp.ColourRamp)1 XMLTwoColourRamp (com.sldeditor.common.xml.ui.XMLTwoColourRamp)1 Color (java.awt.Color)1 ArrayList (java.util.ArrayList)1