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;
}
Aggregations