SubstanceColorScheme blueControlsActive = colorSchemes
.get("Magellan Blue Controls Active");
SubstanceColorScheme blueControlsEnabled = colorSchemes
.get("Magellan Blue Controls Enabled");
SubstanceColorSchemeBundle defaultColorSchemeBundle = new SubstanceColorSchemeBundle(
blueControlsActive, blueControlsEnabled, blueControlsEnabled);
defaultColorSchemeBundle.registerColorScheme(blueControlsEnabled, 0.5f,
ComponentState.DISABLED_UNSELECTED);
defaultColorSchemeBundle.registerColorScheme(blueControlsActive, 0.5f,
ComponentState.DISABLED_SELECTED);
// color schemes for the active states
SubstanceColorScheme blueControlsActiveBorder = colorSchemes
.get("Magellan Blue Controls Active Border");
SubstanceColorScheme blueControlsEnabledBorder = colorSchemes
.get("Magellan Blue Controls Enabled Border");
defaultColorSchemeBundle.registerColorScheme(blueControlsActiveBorder,
ColorSchemeAssociationKind.BORDER, ComponentState
.getActiveStates());
defaultColorSchemeBundle.registerColorScheme(blueControlsActiveBorder,
ColorSchemeAssociationKind.BORDER,
ComponentState.DISABLED_SELECTED);
defaultColorSchemeBundle.registerColorScheme(blueControlsEnabledBorder,
ColorSchemeAssociationKind.BORDER, ComponentState.ENABLED,
ComponentState.DISABLED_UNSELECTED);
// color schemes for the pressed states
SubstanceColorScheme blueControlsPressed = colorSchemes
.get("Magellan Blue Controls Pressed");
SubstanceColorScheme blueControlsPressedBorder = colorSchemes
.get("Magellan Blue Controls Pressed Border");
defaultColorSchemeBundle.registerColorScheme(blueControlsPressed,
ColorSchemeAssociationKind.FILL,
ComponentState.PRESSED_SELECTED,
ComponentState.PRESSED_UNSELECTED);
defaultColorSchemeBundle.registerColorScheme(blueControlsPressedBorder,
ColorSchemeAssociationKind.BORDER,
ComponentState.PRESSED_SELECTED,
ComponentState.PRESSED_UNSELECTED);
// color schemes for the rollover / armed states
SubstanceColorScheme greenControls = colorSchemes
.get("Magellan Green Controls");
SubstanceColorScheme greenControlsMark = colorSchemes
.get("Magellan Green Controls Mark");
SubstanceColorScheme greenControlsBorder = colorSchemes
.get("Magellan Green Controls Border");
defaultColorSchemeBundle.registerColorScheme(greenControls,
ColorSchemeAssociationKind.FILL,
ComponentState.ROLLOVER_SELECTED,
ComponentState.ROLLOVER_UNSELECTED, ComponentState.ARMED,
ComponentState.ROLLOVER_ARMED);
defaultColorSchemeBundle.registerColorScheme(greenControlsMark,
ColorSchemeAssociationKind.MARK,
ComponentState.ROLLOVER_SELECTED,
ComponentState.ROLLOVER_UNSELECTED, ComponentState.ARMED,
ComponentState.ROLLOVER_ARMED);
defaultColorSchemeBundle.registerColorScheme(greenControlsBorder,
ColorSchemeAssociationKind.BORDER,
ComponentState.ROLLOVER_SELECTED,
ComponentState.ROLLOVER_UNSELECTED, ComponentState.ARMED,
ComponentState.ROLLOVER_ARMED);
// color scheme for the uneditable text components
ComponentState uneditable = new ComponentState("uneditable",
new ComponentStateFacet[] { ComponentStateFacet.ENABLE },
new ComponentStateFacet[] { ComponentStateFacet.EDITABLE });
SubstanceColorScheme uneditableControls = colorSchemes
.get("Magellan Uneditable Controls");
defaultColorSchemeBundle.registerColorScheme(uneditableControls,
ColorSchemeAssociationKind.FILL, uneditable);
// color scheme for the selected state - preventing fallback to the
// rollover selected state
defaultColorSchemeBundle.registerColorScheme(blueControlsActive,
ColorSchemeAssociationKind.FILL, ComponentState.SELECTED);
// highlight alphas
defaultColorSchemeBundle.registerHighlightColorScheme(greenControls,
0.7f, ComponentState.ROLLOVER_UNSELECTED);
defaultColorSchemeBundle.registerHighlightColorScheme(greenControls,
0.8f, ComponentState.SELECTED);
defaultColorSchemeBundle.registerHighlightColorScheme(greenControls,
0.95f, ComponentState.ROLLOVER_SELECTED);
defaultColorSchemeBundle.registerHighlightColorScheme(greenControls,
1.0f, ComponentState.ARMED, ComponentState.ROLLOVER_ARMED);
SubstanceColorScheme lightBlueBackground = colorSchemes
.get("Magellan Light Blue Background");
this.registerDecorationAreaSchemeBundle(defaultColorSchemeBundle,
lightBlueBackground, DecorationAreaType.NONE);
SubstanceColorScheme mediumBlueBackground = colorSchemes
.get("Magellan Medium Blue Background");
SubstanceColorScheme darkBlueBackground = colorSchemes
.get("Magellan Dark Blue Background");
this.registerAsDecorationArea(mediumBlueBackground,
DecorationAreaType.GENERAL, DecorationAreaType.TOOLBAR);
this.registerAsDecorationArea(darkBlueBackground,
DecorationAreaType.PRIMARY_TITLE_PANE,
DecorationAreaType.SECONDARY_TITLE_PANE,
DecorationAreaType.HEADER);
SubstanceColorScheme lightBlueControlsActive = colorSchemes
.get("Magellan Light Blue Controls Active");
SubstanceColorScheme lightBlueControlsEnabled = colorSchemes
.get("Magellan Light Blue Controls Enabled");
SubstanceColorScheme lightBlueBordersEnabled = colorSchemes
.get("Magellan Light Blue Borders Enabled");
SubstanceColorSchemeBundle footerColorSchemeBundle = new SubstanceColorSchemeBundle(
lightBlueControlsActive, lightBlueControlsEnabled,
lightBlueControlsEnabled);
footerColorSchemeBundle.registerColorScheme(lightBlueControlsEnabled,
0.5f, ComponentState.DISABLED_UNSELECTED);
footerColorSchemeBundle.registerColorScheme(lightBlueControlsActive,
0.5f, ComponentState.DISABLED_SELECTED);
footerColorSchemeBundle.registerColorScheme(lightBlueBordersEnabled,
ColorSchemeAssociationKind.BORDER, ComponentState.ENABLED);
SubstanceColorScheme lightBlueSeparator = colorSchemes
.get("Magellan Light Blue Separator");
footerColorSchemeBundle.registerColorScheme(lightBlueSeparator,
ColorSchemeAssociationKind.SEPARATOR);
SubstanceColorScheme ultraLightBlueBackground = colorSchemes
.get("Magellan Ultralight Blue Background");
this.registerDecorationAreaSchemeBundle(footerColorSchemeBundle,