public static void setPreferredRoadColor ( RoadType roadType , Integer color ) { final RoadType rt = roadType == null ? RoadType . OTHER : roadType ; final Preferences prefs = Preferences . userNodeForPackage ( RoadNetworkLayerConstants . class ) ; if ( prefs != null ) { if ( color == null || color . intValue ( ) == DEFAULT_ROAD_COLORS [ rt . ordinal ( ) * 2 ] ) { prefs . remove ( "ROAD_COLOR_" + rt . name ( ) . toUpperCase ( ) ) ; //$NON-NLS-1$ } else { prefs . put ( "ROAD_COLOR_" + rt . name ( ) . toUpperCase ( ) , Integer . toString ( color . intValue ( ) ) ) ; //$NON-NLS-1$ } try { prefs . flush ( ) ; } catch ( BackingStoreException exception ) { // } } }
Set the preferred color to draw the content of the roads of the given type .