If you are following the Flowcharter example, it doesn't actually use a ShapeListBox, but a standard Swing JList with a custom model and renderer.
You can add a fillColor attribute to the shape icons by adding the following members to the Node class in FlowcharterFrame.java:
private class Node
{
public Node(AnchorPattern anchor,
com.mindfusion.diagramming.Shape template, String name) {
_anchor = anchor;
_template = template;
_name = name;
_fillColor = Color.white;
}
public Node(AnchorPattern anchor,
com.mindfusion.diagramming.Shape template, String name, Color fillColor) {
_anchor = anchor;
_template = template;
_name = name;
_fillColor = fillColor;
}
...
public Color getFillColor() {
return _fillColor;
}
private Color _fillColor;
}
and then use the new Node constructor when initializing the _nodes array in the frame class constructor.
To change the appearance of shape icons, find the "//node renderer" comment and add the following lines after the setShape call:
box.setBrush(new SolidBrush(s.getFillColor()));
box.setText(s.getText());
and also change the icons size to one that will fit your texts.
If you prefer using the ShapeListBox control, you can access the ShapeNodes hosted inside it by calling ShapeListBox.getModel().getElement() and typecasting to ShapeNode. Then you can change the attributes of these ShapeNodes to display different colors, texts, etc.
I hope that helps,
Stoyan