public ImageIcon getIconForPaint(Paint paint, boolean fill) {
if (paint == null)
paint = Color.black;
DrawingAttributes da = new DrawingAttributes();
da.setLinePaint(paint);
da.setStroke(new BasicStroke(2));
if (fill) {
da.setFillPaint(paint);
}
OpenMapAppPartCollection collection = OpenMapAppPartCollection.getInstance();
IconPartList parts = new IconPartList();
if (paint instanceof Color || paint == OMColor.clear) {
Color color = (Color) paint;
Color opaqueColor = new Color(color.getRed(), color.getGreen(), color.getBlue());
DrawingAttributes opaqueDA = new DrawingAttributes();
opaqueDA.setLinePaint(opaqueColor);
opaqueDA.setStroke(new BasicStroke(2));
if (fill) {
opaqueDA.setFillPaint(opaqueColor);
}
parts.add(collection.get("LR_TRI", opaqueDA));
parts.add(collection.get("UL_TRI", da));
} else {