List of usage examples for com.jgoodies.looks.plastic PlasticTheme BRIGHTEN_STOP
Color BRIGHTEN_STOP
To view the source code for com.jgoodies.looks.plastic PlasticTheme BRIGHTEN_STOP.
Click Source Link
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 va 2 s . 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); }