• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java SubstanceSkin类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.pushingpixels.substance.api.SubstanceSkin的典型用法代码示例。如果您正苦于以下问题:Java SubstanceSkin类的具体用法?Java SubstanceSkin怎么用?Java SubstanceSkin使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



SubstanceSkin类属于org.pushingpixels.substance.api包,在下文中一共展示了SubstanceSkin类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getColors

import org.pushingpixels.substance.api.SubstanceSkin; //导入依赖的package包/类
/**
 * Returns the color scheme used by the interface
 * 
 * @param skin
 * @return {@code Map<String, Color>}
 */
private static Map<String, Color> getColors(SubstanceSkin skin) {
    SubstanceColorScheme scheme = skin.getColorScheme(new JPanel(), ComponentState.DEFAULT);
    Map<String, Color> colors = new HashMap<>();
    colors.put("Node.background", scheme.getBackgroundFillColor());
    colors.put("Node.border", scheme.getUltraDarkColor().darker());
    colors.put("Node.border:selected", scheme.getSelectionBackgroundColor());
    colors.put("Node.Header.background1", scheme.getBackgroundFillColor());
    colors.put("Node.Header.background2", scheme.getBackgroundFillColor().darker());
    colors.put("Node.Header.title", scheme.getUltraLightColor().brighter());
    colors.put("ConnectorPoint.border", scheme.getUltraDarkColor().darker());
    colors.put("NodeConnection.border", scheme.getUltraDarkColor().darker().darker());
    colors.put("NodeConnection.color1", scheme.getBackgroundFillColor());
    colors.put("NodeConnection.color2", scheme.getBackgroundFillColor().brighter());
    colors.put("NodeConnection.point", scheme.getMidColor());
    return colors;
}
 
开发者ID:VISNode,项目名称:VISNode,代码行数:23,代码来源:UIHelper.java


示例2: main

import org.pushingpixels.substance.api.SubstanceSkin; //导入依赖的package包/类
/**
     * @param args the command line arguments
     */
    public static void main(final String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            @Override
            public void run() {
                
                AppConfig config = new AppConfig(args);
                config.load();    
                
// Set the look and feel.
// JG 6 May 2013 to Multicatch                
                try {                    
                    Object laf = Class.forName(config.getProperty("swing.defaultlaf")).newInstance();                    
                    if (laf instanceof LookAndFeel){
                        UIManager.setLookAndFeel((LookAndFeel) laf);
                    } else if (laf instanceof SubstanceSkin) {                      
                        SubstanceLookAndFeel.setSkin((SubstanceSkin) laf);                   
                    }
// JG 6 May 2013 to multicatch
                } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e) {
                }
                
                new JdbUpdate(config).setVisible(true);
            }
        });
    }
 
开发者ID:gnoopy,项目名称:wifepos,代码行数:29,代码来源:JdbUpdate.java


示例3: updateWatermarkImage

import org.pushingpixels.substance.api.SubstanceSkin; //导入依赖的package包/类
public boolean updateWatermarkImage(SubstanceSkin skin) {
	// fix by Chris for bug 67 - support for multiple screens
	Rectangle virtualBounds = new Rectangle();
	GraphicsEnvironment ge = GraphicsEnvironment
			.getLocalGraphicsEnvironment();
	GraphicsDevice[] gds = ge.getScreenDevices();
	for (GraphicsDevice gd : gds) {
		GraphicsConfiguration gc = gd.getDefaultConfiguration();
		virtualBounds = virtualBounds.union(gc.getBounds());
	}

	int screenWidth = virtualBounds.width;
	int screenHeight = virtualBounds.height;
	SubstanceStripeWatermark.watermarkImage = SubstanceCoreUtilities
			.getBlankImage(screenWidth, screenHeight);

	Graphics2D graphics = (Graphics2D) SubstanceStripeWatermark.watermarkImage
			.getGraphics().create();

	boolean status = this.drawWatermarkImage(skin, graphics, 0, 0,
			screenWidth, screenHeight, false);
	graphics.dispose();
	return status;
}
 
开发者ID:Depter,项目名称:JRLib,代码行数:25,代码来源:SubstanceStripeWatermark.java


示例4: drawWatermarkImage

import org.pushingpixels.substance.api.SubstanceSkin; //导入依赖的package包/类
/**
 * Draws the specified portion of the watermark image.
 * 
 * @param skin
 *            Skin to use for painting the watermark.
 * @param graphics
 *            Graphic context.
 * @param x
 *            the <i>x</i> coordinate of the watermark to be drawn.
 * @param y
 *            The <i>y</i> coordinate of the watermark to be drawn.
 * @param width
 *            The width of the watermark to be drawn.
 * @param height
 *            The height of the watermark to be drawn.
 * @param isPreview
 *            Indication whether the result is a preview image.
 * @return Indication whether the draw succeeded.
 */
