Set a hierarchy of categories in a palette.
//The first categories under the root.
IlvPaletteCategory c1 = palette.addCategory(root, id1);
c1.setName("category 1");
c1.setLongDescription("The first category that contains…");
IlvPaletteCategory c2 = palette.addCategory(root, id2);
c2.setName("category 2");
c2.setLongDescription("The second category that contains…");
//Now create sub categories in the first ones.
IlvPaletteCategory c101 = new IlvPaletteCategory(id101);
c101.setName("category 101");
c1.add(c101);
IlvPaletteCategory c102 = new IlvPaletteCategory(id102);
c102.setName("category 102");
c1.add(c102);
IlvPaletteCategory c201 = new IlvPaletteCategory(id201);
c201.setName("category 201");
c2.add(c201);
//Finally, create some symbols in different categories.
IlvPaletteSymbol s100 = palette.addSymbol(c1, ids101);
s.setName("s100");
s.setCSSResourceName(css100);
s.setClassName(className100);
s.setIconResourceName(resdir + "icon.gif");
s.addResource(resourceURL1);
s.addResource(resourceURL2);
IlvPaletteSymbol s1010 = palette.addSymbol(c101, ids1010);
IlvPaletteSymbol s1011 = palette.addSymbol(c101, ids1011);
IlvPaletteSymbol s1020 = palette.addSymbol(c102, ids1020);
IlvPaletteSymbol s200 = palette.addSymbol(c2, ids200);
IlvPaletteSymbol s201 = palette.addSymbol(c2, ids201);
IlvPaletteSymbol s202 = palette.addSymbol(c2, ids202);
IlvPaletteSymbol s2010 = palette.addSymbol(c201, ids2010);