org.pushingpixels.substance.api.SubstanceColorSchemeBundle Java Examples

The following examples show how to use org.pushingpixels.substance.api.SubstanceColorSchemeBundle. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: GeminiSkin.java    From radiance with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
private static void applyHighlightAsFill(SubstanceColorSchemeBundle schemeBundle,
		SubstanceColorScheme highlightScheme, SubstanceColorScheme highlightBorderScheme) {
	// use for borders on rollover controls
	schemeBundle.registerColorScheme(highlightBorderScheme, ColorSchemeAssociationKind.BORDER,
			ComponentState.ROLLOVER_ARMED, ComponentState.ROLLOVER_SELECTED,
			ComponentState.ROLLOVER_UNSELECTED);

	// use for fill of selected controls
	schemeBundle.registerColorScheme(highlightScheme, ColorSchemeAssociationKind.FILL,
			ComponentState.SELECTED, ComponentState.ROLLOVER_SELECTED);

	// use for borders of highlights
	schemeBundle.registerColorScheme(highlightScheme,
			ColorSchemeAssociationKind.HIGHLIGHT_BORDER, ComponentState.getActiveStates());

	// use for text highlight
	schemeBundle.registerColorScheme(highlightScheme, ColorSchemeAssociationKind.HIGHLIGHT_TEXT,
			ComponentState.SELECTED, ComponentState.ROLLOVER_SELECTED);

	// use for armed controls
	schemeBundle.registerColorScheme(highlightScheme, ComponentState.ARMED,
			ComponentState.ROLLOVER_ARMED);
}
 
Example #2
Source File: NebulaAmethystSkin.java    From radiance with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
/**
 * Creates a new <code>Nebula Amethyst</code> skin.
 */
public NebulaAmethystSkin() {
	super(new AccentBuilder().withWindowChromeAccent(new PurpleColorScheme()));

	// Also apply the window chrome accent color on the TOOLBAR area
	SubstanceColorScheme windowChromeAccent = this.getWindowChromeAccent();
	this.registerAsDecorationArea(windowChromeAccent, DecorationAreaType.TOOLBAR);
	this.clearOverlayPainters(DecorationAreaType.TOOLBAR);
	this.addOverlayPainter(BottomShadowOverlayPainter.getInstance(100), DecorationAreaType.TOOLBAR);
	this.addOverlayPainter(this.bottomLineOverlayPainter, DecorationAreaType.TOOLBAR);

	SubstanceColorSchemeBundle toolbarBundle = new SubstanceColorSchemeBundle(
			windowChromeAccent.saturate(0.1f), windowChromeAccent, windowChromeAccent);
	toolbarBundle.registerAlpha(0.5f, ComponentState.DISABLED_SELECTED,
			ComponentState.DISABLED_UNSELECTED);
	toolbarBundle.registerColorScheme(windowChromeAccent.saturate(0.08f),
			SubstanceSlices.ColorSchemeAssociationKind.SEPARATOR);
	this.registerDecorationAreaSchemeBundle(toolbarBundle, DecorationAreaType.TOOLBAR);
}
 
Example #3
Source File: GeminiSkin.java    From radiance with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
/**
 * Applies the specified highlight schemes on the relevant parts of the
 * specified scheme bundle.
 * 
 * @param schemeBundle
 *            Scheme bundle.
 * @param highlightScheme
 *            Highlight scheme.
 * @param highlightBorderScheme
 *            Highlight border scheme.
 */
private static void applyHighlightColorScheme(SubstanceColorSchemeBundle schemeBundle,
		SubstanceColorScheme highlightScheme, SubstanceColorScheme highlightBorderScheme) {
	// specify custom alpha values for the highlights
	schemeBundle.registerHighlightAlpha(0.85f, ComponentState.ROLLOVER_UNSELECTED);
	schemeBundle.registerHighlightAlpha(0.9f, ComponentState.SELECTED);
	schemeBundle.registerHighlightAlpha(1.0f, ComponentState.ROLLOVER_SELECTED,
			ComponentState.ARMED, ComponentState.ROLLOVER_ARMED);
	schemeBundle.registerHighlightColorScheme(highlightScheme, ComponentState.ROLLOVER_UNSELECTED,
			ComponentState.SELECTED, ComponentState.ROLLOVER_SELECTED,
			ComponentState.ARMED, ComponentState.ROLLOVER_ARMED);
}
 
Example #4
Source File: SaharaSkin.java    From radiance with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
/**
 * Creates a new <code>Sahara</code> skin.
 */