private boolean drawWatermarkImage(SubstanceSkin skin, Graphics2D graphics,
		int x, int y, int width, int height, boolean isPreview) {
	Color stampColor = null;
	SubstanceColorScheme scheme = skin.getWatermarkColorScheme();
	if (isPreview)
		stampColor = scheme.isDark() ? Color.lightGray : Color.darkGray;
	else {
		stampColor = scheme.getWatermarkStampColor();
	}

	graphics.setColor(stampColor);
	for (int row = y; row < (y + height); row += 2) {
		graphics.drawLine(x, row, x + width, row);
	}
	if (isPreview) {
		graphics.setColor(Color.gray);
		for (int row = y + 1; row < (y + height); row += 2) {
			graphics.drawLine(x, row, x + width, row);
		}
	}
	return true;
}
 
开发者ID:Depter,项目名称:JRLib,代码行数:42,代码来源:SubstanceStripeWatermark.java


示例5: updateWatermarkImage

import org.pushingpixels.substance.api.SubstanceSkin; //导入依赖的package包/类
public boolean updateWatermarkImage(SubstanceSkin skin) {
	// fix by Chris for bug 67 - support for multiple screens
	Rectangle virtualBounds = new Rectangle();
	GraphicsEnvironment ge = GraphicsEnvironment
			.getLocalGraphicsEnvironment();
	GraphicsDevice[] gds = ge.getScreenDevices();
	for (GraphicsDevice gd : gds) {
		GraphicsConfiguration gc = gd.getDefaultConfiguration();
		virtualBounds = virtualBounds.union(gc.getBounds());
	}

	int screenWidth = virtualBounds.width;
	int screenHeight = virtualBounds.height;
	SubstanceCrosshatchWatermark.watermarkImage = SubstanceCoreUtilities
			.getBlankImage(screenWidth, screenHeight);

	Graphics2D graphics = (Graphics2D) SubstanceCrosshatchWatermark.watermarkImage
			.getGraphics().create();
	boolean status = this.drawWatermarkImage(skin, graphics, 0, 0,
			screenWidth, screenHeight, false);
	graphics.dispose();
	return status;
}
 
开发者ID:Depter,项目名称:JRLib,代码行数:24,代码来源:SubstanceCrosshatchWatermark.java


示例6: paintOverlay

import org.pushingpixels.substance.api.SubstanceSkin; //导入依赖的package包/类
@Override
public void paintOverlay(Graphics2D graphics, Component comp,
		DecorationAreaType decorationAreaType, int width, int height,
		SubstanceSkin skin) {
	Color shadowColor = SubstanceColorUtilities
			.getBackgroundFillColor(comp).darker();

	// need to handle components "embedded" in other components
	Component topMostWithSameDecorationAreaType = SubstancePainterUtils
			.getTopMostParentWithDecorationAreaType(comp,
					decorationAreaType);
	Point inTopMost = SwingUtilities.convertPoint(comp, new Point(0, 0),
			topMostWithSameDecorationAreaType);
	int dy = inTopMost.y;

	Graphics2D g2d = (Graphics2D) graphics.create();
	g2d.translate(0, -dy);
	g2d.setPaint(new GradientPaint(0, 0, SubstanceColorUtilities
			.getAlphaColor(shadowColor, 160), 0, 4, SubstanceColorUtilities
			.getAlphaColor(shadowColor, 16)));
	g2d.fillRect(0, 0, comp.getWidth(), 4);
	g2d.dispose();
}
 
开发者ID:Depter,项目名称:JRLib,代码行数:24,代码来源:TopShadowOverlayPainter.java


示例7: getColorScheme

import org.pushingpixels.substance.api.SubstanceSkin; //导入依赖的package包/类
/**
 * Returns the color scheme of the specified tabbed pane tab.
 * 
 * @param jtp
 *            Tabbed pane.
 * @param tabIndex
 *            Tab index.
 * @param componentState
 *            Tab component state.
 * @return The color scheme of the specified tabbed pane tab.
 */
public static SubstanceColorScheme getColorScheme(final JTabbedPane jtp,
		final int tabIndex, ColorSchemeAssociationKind associationKind,
		ComponentState componentState) {
	SubstanceSkin skin = SubstanceCoreUtilities.getSkin(jtp);
	if (skin == null) {
		SubstanceCoreUtilities
				.traceSubstanceApiUsage(jtp,
						"Substance delegate used when Substance is not the current LAF");
	}
	SubstanceColorScheme nonColorized = skin.getColorScheme(jtp,
			associationKind, componentState);
	if (tabIndex >= 0) {
		Component component = jtp.getComponentAt(tabIndex);
		SubstanceColorScheme colorized = getColorizedScheme(component,
				nonColorized, jtp.getForegroundAt(tabIndex), jtp
						.getBackgroundAt(tabIndex), !componentState
						.isDisabled());
		return colorized;
	} else {
		return getColorizedScheme(jtp, nonColorized, !componentState
				.isDisabled());
	}
}
 
开发者ID:Depter,项目名称:JRLib,代码行数:35,代码来源:SubstanceColorSchemeUtilities.java


示例8: installUI

import org.pushingpixels.substance.api.SubstanceSkin; //导入依赖的package包/类
/**
 * Invokes supers implementation of <code>installUI</code> to install the
 * necessary state onto the passed in <code>JRootPane</code> to render the
 * metal look and feel implementation of <code>RootPaneUI</code>. If the
 * <code>windowDecorationStyle</code> property of the <code>JRootPane</code>
 * is other than <code>JRootPane.NONE</code>, this will add a custom
 * <code>Component</code> to render the widgets to <code>JRootPane</code>,
 * as well as installing a custom <code>Border</code> and
 * <code>LayoutManager</code> on the <code>JRootPane</code>.
 * 
 * @param c
 *            the JRootPane to install state onto
 */
@Override
public void installUI(JComponent c) {
	super.installUI(c);
	this.root = (JRootPane) c;
	int style = this.root.getWindowDecorationStyle();
	if (style != JRootPane.NONE) {
		this.installClientDecorations(this.root);
	}

	if (SubstanceCoreUtilities.isRootPaneModified(this.root)) {
		propagateModificationState();
	}

	if (this.root.getClientProperty(SubstanceLookAndFeel.SKIN_PROPERTY) instanceof SubstanceSkin) {
		rootPanesWithCustomSkin++;
	}
}
 
开发者ID:Depter,项目名称:JRLib,代码行数:31,代码来源:SubstanceRootPaneUI.java


示例9: main

import org.pushingpixels.substance.api.SubstanceSkin; //导入依赖的package包/类
/**
     * @param args the command line arguments
     */
    public static void main(final String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            @Override
            public void run() {
                
                AppConfig config = new AppConfig(args);
                config.load();    
                
// Set the look and feel.
// JG 6 May 2013 to Multicatch                
                try {                    
                    Object laf = Class.forName(config.getProperty("swing.defaultlaf")).newInstance();                    
                    if (laf instanceof LookAndFeel){
                        UIManager.setLookAndFeel((LookAndFeel) laf);
                    } else if (laf instanceof SubstanceSkin) {                      
                        SubstanceLookAndFeel.setSkin((SubstanceSkin) laf);                   
                    }
// JG 6 May 2013 to multicatch
                } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e) {
                }
                
                JResetPickupID resetFrame = new JResetPickupID(config);//
                resetFrame.setSize(360, 120);
                resetFrame.setVisible(true);
                
            }
        });
    }
 
开发者ID:gnoopy,项目名称:wifepos,代码行数:32,代码来源:JResetPickupID.java


示例10: drawWatermarkImage

import org.pushingpixels.substance.api.SubstanceSkin; //导入依赖的package包/类
public void drawWatermarkImage(Graphics graphics, Component c, int x,
		int y, int width, int height) {
	SubstanceSkin skin = SubstanceCoreUtilities.getSkin(c);
	Graphics2D g2d = (Graphics2D) graphics.create();
	g2d.setComposite(LafWidgetUtilities
			.getAlphaComposite(c, 0.2f, graphics));
	g2d.setColor(skin.getWatermarkColorScheme().getWatermarkLightColor());
	g2d.fillRect(x, y, width, height);
	g2d.dispose();
}
 
开发者ID:Depter,项目名称:JRLib,代码行数:11,代码来源:SubstanceNullWatermark.java


示例11: previewWatermark

import org.pushingpixels.substance.api.SubstanceSkin; //导入依赖的package包/类
@Override
public void previewWatermark(Graphics g, SubstanceSkin skin, int x, int y,
		int width, int height) {
	this
			.drawWatermarkImage(skin, (Graphics2D) g, x, y, width, height,
					true);
}
 
开发者ID:Depter,项目名称:JRLib,代码行数:8,代码来源:SubstanceStripeWatermark.java


示例12: drawWatermarkImage

import org.pushingpixels.substance.api.SubstanceSkin; //导入依赖的package包/类
/**
 * Draws the specified portion of the watermark image.
 * 
 * @param skin
 *            Skin to use for painting the watermark.
 * @param graphics
 *            Graphic context.
 * @param x
 *            the <i>x</i> coordinate of the watermark to be drawn.
 * @param y
 *            The <i>y</i> coordinate of the watermark to be drawn.
 * @param width
 *            The width of the watermark to be drawn.
 * @param height
 *            The height of the watermark to be drawn.
 * @param isPreview
 *            Indication whether the result is a preview image.
 * @return Indication whether the draw succeeded.
 */
private boolean drawWatermarkImage(SubstanceSkin skin, Graphics2D graphics,
		int x, int y, int width, int height, boolean isPreview) {
	Color stampColorDark = null;
	Color stampColorAll = null;
	Color stampColorLight = null;
	SubstanceColorScheme scheme = skin.getWatermarkColorScheme();
	if (isPreview) {
		stampColorDark = scheme.isDark() ? Color.white : Color.black;
		stampColorAll = Color.lightGray;
		stampColorLight = scheme.isDark() ? Color.black : Color.white;
	} else {
		stampColorDark = scheme.getWatermarkDarkColor();
		stampColorAll = scheme.getWatermarkStampColor();
		stampColorLight = scheme.getWatermarkLightColor();
	}

	graphics.setColor(stampColorAll);
	graphics.fillRect(0, 0, width, height);

	BufferedImage tile = SubstanceCoreUtilities.getBlankImage(4, 4);
	tile.setRGB(0, 0, stampColorDark.getRGB());
	tile.setRGB(2, 2, stampColorDark.getRGB());
	tile.setRGB(0, 1, stampColorLight.getRGB());
	tile.setRGB(2, 3, stampColorLight.getRGB());

	Graphics2D g2d = (Graphics2D) graphics.create();
	g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER,
			0.4f));
	for (int row = y; row < (y + height); row += 4) {
		for (int col = x; col < (x + width); col += 4) {
			g2d.drawImage(tile, col, row, null);
		}
	}
	g2d.dispose();
	return true;
}
 
开发者ID:Depter,项目名称:JRLib,代码行数:56,代码来源:SubstanceCrosshatchWatermark.java


示例13: CremeCoffeeSkin

import org.pushingpixels.substance.api.SubstanceSkin; //导入依赖的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


示例14: SaharaSkin

import org.pushingpixels.substance.api.SubstanceSkin; //导入依赖的package包/类
/**
 * Creates a new <code>Sahara</code> skin.
 */
public SaharaSkin() {
	SubstanceColorScheme activeScheme = new DesertSandColorScheme();
	SubstanceColorScheme enabledScheme = new MetallicColorScheme();
	SubstanceColorScheme disabledScheme = new LightGrayColorScheme();

	SubstanceColorSchemeBundle defaultSchemeBundle = new SubstanceColorSchemeBundle(
			activeScheme, enabledScheme, disabledScheme);
	defaultSchemeBundle.registerHighlightColorScheme(new OliveColorScheme()
			.tint(0.2).named("Sahara Highlight"));
	this.registerDecorationAreaSchemeBundle(defaultSchemeBundle,
			DecorationAreaType.NONE);

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

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

	this.buttonShaper = new ClassicButtonShaper();
	this.fillPainter = new ClassicFillPainter();
	this.borderPainter = new ClassicBorderPainter();
	this.decorationPainter = new ClassicDecorationPainter();
	this.highlightPainter = new ClassicHighlightPainter();
}
 
开发者ID:Depter,项目名称:JRLib,代码行数:32,代码来源:SaharaSkin.java


示例15: ModerateSkin

import org.pushingpixels.substance.api.SubstanceSkin; //导入依赖的package包/类
/**
 * Creates a new <code>Moderate</code> skin.
 */
public ModerateSkin() {
	SubstanceColorScheme activeScheme = new SteelBlueColorScheme();
	SubstanceColorScheme enabledScheme = new MetallicColorScheme();
	SubstanceColorScheme disabledScheme = new LightGrayColorScheme();

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

	this.registerDecorationAreaSchemeBundle(defaultSchemeBundle,
			DecorationAreaType.NONE);

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

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

	this.buttonShaper = new ClassicButtonShaper();
	this.fillPainter = new GlassFillPainter();
	this.decorationPainter = new ClassicDecorationPainter();
	this.borderPainter = new ClassicBorderPainter();
	this.highlightPainter = new ClassicHighlightPainter();
}
 
开发者ID:Depter,项目名称:JRLib,代码行数:34,代码来源:ModerateSkin.java


示例16: paintOverlay

