當前位置: 首頁>>代碼示例>>Java>>正文


Java CompositeBorderPainter類代碼示例

本文整理匯總了Java中org.pushingpixels.substance.api.painter.border.CompositeBorderPainter的典型用法代碼示例。如果您正苦於以下問題:Java CompositeBorderPainter類的具體用法?Java CompositeBorderPainter怎麽用?Java CompositeBorderPainter使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


CompositeBorderPainter類屬於org.pushingpixels.substance.api.painter.border包,在下文中一共展示了CompositeBorderPainter類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: CremeCoffeeSkin

import org.pushingpixels.substance.api.painter.border.CompositeBorderPainter; //導入依賴的package包/類
/**
 * Creates a new <code>Creme Coffee</code> skin.
 */
public CremeCoffeeSkin() {
	SubstanceSkin.ColorSchemes kitchenSinkSchemes = SubstanceSkin
			.getColorSchemes("org/pushingpixels/substance/api/skin/kitchen-sink.colorschemes");
	SubstanceColorScheme activeScheme = kitchenSinkSchemes
			.get("Coffee Active");
	SubstanceColorScheme enabledScheme = new CremeColorScheme();
	SubstanceColorScheme disabledScheme = new LightGrayColorScheme().tint(
			0.35).named("Creme Coffee Disabled");

	SubstanceColorSchemeBundle defaultSchemeBundle = new SubstanceColorSchemeBundle(
			activeScheme, enabledScheme, disabledScheme);
	this.registerDecorationAreaSchemeBundle(defaultSchemeBundle,
			DecorationAreaType.NONE);

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

	this.buttonShaper = new ClassicButtonShaper();
	this.fillPainter = new MatteFillPainter();
	this.decorationPainter = new ArcDecorationPainter();
	this.highlightPainter = new ClassicHighlightPainter();
	this.borderPainter = new CompositeBorderPainter("Creme Coffee",
			new GlassBorderPainter(), new DelegateBorderPainter(
					"Creme Coffee Inner", new GlassBorderPainter(),
					new ColorSchemeTransform() {
						@Override
						public SubstanceColorScheme transform(
								SubstanceColorScheme scheme) {
							return scheme.tint(0.8f);
						}
					}));
}
 
開發者ID:Depter,項目名稱:JRLib,代碼行數:39,代碼來源:CremeCoffeeSkin.java

示例2: BusinessSkin

import org.pushingpixels.substance.api.painter.border.CompositeBorderPainter; //導入依賴的package包/類
/**
 * Creates a new <code>Business</code> skin.
 */
public BusinessSkin() {
	SubstanceColorScheme activeScheme = new MetallicColorScheme()
			.tint(0.15).named("Business Active");
	SubstanceColorScheme enabledScheme = new MetallicColorScheme().shade(
			0.1).named("Business Enabled");
	SubstanceColorScheme disabledScheme = enabledScheme;

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

	SubstanceSkin.ColorSchemes kitchenSinkSchemes = SubstanceSkin
			.getColorSchemes("org/pushingpixels/substance/api/skin/kitchen-sink.colorschemes");
	SubstanceColorScheme highlightColorScheme = kitchenSinkSchemes
			.get("Business Highlight");
	defaultSchemeBundle.registerHighlightColorScheme(highlightColorScheme);

	defaultSchemeBundle.registerColorScheme(disabledScheme, 0.4f,
			ComponentState.DISABLED_UNSELECTED);
	defaultSchemeBundle.registerColorScheme(activeScheme, 0.4f,
			ComponentState.DISABLED_SELECTED);
	defaultSchemeBundle.registerColorScheme(activeScheme,
			ComponentState.SELECTED);
	this.registerDecorationAreaSchemeBundle(defaultSchemeBundle,
			DecorationAreaType.NONE);

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

	SubstanceSkin.ColorSchemes kitchenSkinSchemes = SubstanceSkin
			.getColorSchemes("org/pushingpixels/substance/api/skin/kitchen-sink.colorschemes");
	this
			.registerAsDecorationArea(kitchenSkinSchemes
					.get("LightGray General Watermark"),
					DecorationAreaType.GENERAL);

	this.setSelectedTabFadeStart(0.6);
	this.setSelectedTabFadeEnd(1.0);

	this.buttonShaper = new ClassicButtonShaper();
	this.fillPainter = new ClassicFillPainter();
	this.borderPainter = new CompositeBorderPainter("Business",
			new ClassicBorderPainter(), new DelegateBorderPainter(
					"Business Inner", new ClassicBorderPainter(),
					new ColorSchemeTransform() {
						@Override
						public SubstanceColorScheme transform(
								SubstanceColorScheme scheme) {
							return scheme.tint(0.9f);
						}
					}));

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

	this.highlightPainter = new ClassicHighlightPainter();
}
 
開發者ID:Depter,項目名稱:JRLib,代碼行數:64,代碼來源:BusinessSkin.java


注:本文中的org.pushingpixels.substance.api.painter.border.CompositeBorderPainter類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。