public SaharaSkin() {
	SubstanceColorScheme activeScheme = new DesertSandColorScheme();
	SubstanceColorScheme enabledScheme = new MetallicColorScheme();

	SubstanceSkin.ColorSchemes kitchenSinkSchemes = SubstanceSkin.getColorSchemes(
			this.getClass().getClassLoader().getResourceAsStream(
					"org/pushingpixels/substance/api/skin/kitchen-sink.colorschemes"));
	SubstanceColorSchemeBundle defaultSchemeBundle = new SubstanceColorSchemeBundle(
			activeScheme, enabledScheme, kitchenSinkSchemes.get("Gray Disabled"));
	defaultSchemeBundle.registerHighlightColorScheme(
			new OliveColorScheme().shift(Color.white, 0.2f, Color.black, 0.0f).named("Sahara Highlight"));
	this.registerDecorationAreaSchemeBundle(defaultSchemeBundle,
			DecorationAreaType.NONE);

	this.registerAsDecorationArea(activeScheme,
			DecorationAreaType.PRIMARY_TITLE_PANE,
			DecorationAreaType.SECONDARY_TITLE_PANE,
			DecorationAreaType.HEADER);

	// add an overlay painter to paint a drop shadow along the top
	// edge of toolbars
	this.addOverlayPainter(TopShadowOverlayPainter.getInstance(100),
			DecorationAreaType.TOOLBAR);

	// add an overlay painter to paint separator lines along the bottom
	// edges of title panes and menu bars
	BottomLineOverlayPainter bottomLineOverlayPainter = new BottomLineOverlayPainter(
			ColorSchemeSingleColorQuery.MID);
	this.addOverlayPainter(bottomLineOverlayPainter, DecorationAreaType.HEADER);

	this.buttonShaper = new ClassicButtonShaper();
	this.fillPainter = new ClassicFillPainter();
	this.borderPainter = new ClassicBorderPainter();
	this.decorationPainter = new MatteDecorationPainter();
	this.highlightPainter = new ClassicHighlightPainter();
}
 
Example #5
Source File: ModerateSkin.java    From radiance with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
/**
 * Creates a new <code>Moderate</code> skin.
 */
public ModerateSkin() {
    SubstanceColorScheme activeScheme = new SteelBlueColorScheme();
    SubstanceColorScheme enabledScheme = new MetallicColorScheme();

    SubstanceSkin.ColorSchemes kitchenSinkSchemes = SubstanceSkin.getColorSchemes(
            this.getClass().getClassLoader().getResourceAsStream(
                    "org/pushingpixels/substance/api/skin/kitchen-sink.colorschemes"));
    SubstanceColorSchemeBundle defaultSchemeBundle = new SubstanceColorSchemeBundle(
            activeScheme, enabledScheme, kitchenSinkSchemes.get("Gray Disabled"));
    SubstanceColorScheme highlightColorScheme = kitchenSinkSchemes.get("Moderate Highlight");
    defaultSchemeBundle.registerHighlightColorScheme(highlightColorScheme);

    this.registerDecorationAreaSchemeBundle(defaultSchemeBundle, DecorationAreaType.NONE);

    SubstanceColorSchemeBundle headerSchemeBundle = new SubstanceColorSchemeBundle(
            activeScheme.saturate(0.2), activeScheme, kitchenSinkSchemes.get("Gray Disabled"));
    this.registerDecorationAreaSchemeBundle(headerSchemeBundle,
            DecorationAreaType.PRIMARY_TITLE_PANE, DecorationAreaType.SECONDARY_TITLE_PANE,
            DecorationAreaType.HEADER);

    this.registerAsDecorationArea(kitchenSinkSchemes.get("LightGray General Background"),
            DecorationAreaType.GENERAL);

    // add an overlay painter to paint a drop shadow along the top
    // edge of toolbars
    this.addOverlayPainter(TopShadowOverlayPainter.getInstance(100), DecorationAreaType.TOOLBAR);

    // add an overlay painter to paint separator lines along the bottom
    // edges of title panes and menu bars
    BottomLineOverlayPainter bottomLineOverlayPainter = new BottomLineOverlayPainter(
            ColorSchemeSingleColorQuery.MID);
    this.addOverlayPainter(bottomLineOverlayPainter, DecorationAreaType.HEADER);

    this.buttonShaper = new ClassicButtonShaper();
    this.fillPainter = new GlassFillPainter();
    this.decorationPainter = new MatteDecorationPainter();
    this.borderPainter = new ClassicBorderPainter();
    this.highlightPainter = new ClassicHighlightPainter();
}
 
Example #6
Source File: CremeAccentedSkin.java    From radiance with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
/**
 * Creates a new accented <code>Creme</code> skin.
 */
protected CremeAccentedSkin(AccentBuilder accentBuilder) {
    super(accentBuilder);

    ColorSchemes kitchenSinkSchemes = SubstanceSkin.getColorSchemes(
            this.getClass().getClassLoader().getResourceAsStream(
                    "org/pushingpixels/substance/api/skin/kitchen-sink.colorschemes"));
    SubstanceColorScheme enabledScheme = new CremeColorScheme();
    SubstanceColorScheme disabledScheme = kitchenSinkSchemes.get("Creme Disabled");

    SubstanceColorSchemeBundle defaultSchemeBundle = new SubstanceColorSchemeBundle(
            this.getActiveControlsAccent(), enabledScheme, disabledScheme);
    defaultSchemeBundle.registerHighlightColorScheme(this.getHighlightsAccent());
    this.registerDecorationAreaSchemeBundle(defaultSchemeBundle,
            DecorationAreaType.NONE);

    this.registerAsDecorationArea(enabledScheme,
            DecorationAreaType.PRIMARY_TITLE_PANE,
            DecorationAreaType.SECONDARY_TITLE_PANE,
            DecorationAreaType.HEADER, DecorationAreaType.FOOTER,
            DecorationAreaType.GENERAL, DecorationAreaType.TOOLBAR);

    // Add overlay painters to paint drop shadows along the bottom edges of toolbars
    this.addOverlayPainter(BottomShadowOverlayPainter.getInstance(40), DecorationAreaType.TOOLBAR);

    // add an overlay painter to paint a dark line along the bottom edge of toolbars
    SubstanceOverlayPainter toolbarBottomLineOverlayPainter = new BottomLineOverlayPainter(
            SchemeBaseColors::getMidColor);
    this.addOverlayPainter(toolbarBottomLineOverlayPainter, DecorationAreaType.TOOLBAR);

    this.buttonShaper = new ClassicButtonShaper();
    this.fillPainter = new MatteFillPainter();
    this.decorationPainter = new ArcDecorationPainter();
    this.highlightPainter = new ClassicHighlightPainter();
    this.borderPainter = new CompositeBorderPainter("Creme",
            new ClassicBorderPainter(), new DelegateBorderPainter(
            "Creme Inner", new ClassicBorderPainter(),
            (SubstanceColorScheme scheme) -> scheme.tint(0.9f)));
}
 
