Example usage for com.jgoodies.looks.plastic PlasticTheme BRIGHTEN_START

List of usage examples for com.jgoodies.looks.plastic PlasticTheme BRIGHTEN_START

Introduction

In this page you can find the example usage for com.jgoodies.looks.plastic PlasticTheme BRIGHTEN_START.

Prototype

Color BRIGHTEN_START

To view the source code for com.jgoodies.looks.plastic PlasticTheme BRIGHTEN_START.

Click Source Link

Usage

From source file:com.floreantpos.swing.ButtonUI.java

License:Open Source License

static void add3DEffekt(Graphics g, Rectangle r) {
    Color brightenStop = UIManager.getColor("Plastic.brightenStop"); //$NON-NLS-1$
    if (null == brightenStop)
        brightenStop = PlasticTheme.BRIGHTEN_STOP;

    // Add round sides
    Graphics2D g2 = (Graphics2D) g;
    int border = 10;
    g2.setPaint(new GradientPaint(r.x, r.y, brightenStop, r.x + border, r.y, PlasticTheme.BRIGHTEN_START));
    g2.fillRect(r.x, r.y, border, r.height);
    int x = r.x + r.width - border;
    int y = r.y;//  w  ww . j  a  v a 2s  .c o  m
    g2.setPaint(new GradientPaint(x, y, PlasticTheme.DARKEN_START, x + border, y, PlasticTheme.LT_DARKEN_STOP));
    g2.fillRect(x, y, border, r.height);

    add3DEffekt(g, r, true, PlasticTheme.BRIGHTEN_START, brightenStop, PlasticTheme.DARKEN_START,
            PlasticTheme.LT_DARKEN_STOP);
}

From source file:com.floreantpos.swing.ButtonUI.java

License:Open Source License

static void addLight3DEffekt(Graphics g, Rectangle r, boolean isHorizontal) {
    Color ltBrightenStop = UIManager.getColor("Plastic.ltBrightenStop"); //$NON-NLS-1$
    if (null == ltBrightenStop)
        ltBrightenStop = PlasticTheme.LT_BRIGHTEN_STOP;

    add3DEffekt(g, r, isHorizontal, PlasticTheme.BRIGHTEN_START, ltBrightenStop, PlasticTheme.DARKEN_START,
            PlasticTheme.LT_DARKEN_STOP);
}

From source file:com.floreantpos.swing.ButtonUI.java

License:Open Source License

public static void addLight3DEffekt(Graphics g, Rectangle r) {
    Color ltBrightenStop = UIManager.getColor("Plastic.ltBrightenStop"); //$NON-NLS-1$
    if (null == ltBrightenStop)
        ltBrightenStop = PlasticTheme.LT_BRIGHTEN_STOP;

    add3DEffekt(g, r, true, PlasticTheme.DARKEN_START, PlasticTheme.LT_DARKEN_STOP, PlasticTheme.BRIGHTEN_START,
            ltBrightenStop);/*from   w ww . j  a  v  a  2 s .c o  m*/
}