本文整理汇总了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);
}
}));
}
示例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();
}