Example #7
Source File: BusinessBlueSteelSkin.java    From radiance with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
/**
 * Creates a new <code>Business Blue Steel</code> skin.
 */
public BusinessBlueSteelSkin() {
	super(new AccentBuilder()
			.withAccentResource("org/pushingpixels/substance/api/skin/business.colorschemes")
			.withWindowChromeAccent("Business Blue Steel Active Header")
			.withActiveControlsAccent("Business Blue Steel Active")
			.withHighlightsAccent("Business Blue Steel Highlight"));

	SubstanceSkin.ColorSchemes businessSchemes = SubstanceSkin.getColorSchemes(
			this.getClass().getClassLoader().getResourceAsStream(
					"org/pushingpixels/substance/api/skin/business.colorschemes"));

	SubstanceColorScheme disabledScheme = businessSchemes.get("Business Blue Steel Disabled");

	SubstanceColorScheme activeHeaderScheme = businessSchemes
			.get("Business Blue Steel Active Header");
	SubstanceColorScheme enabledHeaderScheme = businessSchemes
			.get("Business Blue Steel Enabled Header");
	SubstanceColorSchemeBundle headerSchemeBundle = new SubstanceColorSchemeBundle(
			activeHeaderScheme, enabledHeaderScheme, enabledHeaderScheme);
	headerSchemeBundle.registerAlpha(0.5f, ComponentState.DISABLED_UNSELECTED, ComponentState.DISABLED_SELECTED);
	headerSchemeBundle.registerColorScheme(enabledHeaderScheme,
			ComponentState.DISABLED_UNSELECTED, ComponentState.DISABLED_SELECTED);
	this.registerDecorationAreaSchemeBundle(headerSchemeBundle,
			DecorationAreaType.PRIMARY_TITLE_PANE, DecorationAreaType.SECONDARY_TITLE_PANE,
			DecorationAreaType.HEADER);

	SubstanceColorScheme activeGeneralScheme = businessSchemes
			.get("Business Blue Steel Active General");
	SubstanceColorScheme enabledGeneralScheme = businessSchemes
			.get("Business Blue Steel Enabled General");
	SubstanceColorSchemeBundle generalSchemeBundle = new SubstanceColorSchemeBundle(
			activeGeneralScheme, enabledGeneralScheme, disabledScheme);
	generalSchemeBundle.registerAlpha(0.7f, ComponentState.DISABLED_UNSELECTED);
	generalSchemeBundle.registerColorScheme(enabledGeneralScheme, ComponentState.DISABLED_UNSELECTED);
	this.registerDecorationAreaSchemeBundle(generalSchemeBundle, DecorationAreaType.FOOTER,
			DecorationAreaType.GENERAL);
}
 
Example #8
Source File: VisorSkin.java    From radiance with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
/**
 * Creates a new <code>Visor</code> skin.
 */
public VisorSkin() {
    ColorSchemes visorSchemes = SubstanceSkin.getColorSchemes(
            this.getClass().getClassLoader().getResourceAsStream(
                    "org/pushingpixels/demo/spyglass/mail/skin/visor.colorschemes"));

    SubstanceColorScheme activeScheme = visorSchemes.get("Visor Active");
    SubstanceColorScheme enabledScheme = visorSchemes.get("Visor Enabled");
    SubstanceColorScheme disabledScheme = visorSchemes.get("Visor Disabled");

    SubstanceColorSchemeBundle defaultSchemeBundle = new SubstanceColorSchemeBundle(
            activeScheme, enabledScheme, disabledScheme);

    defaultSchemeBundle.registerAlpha(0.5f, ComponentState.DISABLED_SELECTED);
    defaultSchemeBundle.registerColorScheme(activeScheme, ComponentState.DISABLED_SELECTED);
    this.registerDecorationAreaSchemeBundle(defaultSchemeBundle, DecorationAreaType.NONE);

    SubstanceColorScheme activeDestinationsScheme =
            visorSchemes.get("Visor Active Destinations");
    SubstanceColorScheme enabledDestinationsScheme =
            visorSchemes.get("Visor Enabled Destinations");
    SubstanceColorSchemeBundle destinationsSchemeBundle = new SubstanceColorSchemeBundle(
            activeDestinationsScheme, enabledDestinationsScheme, disabledScheme);
    destinationsSchemeBundle.registerAlpha(0.7f, ComponentState.DISABLED_UNSELECTED);
    destinationsSchemeBundle.registerColorScheme(enabledDestinationsScheme, ComponentState.DISABLED_UNSELECTED);

    // use SunGlare for destinations highlights
    SubstanceColorScheme destinationsHighlight = new SunGlareColorScheme();
    destinationsSchemeBundle.registerAlpha(0.75f, ComponentState.ROLLOVER_UNSELECTED);
    destinationsSchemeBundle.registerHighlightColorScheme(destinationsHighlight,
            ComponentState.ROLLOVER_UNSELECTED);
    destinationsSchemeBundle.registerAlpha(0.9f, ComponentState.SELECTED);
    destinationsSchemeBundle.registerHighlightColorScheme(destinationsHighlight,
            ComponentState.SELECTED);
    destinationsSchemeBundle.registerAlpha(1.0f, ComponentState.ROLLOVER_SELECTED);
    destinationsSchemeBundle.registerHighlightColorScheme(destinationsHighlight,
            ComponentState.ROLLOVER_SELECTED);
    destinationsSchemeBundle.registerAlpha(0.8f, ComponentState.ARMED, ComponentState.ROLLOVER_ARMED);
    destinationsSchemeBundle.registerHighlightColorScheme(destinationsHighlight,
            ComponentState.ARMED, ComponentState.ROLLOVER_ARMED);
    // use Terracotta for borders of destinations highlights
    destinationsSchemeBundle.registerColorScheme(new TerracottaColorScheme(),
            SubstanceSlices.ColorSchemeAssociationKind.HIGHLIGHT_BORDER,
            ComponentState.getActiveStates());

    this.registerDecorationAreaSchemeBundle(destinationsSchemeBundle,
            VisorMail.DESTINATIONS);

    SubstanceColorSchemeBundle threadsSchemeBundle = new SubstanceColorSchemeBundle(
            activeScheme, enabledScheme, disabledScheme);

    threadsSchemeBundle.registerAlpha(0.5f, ComponentState.DISABLED_SELECTED);
    threadsSchemeBundle.registerColorScheme(activeScheme, ComponentState.DISABLED_SELECTED);
    // Configure white-on-dark-blue highlights for the threads view
    SubstanceColorScheme threadsHighlight = visorSchemes.get("Visor Threads Highlight");
    SubstanceColorScheme threadsHighlightLight = visorSchemes.get("Visor Threads Highlight Light");
    threadsSchemeBundle.registerAlpha(1.0f, ComponentState.ROLLOVER_UNSELECTED);
    threadsSchemeBundle.registerHighlightColorScheme(threadsHighlightLight,
            ComponentState.ROLLOVER_UNSELECTED);
    threadsSchemeBundle.registerAlpha(0.9f, ComponentState.SELECTED);
    threadsSchemeBundle.registerHighlightColorScheme(threadsHighlight,
            ComponentState.SELECTED);
    threadsSchemeBundle.registerAlpha(1.0f, ComponentState.ROLLOVER_SELECTED);
    threadsSchemeBundle.registerHighlightColorScheme(threadsHighlight,
            ComponentState.ROLLOVER_SELECTED);
    threadsSchemeBundle.registerAlpha(0.8f, ComponentState.ARMED, ComponentState.ROLLOVER_ARMED);
    threadsSchemeBundle.registerHighlightColorScheme(threadsHighlight,
            ComponentState.ARMED, ComponentState.ROLLOVER_ARMED);

    this.registerDecorationAreaSchemeBundle(threadsSchemeBundle, VisorMail.THREADS);

    this.buttonShaper = new ClassicButtonShaper();
    this.fillPainter = new ClassicFillPainter();
    this.borderPainter = new ClassicBorderPainter();

    BrushedMetalDecorationPainter decorationPainter = new BrushedMetalDecorationPainter();
    decorationPainter.setBaseDecorationPainter(new ArcDecorationPainter());
    decorationPainter.setTextureAlpha(0.3f);
    this.decorationPainter = decorationPainter;

    this.highlightPainter = new FractionBasedHighlightPainter(
            "Visor Highlight", new float[] { 0.0f, 1.0f },
            new ColorSchemeSingleColorQuery[] { ColorSchemeSingleColorQuery.EXTRALIGHT,
                    ColorSchemeSingleColorQuery.EXTRALIGHT });

    this.borderPainter = new ClassicBorderPainter();
}
 
Example #9
Source File: SeaGlassSkin.java    From radiance with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
/**
 * Creates a new <code>Gemini</code> skin.
 */
public SeaGlassSkin() {
	SubstanceSkin.ColorSchemes schemes = SubstanceSkin.getColorSchemes(
			this.getClass().getClassLoader().getResourceAsStream(
					"org/pushingpixels/demo/spyglass/seaglass/skin/seaglass.colorschemes"));

	SubstanceColorScheme activeScheme = schemes.get("Sea Glass Active");
	SubstanceColorScheme enabledScheme = schemes.get("Sea Glass Enabled");
	SubstanceColorScheme disabledScheme = schemes.get("Sea Glass Disabled");

	SubstanceColorSchemeBundle defaultSchemeBundle = new SubstanceColorSchemeBundle(
			activeScheme, enabledScheme, disabledScheme);

	// borders
	SubstanceColorScheme activeBorderScheme = schemes
			.get("Sea Glass Active Border");
	SubstanceColorScheme enabledBorderScheme = schemes
			.get("Sea Glass Enabled Border");
	SubstanceColorScheme disabledBorderScheme = schemes
			.get("Sea Glass Enabled Border");
	defaultSchemeBundle.registerColorScheme(enabledBorderScheme,
			ColorSchemeAssociationKind.BORDER, ComponentState.ENABLED);
	defaultSchemeBundle.registerColorScheme(activeBorderScheme,
			ColorSchemeAssociationKind.BORDER, ComponentState.DEFAULT);
	defaultSchemeBundle.registerColorScheme(disabledBorderScheme,
			ColorSchemeAssociationKind.BORDER,
			ComponentState.DISABLED_DEFAULT,
			ComponentState.DISABLED_SELECTED,
			ComponentState.DISABLED_UNSELECTED);

	// states
	SubstanceColorScheme defaultScheme = schemes.get("Sea Glass Default");
	SubstanceColorScheme defaultBorderScheme = schemes
			.get("Sea Glass Default Border");
	defaultSchemeBundle.registerColorScheme(defaultScheme,
			ComponentState.DEFAULT);
	defaultSchemeBundle.registerColorScheme(defaultBorderScheme,
			ColorSchemeAssociationKind.BORDER, ComponentState.DEFAULT);

	SubstanceColorScheme pressedScheme = schemes.get("Sea Glass Pressed");
	SubstanceColorScheme pressedBorderScheme = schemes
			.get("Sea Glass Pressed Border");
	defaultSchemeBundle.registerColorScheme(pressedScheme,
			ComponentState.PRESSED_SELECTED,
			ComponentState.PRESSED_UNSELECTED);
	defaultSchemeBundle.registerColorScheme(pressedBorderScheme,
			ColorSchemeAssociationKind.BORDER,
			ComponentState.PRESSED_SELECTED,
			ComponentState.PRESSED_UNSELECTED);

	SubstanceColorScheme selectedScheme = schemes.get("Sea Glass Selected");
	SubstanceColorScheme selectedBorderScheme = schemes
			.get("Sea Glass Selected Border");
	defaultSchemeBundle.registerColorScheme(selectedScheme,
			ComponentState.SELECTED, ComponentState.ROLLOVER_SELECTED);
	defaultSchemeBundle.registerColorScheme(selectedBorderScheme,
			ColorSchemeAssociationKind.BORDER, ComponentState.SELECTED,
			ComponentState.ROLLOVER_SELECTED);

	SubstanceColorScheme backgroundScheme = schemes
			.get("Sea Glass Background");

	this.registerDecorationAreaSchemeBundle(defaultSchemeBundle,
			backgroundScheme, DecorationAreaType.NONE);

	this.registerAsDecorationArea(activeScheme,
			DecorationAreaType.PRIMARY_TITLE_PANE);

	this.addOverlayPainter(new BottomLineOverlayPainter(
			new ColorSchemeSingleColorQuery() {
				@Override
				public Color query(SubstanceColorScheme scheme) {
					return scheme.getDarkColor().darker();
				}
			}), DecorationAreaType.PRIMARY_TITLE_PANE);

	this.buttonShaper = new ClassicButtonShaper();
	this.watermark = null;
	this.fillPainter = new FractionBasedFillPainter("Sea Glass",
			new float[] { 0.0f, 0.49999f, 0.5f, 0.65f, 1.0f },
			new ColorSchemeSingleColorQuery[] {
					ColorSchemeSingleColorQuery.EXTRALIGHT,
					ColorSchemeSingleColorQuery.LIGHT,
					ColorSchemeSingleColorQuery.MID,
					ColorSchemeSingleColorQuery.LIGHT,
					ColorSchemeSingleColorQuery.ULTRALIGHT });

	this.decorationPainter = new MatteDecorationPainter();
	this.highlightPainter = new ClassicHighlightPainter();

	this.borderPainter = new FractionBasedBorderPainter("Sea Glass",
			new float[] { 0.0f, 0.5f, 1.0f },
			new ColorSchemeSingleColorQuery[] {
					ColorSchemeSingleColorQuery.MID,
					ColorSchemeSingleColorQuery.DARK,
					ColorSchemeSingleColorQuery.ULTRADARK });
	this.highlightBorderPainter = new ClassicBorderPainter();
}
 
Example #10
Source File: BusinessAccentedSkin.java    From radiance with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
/**
 * Creates a new accented <code>Business</code> skin.
 */
protected BusinessAccentedSkin(AccentBuilder accentBuilder) {
	super(accentBuilder);

	ColorSchemes businessSchemes = SubstanceSkin.getColorSchemes(
			this.getClass().getClassLoader().getResourceAsStream(
					"org/pushingpixels/substance/api/skin/business.colorschemes"));

	SubstanceColorScheme enabledScheme = businessSchemes.get("Business Enabled");

	SubstanceColorSchemeBundle defaultSchemeBundle = new SubstanceColorSchemeBundle(
			this.getActiveControlsAccent(), enabledScheme, enabledScheme);

	defaultSchemeBundle.registerHighlightColorScheme(this.getHighlightsAccent());

	defaultSchemeBundle.registerAlpha(0.5f, ComponentState.DISABLED_UNSELECTED, ComponentState.DISABLED_SELECTED);
	defaultSchemeBundle.registerColorScheme(enabledScheme, ComponentState.DISABLED_UNSELECTED);
	defaultSchemeBundle.registerColorScheme(this.getActiveControlsAccent(),
			ComponentState.DISABLED_SELECTED, ComponentState.SELECTED);

	defaultSchemeBundle.registerColorScheme(this.getActiveControlsAccent(),
			ColorSchemeAssociationKind.TAB, ComponentState.SELECTED,
			ComponentState.ROLLOVER_SELECTED);

	this.registerDecorationAreaSchemeBundle(defaultSchemeBundle, DecorationAreaType.NONE);

	this.registerAsDecorationArea(this.getWindowChromeAccent(),
			DecorationAreaType.PRIMARY_TITLE_PANE, DecorationAreaType.SECONDARY_TITLE_PANE,
			DecorationAreaType.HEADER, DecorationAreaType.FOOTER);

	ColorSchemes kitchenSinkSchemes = SubstanceSkin.getColorSchemes(
			this.getClass().getClassLoader().getResourceAsStream(
					"org/pushingpixels/substance/api/skin/kitchen-sink.colorschemes"));
	this.registerAsDecorationArea(kitchenSinkSchemes.get("LightGray General Background"),
			DecorationAreaType.GENERAL);

	// add an overlay painter to paint a drop shadow along the top edge of toolbars
	this.addOverlayPainter(TopShadowOverlayPainter.getInstance(80), DecorationAreaType.TOOLBAR);

	// add an overlay painter to paint separator lines along the bottom
	// edges of title panes and menu bars
	BottomLineOverlayPainter bottomLineOverlayPainter = new BottomLineOverlayPainter(
			ColorSchemeSingleColorQuery.MID);
	this.addOverlayPainter(bottomLineOverlayPainter, DecorationAreaType.HEADER);

	this.buttonShaper = new ClassicButtonShaper();
	this.fillPainter = new ClassicFillPainter();
	this.borderPainter = new ClassicBorderPainter();

	BrushedMetalDecorationPainter decorationPainter = new BrushedMetalDecorationPainter();
	decorationPainter.setBaseDecorationPainter(new ArcDecorationPainter());
	decorationPainter.setTextureAlpha(0.2f);
	this.decorationPainter = decorationPainter;

	this.highlightPainter = new ClassicHighlightPainter();
}
 
