Omaha #1255 fixed collaboration colors
config.xml was not in build.properties provided a fallback default if config is missing Change-Id: I9e531b210d6bbe48ce5daf8a760b0bbcf2daa3c6 Former-commit-id: 5ee2e28b8eb94174c7fce660cccc4a77345617a4
This commit is contained in:
parent
ba1bd20407
commit
0d4cd4bab8
2 changed files with 12 additions and 5 deletions
|
@ -2,4 +2,5 @@ source.. = src/
|
|||
output.. = bin/
|
||||
bin.includes = META-INF/,\
|
||||
.,\
|
||||
plugin.xml
|
||||
plugin.xml,\
|
||||
config.xml
|
||||
|
|
|
@ -28,6 +28,7 @@ import com.raytheon.uf.viz.collaboration.comm.provider.user.VenueParticipant;
|
|||
import com.raytheon.uf.viz.collaboration.display.Activator;
|
||||
import com.raytheon.uf.viz.core.RGBColors;
|
||||
import com.raytheon.uf.viz.core.localization.HierarchicalPreferenceStore;
|
||||
import com.raytheon.viz.core.ColorUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -44,6 +45,7 @@ import com.raytheon.uf.viz.core.localization.HierarchicalPreferenceStore;
|
|||
* Jan 30, 2014 2698 bclement changed UserId to VenueParticipant
|
||||
* Mar 06, 2014 2848 bclement synchronized color access
|
||||
* Jul 02, 2014 1255 bclement collaboration specific RGB presets
|
||||
* falls back to ColorUtil resource color presets
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -63,10 +65,14 @@ public class SessionColorManager {
|
|||
HierarchicalPreferenceStore prefs = (HierarchicalPreferenceStore) Activator
|
||||
.getDefault().getPreferenceStore();
|
||||
String[] names = prefs.getStringArray(SESSION_COLOR_PREFERENCE_KEY);
|
||||
rgbPresets = new RGB[names.length];
|
||||
int i = 0;
|
||||
for (String name : names) {
|
||||
rgbPresets[i++] = RGBColors.getRGBColor(name);
|
||||
if (names.length > 0) {
|
||||
rgbPresets = new RGB[names.length];
|
||||
int i = 0;
|
||||
for (String name : names) {
|
||||
rgbPresets[i++] = RGBColors.getRGBColor(name);
|
||||
}
|
||||
} else {
|
||||
rgbPresets = ColorUtil.getResourceColorPresets();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue