this.addOverlayPainter(BottomShadowOverlayPainter.getInstance(), DecorationAreaType.TOOLBAR); this.addOverlayPainter(BottomShadowOverlayPainter.getInstance(), DecorationAreaType.FOOTER); final BottomLineOverlayPainter toolbarBottomLineOverlayPainter = new BottomLineOverlayPainter( (SubstanceColorScheme scheme) -> scheme.getUltraDarkColor().darker()); this.addOverlayPainter(toolbarBottomLineOverlayPainter, DecorationAreaType.TOOLBAR); final TopLineOverlayPainter toolbarTopLineOverlayPainter = new TopLineOverlayPainter( (SubstanceColorScheme scheme) -> SubstanceColorUtilities .getAlphaColor(scheme.getForegroundColor(), 32)); final TopBezelOverlayPainter footerTopBezelOverlayPainter = new TopBezelOverlayPainter( (SubstanceColorScheme scheme) -> scheme.getUltraDarkColor().darker(), (SubstanceColorScheme scheme) -> SubstanceColorUtilities
/** * Returns the single instance of this class. * * @return Single instance of this class. */ public synchronized static TopShadowOverlayPainter getInstance() { if (INSTANCE == null) INSTANCE = new TopShadowOverlayPainter(); return INSTANCE; }
/** * Returns the single instance of this class. * * @return Single instance of this class. */ public synchronized static BottomShadowOverlayPainter getInstance() { if (INSTANCE == null) INSTANCE = new BottomShadowOverlayPainter(); return INSTANCE; }
this.addOverlayPainter(TopShadowOverlayPainter.getInstance(), DecorationAreaType.TOOLBAR); this.bottomLineOverlayPainter = new BottomLineOverlayPainter( ColorSchemeSingleColorQuery.DARK); this.addOverlayPainter(this.bottomLineOverlayPainter,
this.menuOverlayPainter = new BottomLineOverlayPainter( new ColorSchemeSingleColorQuery() { @Override this.toolbarOverlayPainter = new TopLineOverlayPainter( new ColorSchemeSingleColorQuery() { @Override
/** * Paints all registered overlays on the specified component. Overlay * painters are registered with * {@link SubstanceSkin#addOverlayPainter(SubstanceOverlayPainter, DecorationAreaType...)} * API. * * @param g * Graphics context. * @param c * Component. * @param skin * Component skin. * @param decorationAreaType * Component decoration area type. */ public static void paintOverlays(Graphics g, Component c, SubstanceSkin skin, DecorationAreaType decorationAreaType) { List<SubstanceOverlayPainter> overlayPainters = skin .getOverlayPainters(decorationAreaType); if (overlayPainters.size() == 0) return; for (SubstanceOverlayPainter overlayPainter : overlayPainters) { Graphics2D g2d = (Graphics2D) g.create(); overlayPainter.paintOverlay(g2d, c, decorationAreaType, c .getWidth(), c.getHeight(), skin); g2d.dispose(); } } }
this.footerTopBezelOverlayPainter = new TopBezelOverlayPainter( ColorSchemeSingleColorQuery.DARK, ColorSchemeSingleColorQuery.ULTRALIGHT); this.menuOverlayPainter = new BottomLineOverlayPainter( new ColorSchemeSingleColorQuery() { @Override this.toolbarOverlayPainter = new TopLineOverlayPainter( new ColorSchemeSingleColorQuery() { @Override this.addOverlayPainter(BottomShadowOverlayPainter.getInstance(), DecorationAreaType.TOOLBAR); this.toolbarBottomLineOverlayPainter = new BottomLineOverlayPainter( ColorSchemeSingleColorQuery.ULTRADARK); this.addOverlayPainter(this.toolbarBottomLineOverlayPainter,
this.addOverlayPainter(TopShadowOverlayPainter.getInstance(), DecorationAreaType.TOOLBAR); this.bottomLineOverlayPainter = new BottomLineOverlayPainter( ColorSchemeSingleColorQuery.DARK); this.addOverlayPainter(this.bottomLineOverlayPainter,
this.menuOverlayPainter = new BottomLineOverlayPainter( new ColorSchemeSingleColorQuery() { @Override this.toolbarOverlayPainter = new TopLineOverlayPainter( new ColorSchemeSingleColorQuery() { @Override
/** * Returns the single instance of this class. * * @return Single instance of this class. */ public synchronized static TopShadowOverlayPainter getInstance() { if (INSTANCE == null) INSTANCE = new TopShadowOverlayPainter(); return INSTANCE; }
/** * Returns the single instance of this class. * * @return Single instance of this class. */ public synchronized static BottomShadowOverlayPainter getInstance() { if (INSTANCE == null) INSTANCE = new BottomShadowOverlayPainter(); return INSTANCE; }
/** * Paints all registered overlays on the specified component. Overlay * painters are registered with * {@link SubstanceSkin#addOverlayPainter(SubstanceOverlayPainter, DecorationAreaType...)} * API. * * @param g * Graphics context. * @param c * Component. * @param skin * Component skin. * @param decorationAreaType * Component decoration area type. */ public static void paintOverlays(Graphics g, Component c, SubstanceSkin skin, DecorationAreaType decorationAreaType) { List<SubstanceOverlayPainter> overlayPainters = skin .getOverlayPainters(decorationAreaType); if (overlayPainters.size() == 0) return; for (SubstanceOverlayPainter overlayPainter : overlayPainters) { Graphics2D g2d = (Graphics2D) g.create(); overlayPainter.paintOverlay(g2d, c, decorationAreaType, c .getWidth(), c.getHeight(), skin); g2d.dispose(); } } }
this.addOverlayPainter(BottomShadowOverlayPainter.getInstance(), DecorationAreaType.TOOLBAR); this.addOverlayPainter(BottomShadowOverlayPainter.getInstance(), DecorationAreaType.FOOTER); this.toolbarBottomLineOverlayPainter = new BottomLineOverlayPainter( new ColorSchemeSingleColorQuery() { @Override this.toolbarTopLineOverlayPainter = new TopLineOverlayPainter( new ColorSchemeSingleColorQuery() { @Override this.footerTopBezelOverlayPainter = new TopBezelOverlayPainter( new ColorSchemeSingleColorQuery() { @Override
this.addOverlayPainter(TopShadowOverlayPainter.getInstance(), DecorationAreaType.TOOLBAR); this.bottomLineOverlayPainter = new BottomLineOverlayPainter( new ColorSchemeSingleColorQuery() { @Override
this.addOverlayPainter(BottomShadowOverlayPainter.getInstance(), DecorationAreaType.TOOLBAR); this.addOverlayPainter(BottomShadowOverlayPainter.getInstance(), DecorationAreaType.FOOTER); this.toolbarBottomLineOverlayPainter = new BottomLineOverlayPainter( new ColorSchemeSingleColorQuery() { @Override this.toolbarTopLineOverlayPainter = new TopLineOverlayPainter( new ColorSchemeSingleColorQuery() { @Override this.footerTopBezelOverlayPainter = new TopBezelOverlayPainter( new ColorSchemeSingleColorQuery() { @Override
this.addOverlayPainter(TopShadowOverlayPainter.getInstance(), DecorationAreaType.TOOLBAR); this.bottomLineOverlayPainter = new BottomLineOverlayPainter( new ColorSchemeSingleColorQuery() { @Override
this.footerTopBezelOverlayPainter = new TopBezelOverlayPainter( ColorSchemeSingleColorQuery.DARK, ColorSchemeSingleColorQuery.ULTRALIGHT); this.menuOverlayPainter = new BottomLineOverlayPainter( new ColorSchemeSingleColorQuery() { @Override this.toolbarOverlayPainter = new TopLineOverlayPainter( new ColorSchemeSingleColorQuery() { @Override this.addOverlayPainter(BottomShadowOverlayPainter.getInstance(), DecorationAreaType.TOOLBAR); this.toolbarBottomLineOverlayPainter = new BottomLineOverlayPainter( ColorSchemeSingleColorQuery.ULTRADARK); this.addOverlayPainter(this.toolbarBottomLineOverlayPainter,
this.footerTopBezelOverlayPainter = new TopBezelOverlayPainter( ColorSchemeSingleColorQuery.ULTRADARK, ColorSchemeSingleColorQuery.LIGHT); this.menuOverlayPainter = new BottomLineOverlayPainter( new ColorSchemeSingleColorQuery() { @Override this.toolbarOverlayPainter = new TopLineOverlayPainter( new ColorSchemeSingleColorQuery() { @Override this.addOverlayPainter(BottomShadowOverlayPainter.getInstance(), DecorationAreaType.TOOLBAR); this.toolbarBottomLineOverlayPainter = new BottomLineOverlayPainter( ColorSchemeSingleColorQuery.ULTRADARK); this.addOverlayPainter(this.toolbarBottomLineOverlayPainter,
this.addOverlayPainter(BottomShadowOverlayPainter.getInstance(), DecorationAreaType.TOOLBAR); this.toolbarBottomLineOverlayPainter = new BottomLineOverlayPainter( new ColorSchemeSingleColorQuery() { @Override this.toolbarTopLineOverlayPainter = new TopLineOverlayPainter( new ColorSchemeSingleColorQuery() { @Override this.footerTopBezelOverlayPainter = new TopBezelOverlayPainter( ColorSchemeSingleColorQuery.FOREGROUND, ColorSchemeSingleColorQuery.ULTRALIGHT);
this.addOverlayPainter(BottomShadowOverlayPainter.getInstance(), DecorationAreaType.TOOLBAR); this.toolbarBottomLineOverlayPainter = new BottomLineOverlayPainter( new ColorSchemeSingleColorQuery() { @Override this.toolbarTopLineOverlayPainter = new TopLineOverlayPainter( new ColorSchemeSingleColorQuery() { @Override this.footerTopBezelOverlayPainter = new TopBezelOverlayPainter( ColorSchemeSingleColorQuery.FOREGROUND, ColorSchemeSingleColorQuery.ULTRALIGHT);