Example #11
Source File: BusinessBlackSteelSkin.java    From radiance with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
/**
 * Creates a new <code>Business Black Steel</code> skin.
 */
public BusinessBlackSteelSkin() {
	super(new AccentBuilder()
			.withAccentResource("org/pushingpixels/substance/api/skin/business.colorschemes")
			.withWindowChromeAccent("Business Black Steel Active Header")
			.withActiveControlsAccent("Business Black Steel Active")
			.withHighlightsAccent("Business Black Steel Active"));

	SubstanceSkin.ColorSchemes businessSchemes = SubstanceSkin.getColorSchemes(
			this.getClass().getClassLoader().getResourceAsStream(
					"org/pushingpixels/substance/api/skin/business.colorschemes"));

	SubstanceColorScheme activeScheme = businessSchemes.get("Business Black Steel Active");
	SubstanceColorScheme disabledScheme = businessSchemes.get("Business Black Steel Disabled");

	// color scheme bundle for title panes
	SubstanceColorScheme activeHeaderScheme = businessSchemes
			.get("Business Black Steel Active Header");
	SubstanceColorScheme enabledHeaderScheme = businessSchemes
			.get("Business Black Steel Enabled Header");
	SubstanceColorSchemeBundle headerSchemeBundle = new SubstanceColorSchemeBundle(
			activeHeaderScheme, enabledHeaderScheme, disabledScheme);
	headerSchemeBundle.registerAlpha(0.5f, ComponentState.DISABLED_UNSELECTED, ComponentState.DISABLED_SELECTED);
	headerSchemeBundle.registerColorScheme(enabledHeaderScheme,
			ComponentState.DISABLED_UNSELECTED, ComponentState.DISABLED_SELECTED);
	headerSchemeBundle.registerHighlightAlpha(0.6f, ComponentState.ROLLOVER_UNSELECTED);
	headerSchemeBundle.registerHighlightAlpha(0.8f, ComponentState.SELECTED);
	headerSchemeBundle.registerHighlightAlpha(0.95f, ComponentState.ROLLOVER_SELECTED);
	headerSchemeBundle.registerHighlightAlpha(0.8f, ComponentState.ARMED, ComponentState.ROLLOVER_ARMED);
	headerSchemeBundle.registerHighlightColorScheme(activeScheme, ComponentState.ROLLOVER_UNSELECTED,
			ComponentState.SELECTED, ComponentState.ROLLOVER_SELECTED,
			ComponentState.ARMED, ComponentState.ROLLOVER_ARMED);

	this.registerDecorationAreaSchemeBundle(headerSchemeBundle, activeHeaderScheme,
			DecorationAreaType.PRIMARY_TITLE_PANE, DecorationAreaType.SECONDARY_TITLE_PANE,
			DecorationAreaType.HEADER);

	// color scheme bundle for general areas
	SubstanceColorScheme activeGeneralScheme = businessSchemes
			.get("Business Black Steel Active General");
	SubstanceColorScheme enabledGeneralScheme = businessSchemes
			.get("Business Black Steel Enabled General");
	SubstanceColorSchemeBundle generalSchemeBundle = new SubstanceColorSchemeBundle(
			activeGeneralScheme, enabledGeneralScheme, disabledScheme);
	generalSchemeBundle.registerAlpha(0.5f, ComponentState.DISABLED_UNSELECTED);
	generalSchemeBundle.registerColorScheme(disabledScheme, ComponentState.DISABLED_UNSELECTED);
	this.registerDecorationAreaSchemeBundle(generalSchemeBundle, DecorationAreaType.FOOTER,
			DecorationAreaType.GENERAL);
}
 
Example #12
Source File: RavenSkin.java    From radiance with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
/**
 * Creates a new <code>Raven</code> skin.
 */
