.getAlphaColor(scheme.getForegroundColor(), 32)); this.addOverlayPainter(toolbarTopLineOverlayPainter, DecorationAreaType.TOOLBAR); (SubstanceColorScheme scheme) -> scheme.getUltraDarkColor().darker(), (SubstanceColorScheme scheme) -> SubstanceColorUtilities .getAlphaColor(scheme.getForegroundColor(), 32)); this.addOverlayPainter(footerTopBezelOverlayPainter, DecorationAreaType.FOOTER);
@Override public Color getWatermarkStampColor(SubstanceColorScheme colorScheme) { return SubstanceColorUtilities.getAlphaColor(colorScheme .getUltraLightColor(), 30); }
@Override public Color getWatermarkStampColor() { return SubstanceColorUtilities.getAlphaColor(this.scheme.getMidColor(), 50); }
public Color getWatermarkDarkColor() { return SubstanceColorUtilities.getAlphaColor( this.scheme.getDarkColor(), 15); }
@Override public Color getWatermarkStampColor(SubstanceColorScheme colorScheme) { return SubstanceColorUtilities.getAlphaColor(colorScheme.getMidColor(), 50); }
@Override public Color getWatermarkDarkColor(SubstanceColorScheme colorScheme) { return SubstanceColorUtilities.getAlphaColor( colorScheme.getDarkColor(), 15); }
@Override public Color getWatermarkStampColor() { return SubstanceColorUtilities.getAlphaColor(this.scheme .getUltraLightColor(), 30); }
@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(); }
@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(); }
@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 c = comp; Component topMostWithSameDecorationAreaType = c; while (c != null) { if (DecorationPainterUtils.getImmediateDecorationType(c) == decorationAreaType) { topMostWithSameDecorationAreaType = c; } c = c.getParent(); } 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(); }
@Override public void paintOverlay(Graphics2D graphics, Component comp, DecorationAreaType decorationAreaType, int width, int height, SubstanceSkin skin) { Color shadowColor = SubstanceColorUtilities .getBackgroundFillColor(comp).darker(); Component c = comp; Component topMostWithSameDecorationAreaType = c; while (c != null) { if (DecorationPainterUtils.getImmediateDecorationType(c) == decorationAreaType) { topMostWithSameDecorationAreaType = c; } c = c.getParent(); } 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(); }
- 1 + bumpWidth, y, SubstanceColorUtilities.getAlphaColor( darkShadowColor, 0))); g2d.draw(rightOutline);
/** * Returns the shadow color for the specified component. * * @param c * Component. * @return Matching shadow color. */ public Color getShadowColor(Component c) { SubstanceColorScheme colorScheme = SubstanceColorSchemeUtilities .getColorScheme(c, ColorSchemeAssociationKind.SEPARATOR, ComponentState.ENABLED); Color back = colorScheme.isDark() ? colorScheme.getDarkColor() : colorScheme.getUltraLightColor(); return SubstanceColorUtilities.getAlphaColor(back, 196); }
- 1 + bumpWidth, y, SubstanceColorUtilities.getAlphaColor( darkShadowColor, 0))); g2d.draw(rightOutline);
.getAlphaColor(darkShadowColor, 0))); g2d.draw(bottomOutline);
/** * Returns the shadow color for the specified component. * * @param c * Component. * @return Matching shadow color. */ public Color getShadowColor(Component c) { SubstanceColorScheme colorScheme = SubstanceColorSchemeUtilities .getColorScheme(c, ColorSchemeAssociationKind.SEPARATOR, ComponentState.ENABLED); Color back = colorScheme.isDark() ? colorScheme.getDarkColor() : colorScheme.getUltraLightColor(); return SubstanceColorUtilities.getAlphaColor(back, 196); }
@Override protected void paintContentBorder(Graphics g, int tabPlacement, int selectedIndex) { SubstanceColorScheme scheme = SubstanceColorSchemeUtilities .getColorScheme(this.tabPane, selectedIndex, ColorSchemeAssociationKind.TAB, ComponentState.ENABLED); this.highlight = scheme.isDark() ? SubstanceColorUtilities .getAlphaColor(scheme.getUltraDarkColor(), 100) : scheme .getLightColor(); super.paintContentBorder(g, tabPlacement, selectedIndex); }
@Override protected void paintContentBorder(Graphics g, int tabPlacement, int selectedIndex) { SubstanceColorScheme scheme = SubstanceColorSchemeUtilities .getColorScheme(this.tabPane, selectedIndex, ColorSchemeAssociationKind.TAB, ComponentState.ENABLED); this.highlight = scheme.isDark() ? SubstanceColorUtilities .getAlphaColor(scheme.getUltraDarkColor(), 100) : scheme .getLightColor(); super.paintContentBorder(g, tabPlacement, selectedIndex); }
/** * Returns the highlight color for the specified component. * * @param c * Component. * @return Matching highlight color. */ public Color getHighlightColor(Component c) { SubstanceColorScheme colorScheme = SubstanceColorSchemeUtilities .getColorScheme(c, ColorSchemeAssociationKind.SEPARATOR, ComponentState.ENABLED); boolean isDark = colorScheme.isDark(); Color foreDark = isDark ? colorScheme.getExtraLightColor() : SubstanceColorUtilities.getInterpolatedColor(colorScheme .getMidColor(), colorScheme.getDarkColor(), 0.4); return SubstanceColorUtilities.getAlphaColor(foreDark, 196); }
/** * Returns the highlight color for the specified component. * * @param c * Component. * @return Matching highlight color. */ public Color getHighlightColor(Component c) { SubstanceColorScheme colorScheme = SubstanceColorSchemeUtilities .getColorScheme(c, ColorSchemeAssociationKind.SEPARATOR, ComponentState.ENABLED); boolean isDark = colorScheme.isDark(); Color foreDark = isDark ? colorScheme.getExtraLightColor() : SubstanceColorUtilities.getInterpolatedColor(colorScheme .getMidColor(), colorScheme.getDarkColor(), 0.4); return SubstanceColorUtilities.getAlphaColor(foreDark, 196); }