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

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

Introduction

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

Prototype

Color LT_DARKEN_STOP

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

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;/*from  ww  w.j  ava2s .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);/*w w w.  j ava  2 s .  c o  m*/
}