public RavenSkin() {
	SubstanceSkin.ColorSchemes schemes = SubstanceSkin.getColorSchemes(
			this.getClass().getClassLoader().getResourceAsStream(
					"org/pushingpixels/substance/api/skin/graphite.colorschemes"));

	SubstanceColorScheme activeScheme = new EbonyColorScheme();
	SubstanceColorScheme enabledScheme = new DarkMetallicColorScheme();
	SubstanceColorScheme disabledScheme = schemes.get("Raven Disabled");

	SubstanceColorSchemeBundle defaultSchemeBundle = new SubstanceColorSchemeBundle(
			activeScheme, enabledScheme, disabledScheme);

	// highlight fill scheme + custom alpha for rollover unselected state
	SubstanceColorScheme highlightScheme = schemes.get("Graphite Highlight");
	defaultSchemeBundle.registerHighlightAlpha(0.6f, ComponentState.ROLLOVER_UNSELECTED);
	defaultSchemeBundle.registerHighlightAlpha(0.8f, ComponentState.SELECTED);
	defaultSchemeBundle.registerHighlightAlpha(1.0f, ComponentState.ROLLOVER_SELECTED);
	defaultSchemeBundle.registerHighlightAlpha(0.75f, ComponentState.ARMED, ComponentState.ROLLOVER_ARMED);
	defaultSchemeBundle.registerHighlightColorScheme(highlightScheme, ComponentState.ROLLOVER_UNSELECTED,
			ComponentState.SELECTED, ComponentState.ROLLOVER_SELECTED,
			ComponentState.ARMED, ComponentState.ROLLOVER_ARMED);

	// highlight border scheme
	defaultSchemeBundle.registerColorScheme(new EbonyColorScheme(),
			ColorSchemeAssociationKind.HIGHLIGHT_BORDER, ComponentState
					.getActiveStates());

	// text highlight scheme
	SubstanceColorScheme textHighlightScheme = schemes.get("Graphite Text Highlight");
	defaultSchemeBundle.registerColorScheme(textHighlightScheme,
			ColorSchemeAssociationKind.HIGHLIGHT_TEXT,
			ComponentState.SELECTED, ComponentState.ROLLOVER_SELECTED);

	defaultSchemeBundle.registerColorScheme(highlightScheme,
			ComponentState.ARMED, ComponentState.ROLLOVER_ARMED);

	SubstanceColorScheme highlightMarkScheme = schemes
			.get("Raven Highlight Mark");
	defaultSchemeBundle.registerColorScheme(highlightMarkScheme,
			ColorSchemeAssociationKind.HIGHLIGHT_MARK, ComponentState
					.getActiveStates());

	defaultSchemeBundle.registerAlpha(0.5f, ComponentState.DISABLED_UNSELECTED, ComponentState.DISABLED_SELECTED);
	defaultSchemeBundle.registerColorScheme(disabledScheme, ComponentState.DISABLED_UNSELECTED);
	defaultSchemeBundle.registerColorScheme(highlightScheme, ComponentState.DISABLED_SELECTED);

	SubstanceColorScheme tabHighlightScheme = schemes
			.get("Graphite Tab Highlight");
	defaultSchemeBundle.registerColorScheme(highlightScheme,
			ComponentState.SELECTED);
	defaultSchemeBundle.registerColorScheme(tabHighlightScheme,
			ColorSchemeAssociationKind.TAB, ComponentState.SELECTED);
	defaultSchemeBundle.registerColorScheme(activeScheme,
			ColorSchemeAssociationKind.BORDER, ComponentState.SELECTED,
			ComponentState.ROLLOVER_SELECTED,
			ComponentState.ROLLOVER_UNSELECTED);

	SubstanceColorScheme selectedMarkScheme = schemes
			.get("Raven Selected Mark");
	defaultSchemeBundle.registerColorScheme(selectedMarkScheme,
			ColorSchemeAssociationKind.MARK, ComponentState.SELECTED,
			ComponentState.ROLLOVER_SELECTED,
			ComponentState.DISABLED_SELECTED);
	defaultSchemeBundle.registerColorScheme(selectedMarkScheme,
			ColorSchemeAssociationKind.MARK,
			ComponentState.ROLLOVER_UNSELECTED);

	defaultSchemeBundle.registerColorScheme(activeScheme,
			ColorSchemeAssociationKind.BORDER,
			ComponentState.DISABLED_SELECTED);

	this.registerDecorationAreaSchemeBundle(defaultSchemeBundle,
			schemes.get("Graphite Background").shade(0.4), DecorationAreaType.NONE);

	this.registerAsDecorationArea(enabledScheme,
			DecorationAreaType.PRIMARY_TITLE_PANE,
			DecorationAreaType.SECONDARY_TITLE_PANE,
			DecorationAreaType.HEADER, DecorationAreaType.FOOTER,
			DecorationAreaType.GENERAL, DecorationAreaType.TOOLBAR);

	this.watermarkScheme = activeScheme.shade(0.4);

	this.setTabFadeStart(0.18);
	this.setTabFadeEnd(0.18);

	this.buttonShaper = new ClassicButtonShaper();
	this.fillPainter = new GlassFillPainter();
	this.decorationPainter = new ArcDecorationPainter();
	this.highlightPainter = new ClassicHighlightPainter();
	this.borderPainter = new GlassBorderPainter();
}
 
Example #13
Source File: MistAccentedSkin.java    From radiance with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
/**
 * Creates a new base accented <code>Mist</code> skin.
 */
