@Override public void paint(Graphics g, JComponent c) { Graphics2D graphics = (Graphics2D) g.create(); int componentFontSize = SubstanceSizeUtils .getComponentFontSize(this.datePicker); int borderDelta = (int) Math.floor(SubstanceSizeUtils .getBorderStrokeWidth(componentFontSize)); Shape contour = SubstanceOutlineUtilities.getBaseOutline(datePicker .getWidth(), datePicker.getHeight(), Math.max(0, 2.0f * SubstanceSizeUtils .getClassicButtonCornerRadius(componentFontSize) - borderDelta), null, borderDelta); graphics.setColor(SubstanceTextUtilities .getTextBackgroundFillColor(this.datePicker)); graphics.fill(contour); super.paint(g, c); }
/** * Paints background of the specified text component. * * @param g * Graphics context. * @param comp * Component. */ public static void paintTextCompBackground(Graphics g, JComponent comp) { Color backgroundFillColor = getTextBackgroundFillColor(comp); paintTextCompBackground(g, comp, backgroundFillColor, SubstanceCoreUtilities.toDrawWatermark(comp) || !comp.isOpaque()); }
@Override public void paint(Graphics g, JComponent c) { super.paint(g, c); Graphics2D graphics = (Graphics2D) g.create(); int width = this.spinner.getWidth(); int height = this.spinner.getHeight(); int componentFontSize = SubstanceSizeUtils .getComponentFontSize(this.spinner); int borderDelta = (int) Math.floor(SubstanceSizeUtils .getBorderStrokeWidth(componentFontSize)); Shape contour = SubstanceOutlineUtilities .getBaseOutline( width, height, Math.max( 0, 2.0f * SubstanceSizeUtils .getClassicButtonCornerRadius(componentFontSize) - borderDelta), null, borderDelta); graphics.setColor(SubstanceTextUtilities .getTextBackgroundFillColor(this.spinner)); graphics.fill(contour); graphics.dispose(); }
@Override public void paint(Graphics g, JComponent c) { super.paint(g, c); Graphics2D graphics = (Graphics2D) g.create(); int width = this.spinner.getWidth(); int height = this.spinner.getHeight(); int componentFontSize = SubstanceSizeUtils .getComponentFontSize(this.spinner); int borderDelta = (int) Math.floor(SubstanceSizeUtils .getBorderStrokeWidth(componentFontSize)); Shape contour = SubstanceOutlineUtilities .getBaseOutline( width, height, Math.max( 0, 2.0f * SubstanceSizeUtils .getClassicButtonCornerRadius(componentFontSize) - borderDelta), null, borderDelta); graphics.setColor(SubstanceTextUtilities .getTextBackgroundFillColor(this.spinner)); graphics.fill(contour); graphics.dispose(); }
/** * Paints background of the specified text component. * * @param g * Graphics context. * @param comp * Component. */ public static void paintTextCompBackground(Graphics g, JComponent comp) { Color backgroundFillColor = getTextBackgroundFillColor(comp); boolean toPaintWatermark = (SubstanceLookAndFeel.getCurrentSkin(comp) .getWatermark() != null) && (SubstanceCoreUtilities.toDrawWatermark(comp) || !comp .isOpaque()); paintTextCompBackground(g, comp, backgroundFillColor, toPaintWatermark); }
.getTextBackgroundFillColor(this.comboBox)); graphics.fill(contour); } else {
.getTextBackgroundFillColor(this.comboBox)); graphics.fill(contour); } else {