Package javax.swing.plaf.synth

Examples of javax.swing.plaf.synth.SynthPainter


     *
     * @param context SynthContext containing the style, must not be null.
     * @return a SynthPainter from the context's style, or a default if null.
     */
    public static SynthPainter getPainter(SynthContext context) {
        SynthPainter painter = context.getStyle().getPainter(context);
        return painter != null ? painter : NULL_PAINTER;
    }
View Full Code Here


    @Override
    void paintBackground(SeaGlassContext context, Graphics g, JComponent c) {
        if (((AbstractButton) c).isContentAreaFilled()) {
            int x = 0, y = 0, w = c.getWidth(), h = c.getHeight();
            SynthPainter painter = context.getPainter();
            painter.paintToggleButtonBackground(context, g, x, y, w, h);
        }
    }
View Full Code Here

  public int getInt(SynthContext context, Object key, int defaultValue) {
    return style.getInt(context, key, defaultValue);
  }

  public SynthPainter getPainter(final SynthContext context) {
    return new SynthPainter() {
      public void paintInternalFrameBackground(SynthContext context,
          Graphics g, int x, int y, int w, int h) {
        g.setColor(new Color(50, 50, 50, 100));
        g.fillRoundRect(x, y, w, h, 5, 5);
      }
View Full Code Here

    public int getInt(SynthContext context, Object key, int defaultValue) {
        return style.getInt(context, key, defaultValue);
    }

    public SynthPainter getPainter(final SynthContext context) {
        return new SynthPainter() {
            public void paintInternalFrameBackground(SynthContext context,
                    Graphics g, int x, int y, int w, int h) {
                g.setColor(new Color(50, 50, 50, 100));
                g.fillRoundRect(x, y, w, h, 5, 5);
            }
View Full Code Here

TOP

Related Classes of javax.swing.plaf.synth.SynthPainter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.