protected MistAccentedSkin(AccentBuilder accentBuilder) {
    super(accentBuilder);

    ColorSchemes colorSchemes = SubstanceSkin.getColorSchemes(
            this.getClass().getClassLoader().getResourceAsStream(
                    "org/pushingpixels/substance/api/skin/mist.colorschemes"));

    SubstanceColorScheme enabledScheme = colorSchemes.get("Mist Enabled");
    SubstanceColorScheme disabledScheme = colorSchemes.get("Mist Disabled");

    SubstanceColorSchemeBundle defaultSchemeBundle = new SubstanceColorSchemeBundle(
            this.getActiveControlsAccent(), enabledScheme, disabledScheme);
    defaultSchemeBundle.registerColorScheme(this.getHighlightsAccent(),
            ColorSchemeAssociationKind.HIGHLIGHT_TEXT,
            ComponentState.SELECTED, ComponentState.ROLLOVER_SELECTED);
    defaultSchemeBundle.registerColorScheme(this.getHighlightsAccent(),
            ComponentState.SELECTED);
    defaultSchemeBundle.registerColorScheme(enabledScheme,
            ColorSchemeAssociationKind.BORDER, ComponentState.SELECTED);

    defaultSchemeBundle.registerColorScheme(this.getActiveControlsAccent(),
            ColorSchemeAssociationKind.TAB,
            ComponentState.SELECTED, ComponentState.ROLLOVER_SELECTED);

    this.registerDecorationAreaSchemeBundle(defaultSchemeBundle,
            DecorationAreaType.NONE);

    SubstanceColorScheme generalBackgroundScheme = colorSchemes.get("Mist General Background");
    this.registerDecorationAreaSchemeBundle(
            new SubstanceColorSchemeBundle(this.getActiveControlsAccent(), enabledScheme, disabledScheme),
            generalBackgroundScheme,
            DecorationAreaType.GENERAL);

    this.registerAsDecorationArea(enabledScheme,
            DecorationAreaType.PRIMARY_TITLE_PANE,
            DecorationAreaType.SECONDARY_TITLE_PANE,
            DecorationAreaType.HEADER, DecorationAreaType.FOOTER,
            DecorationAreaType.TOOLBAR);

    this.buttonShaper = new StandardButtonShaper();
    this.fillPainter = new MatteFillPainter();
    this.borderPainter = new ClassicBorderPainter();

    this.decorationPainter = new MatteDecorationPainter();
    this.highlightPainter = new ClassicHighlightPainter();
}
 
Example #14
Source File: MagmaSkin.java    From radiance with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
/**
 * Creates a new <code>Magma</code> skin.
 */
public MagmaSkin() {
    SubstanceColorScheme shiftRed = new ShiftColorScheme(
            new SunsetColorScheme(), Color.red, 0.3);
    SubstanceColorScheme defaultScheme = new CharcoalColorScheme();
    SubstanceColorScheme activeScheme = shiftRed.saturate(0.4).named(
            "Magma Active");

    SubstanceColorScheme disabledScheme = new ShadeColorScheme(
            new CharcoalColorScheme(), 0.5) {
        Color foreColor = new Color(104, 93, 90);

        @Override
        public Color getForegroundColor() {
            return this.foreColor;
        }
    }.named("Magma Disabled");

    SubstanceColorSchemeBundle defaultSchemeBundle = new SubstanceColorSchemeBundle(
            activeScheme, defaultScheme, disabledScheme);
    defaultSchemeBundle.registerColorScheme(new CharcoalColorScheme(),
            ColorSchemeAssociationKind.BORDER, ComponentState
                    .getActiveStates());
    defaultSchemeBundle.registerColorScheme(activeScheme,
            ColorSchemeAssociationKind.MARK, ComponentState
                    .getActiveStates());
    defaultSchemeBundle.registerAlpha(0.7f, ComponentState.DISABLED_UNSELECTED,
            ComponentState.DISABLED_SELECTED);
    defaultSchemeBundle.registerColorScheme(disabledScheme,
            ComponentState.DISABLED_UNSELECTED,
            ComponentState.DISABLED_SELECTED);

    defaultSchemeBundle.registerHighlightAlpha(0.7f, ComponentState.ROLLOVER_UNSELECTED);
    defaultSchemeBundle.registerHighlightAlpha(0.7f, ComponentState.SELECTED);
    defaultSchemeBundle.registerHighlightAlpha(0.9f, ComponentState.ROLLOVER_SELECTED);
    defaultSchemeBundle.registerHighlightAlpha(0.7f, ComponentState.ARMED,
            ComponentState.ROLLOVER_ARMED);
    defaultSchemeBundle.registerHighlightColorScheme(activeScheme,
            ComponentState.SELECTED, ComponentState.ROLLOVER_SELECTED);
    defaultSchemeBundle.registerHighlightColorScheme(activeScheme.saturate(-0.2),
            ComponentState.ROLLOVER_UNSELECTED, ComponentState.ARMED, ComponentState.ROLLOVER_ARMED);

    this.registerDecorationAreaSchemeBundle(defaultSchemeBundle,
            DecorationAreaType.NONE);

    this.registerAsDecorationArea(defaultScheme,
            DecorationAreaType.PRIMARY_TITLE_PANE,
            DecorationAreaType.SECONDARY_TITLE_PANE,
            DecorationAreaType.HEADER, DecorationAreaType.FOOTER,
            DecorationAreaType.GENERAL, DecorationAreaType.TOOLBAR);

    this.setTabFadeStart(1.0);
    this.setTabFadeEnd(1.0);

    this.watermarkScheme = defaultScheme.shade(0.5);

    this.buttonShaper = new ClassicButtonShaper();
    this.fillPainter = new GlassFillPainter();
    this.decorationPainter = new ArcDecorationPainter();
    this.watermark = new SubstancePlanktonWatermark();

    this.borderPainter = new GlassBorderPainter();
    this.highlightPainter = new ClassicHighlightPainter();
}