Package org.jdesktop.swingx.painter

Examples of org.jdesktop.swingx.painter.MattePainter


  LinearGradientPaint gradientPaint =
      new LinearGradientPaint(0.0f, 0.0f, width, height,
                              new float[]{0.0f, 1.0f},
                              new Color[]{color1, color2});
  MattePainter mattePainter = new MattePainter(gradientPaint);
  return mattePainter;
}
View Full Code Here


  LinearGradientPaint gradientPaint =
      new LinearGradientPaint(0.0f, 0.0f, width, height,
                              new float[]{0.0f, 1.0f},
                              new Color[]{color1, color2});
  MattePainter mattePainter = new MattePainter(gradientPaint);
  return mattePainter;
}
View Full Code Here

    }
   
   

    protected Painter createBackgroundPainter() {
        MattePainter p = new MattePainter(new GradientPaint(0, 0, gradientLightColor, 1, 0, gradientDarkColor));
        p.setPaintStretched(true);
        return new PainterUIResource(p);
    }
View Full Code Here

        private TodayAction todayAction;
        private JXHyperlink todayLink;

        TodayPanel() {
            super(new FlowLayout());
            setBackgroundPainter(new MattePainter(new GradientPaint(0, 0, new Color(238, 238, 238), 0, 1, Color.WHITE)));
            todayAction = new TodayAction();
            todayLink = new JXHyperlink(todayAction);
            todayLink.addMouseListener(createDoubleClickListener());
            Color textColor = new Color(16, 66, 104);
            todayLink.setUnclickedColor(textColor);
View Full Code Here

          backgroundGradientEnd = new ColorUIResource(99, 117, 214);
        }
      }     
     
      defaults.add("TaskPaneContainer.backgroundPainter", new PainterUIResource<JXTaskPaneContainer>(
              new MattePainter(new GradientPaint(
                      0f, 0f, backgroundGradientStart,
                      0f, 1f, backgroundGradientEnd),
                      true)));
      defaults.add("TaskPaneContainer.background", background);
    }
View Full Code Here

    defaults.add(JXTitledPanel.uiClassID, "org.jdesktop.swingx.plaf.basic.BasicTitledPanelUI");
    defaults.add("JXTitledPanel.titleFont", UIManagerExt.getSafeFont("Button.font",
            new FontUIResource("Dialog", Font.PLAIN, 12)));
    defaults.add("JXTitledPanel.titleForeground", new ColorUIResource(Color.WHITE));
    defaults.add("JXTitledPanel.titlePainter", new PainterUIResource<JXTitledPanel>(
              new MattePainter(
                      new GradientPaint(0, 0, Color.LIGHT_GRAY, 0, 1, Color.GRAY), true)));
    defaults.add("JXTitledPanel.captionInsets", new InsetsUIResource(4, 12, 4, 12));
    defaults.add("JXTitledPanel.rightDecorationInsets", new InsetsUIResource(1,1,1,1));
    defaults.add("JXTitledPanel.leftDecorationInsets", new InsetsUIResource(1,1,1,1));
  }
View Full Code Here

    super.addMetalDefaults(addon, defaults);

    if (isPlastic()) {
      defaults.add("JXTitledPanel.titleForeground", new ColorUIResource(Color.WHITE));
      defaults.add("JXTitledPanel.titlePainter", new PainterUIResource<JXTitledPanel>(
                new MattePainter(new GradientPaint(0, 0, new Color(49, 121, 242),
                    0, 1new Color(198, 211, 247)), true)));
    } else {
      defaults.add("JXTitledPanel.titleForeground", new ColorUIResource(Color.WHITE));
      defaults.add("JXTitledPanel.titlePainter", new PainterUIResource<JXTitledPanel>(
                new MattePainter(new GradientPaint(0, 0,
                    MetalLookAndFeel.getCurrentTheme().getPrimaryControl(), 0, 1,
                    MetalLookAndFeel.getCurrentTheme().getPrimaryControlDarkShadow()),true)));
    }
  }
View Full Code Here

    // definitely needs deeper digging
    // kgs: moved to using getSafeXXX from UIManagerExt
    defaults.add("JXTitledPanel.titleForeground", UIManagerExt.getSafeColor(
            "InternalFrame.activeTitleForeground", new ColorUIResource(Color.WHITE)));
    defaults.add("JXTitledPanel.titlePainter", new PainterUIResource<JXTitledPanel>(
            new MattePainter(new GradientPaint(0, 0, UIManagerExt.getSafeColor(
                    "InternalFrame.inactiveTitleGradient", new ColorUIResource(49, 121, 242)),
                    0, 1, UIManagerExt.getSafeColor( "InternalFrame.activeTitleBackground",
                                new ColorUIResource(198, 211, 247))), true)));
 
  }
View Full Code Here

    }

    private Highlighter createExtendedRolloverDecoration() {
        Color color = ColorUtil.setAlpha(Color.YELLOW, 100);
        final PainterHighlighter hl = new PainterHighlighter(HighlightPredicate.NEVER,
                new MattePainter(color));
        // <snip> JXList rollover support
        // listen to changes of cell-rollover property
        // and set a Highlighters custom predicate accordingly
        PropertyChangeListener l = new PropertyChangeListener() {
View Full Code Here

    private void applyDefaults() {
        Color color = UIManager.getColor(SwingXSet.TITLE_GRADIENT_COLOR2_KEY);
        GradientPaint gradient = new GradientPaint(0f, 0f, UIManager
                .getColor(SwingXSet.TITLE_GRADIENT_COLOR1_KEY), 500f, 0f,
                ColorUtil.setAlpha(color, 0));
        Painter<?> matte = new MattePainter(gradient, true);
        setTitlePainter(matte);

        setTitleFont(UIManager.getFont(SwingXSet.TITLE_FONT_KEY));
        Color bg = Utilities.deriveColorHSB(UIManager
                .getColor("Panel.background"), 0, 0, -.06f);
View Full Code Here

TOP

Related Classes of org.jdesktop.swingx.painter.MattePainter

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.