当前位置: 首页>>代码示例>>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;未经允许,请勿转载。