import org.pushingpixels.substance.api.SubstanceSkin; //导入依赖的package包/类
@Override
public void paintOverlay(Graphics2D graphics, Component comp,
		DecorationAreaType decorationAreaType, int width, int height,
		SubstanceSkin skin) {
	Color shadowColor = SubstanceColorUtilities
			.getBackgroundFillColor(comp).darker();

	Component topMostWithSameDecorationAreaType = SubstancePainterUtils
			.getTopMostParentWithDecorationAreaType(comp,
					decorationAreaType);
	int topHeight = topMostWithSameDecorationAreaType.getHeight();

	Point inTopMost = SwingUtilities.convertPoint(comp, new Point(0, 0),
			topMostWithSameDecorationAreaType);
	int dy = inTopMost.y;

	Graphics2D fillGraphics = (Graphics2D) graphics.create();
	fillGraphics.translate(0, -dy);

	int shadowHeight = 4;
	GradientPaint fillPaint = new GradientPaint(0,
			topHeight - shadowHeight, SubstanceColorUtilities
					.getAlphaColor(shadowColor, 0), 0, topHeight,
			SubstanceColorUtilities.getAlphaColor(shadowColor, 128));
	fillGraphics.setPaint(fillPaint);
	fillGraphics.fillRect(0, topHeight - shadowHeight, width, shadowHeight);
	fillGraphics.dispose();
}
 
开发者ID:Depter,项目名称:JRLib,代码行数:29,代码来源:BottomShadowOverlayPainter.java


示例17: paintDecorationArea

import org.pushingpixels.substance.api.SubstanceSkin; //导入依赖的package包/类
public void paintDecorationArea(Graphics2D graphics, Component comp,
		DecorationAreaType decorationAreaType, int width, int height,
		SubstanceSkin skin) {
	graphics
			.setColor(skin.getBackgroundColorScheme(
					DecorationAreaType.PRIMARY_TITLE_PANE)
					.getBackgroundFillColor());
	graphics.fillRect(0, 0, width, height);
}
 
开发者ID:Depter,项目名称:JRLib,代码行数:10,代码来源:FlatDecorationPainter.java


示例18: paintDecorationArea

import org.pushingpixels.substance.api.SubstanceSkin; //导入依赖的package包/类
public void paintDecorationArea(Graphics2D graphics, Component comp,
		DecorationAreaType decorationAreaType, int width, int height,
		SubstanceSkin skin) {
	SubstanceImageCreator.paintRectangularBackground(comp, graphics, 0, 0, width,
			height, skin.getBackgroundColorScheme(decorationAreaType),
			0.0f, false);
}
 
开发者ID:Depter,项目名称:JRLib,代码行数:8,代码来源:Glass3DDecorationPainter.java


示例19: UpdateOptimizationInfo

import org.pushingpixels.substance.api.SubstanceSkin; //导入依赖的package包/类
public UpdateOptimizationInfo(JComponent component) {
	this.component = component;

	this.toDrawWatermark = SubstanceCoreUtilities
			.toDrawWatermark(this.component);
	this.defaultScheme = SubstanceColorSchemeUtilities.getColorScheme(
			this.component, ComponentState.ENABLED);
	this.decorationAreaType = SubstanceLookAndFeel
			.getDecorationType(this.component);

	SubstanceSkin skin = SubstanceCoreUtilities.getSkin(this.component);
	this.isInDecorationArea = (this.decorationAreaType != null)
			&& skin.isRegisteredAsDecorationArea(this.decorationAreaType)
			&& SubstanceCoreUtilities.isOpaque(this.component);
}
 
开发者ID:Depter,项目名称:JRLib,代码行数:16,代码来源:UpdateOptimizationInfo.java


示例20: getMetallicSkin

import org.pushingpixels.substance.api.SubstanceSkin; //导入依赖的package包/类
/**
 * Returns a metallic skin.
 * 
 * @return Metallic skin.
 */
private static SubstanceSkin getMetallicSkin() {
	SubstanceSkin res = new SubstanceSkin() {
		@Override
		public String getDisplayName() {
			return "Metallic Skin";
		}
	};
	res.registerDecorationAreaSchemeBundle(new SubstanceColorSchemeBundle(
			new MetallicColorScheme(), new MetallicColorScheme(),
			new LightGrayColorScheme()), DecorationAreaType.NONE);
	return res;
}
 
开发者ID:Depter,项目名称:JRLib,代码行数:18,代码来源:SubstanceColorSchemeUtilities.java



注:本文中的org.pushingpixels.substance.api.SubstanceSkin类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ExtraInfo类代码示例发布时间:2022-05-23
下一篇:
Java Table类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap