}
private void parsePalette(RGBPalette pPalette, String pUgr) {
Map<Integer, RGBColor> colors = new HashMap<Integer, RGBColor>();
StringTokenizer tokenizer = new StringTokenizer(pUgr, " \n\r");
Pixel pixel = new Pixel();
while (tokenizer.hasMoreElements()) {
String token = tokenizer.nextToken();
String nextToken;
if (token.startsWith("title=")) {
StringTokenizer lineTokenizer = new StringTokenizer(token, "\"");
if (lineTokenizer.hasMoreElements()) {
lineTokenizer.nextElement();
if (lineTokenizer.hasMoreElements()) {
pPalette.setFlam3Name((String) lineTokenizer.nextElement());
}
}
}
else if (token.startsWith("index=") && tokenizer.hasMoreElements() && (nextToken = tokenizer.nextToken()).startsWith("color=")) {
int index = Integer.parseInt(token.substring(6, token.length()));
int colorValue = Integer.parseInt(nextToken.substring(6, nextToken.length()));
pixel.setARGBValue(colorValue);
RGBColor color = new RGBColor(pixel.b, pixel.g, pixel.r);
colors.put(index, color);
}
}
boolean doInterpolate = pUgr.contains("numnodes=");