I am having trouble changing the color of a UnionSet I am displaying. I
get the UnionSet by opening a shapefile using ShapefileAdapter.
I can change the background of the display as seen below in my code and
the change to foreground only applies to the values displayed in the
upper left corner when a middle mouse event occurs.
I know how to change the axis color via a call to
lonMap.getAxisScale().setColor(Color.BLUE);
But I cannot figure out how to change my UnionSet color.
I see I can't do something like this:
Display.addMap(new ScalarMap( myUnionSet, Display.RGB ));
since no contructors take Sets.
...
ShapefileAdapter shp = ...
UnionSet myUnionSet = shp.getData();
DisplayImplJ3D display = new DisplayImplJ3D("display");
display.getDisplayRenderer().setBackgroundColor(Color.DARK_GRAY);
display.getDisplayRenderer().setForegroundColor(Color.ORANGE);
display.getGraphicsModeControl().setScaleEnable(true);
display.addMap(latMap);
display.addMap(lonMap);
DataReference shp_ref = new DataReferenceImpl("shp_ref");
shp_ref.setData(myUnionSet);
display.addReference(shp_ref);
...
~Ben