FileDocCategorySizeDatePackage
MotifBorders.javaAPI DocJava SE 6 API25154Tue Jun 10 00:21:56 BST 2008com.sun.java.swing.plaf.motif

MotifBorders

public class MotifBorders extends Object
Factory object that can vend Icons appropriate for the basic L & F.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

version
1.38 11/30/05
author
Amy Fowler

Fields Summary
Constructors Summary
Methods Summary
public static voiddrawBezel(java.awt.Graphics g, int x, int y, int w, int h, boolean isPressed, boolean hasFocus, java.awt.Color shadow, java.awt.Color highlight, java.awt.Color darkShadow, java.awt.Color focus)

      

        Color oldColor = g.getColor();	
        g.translate(x, y);

        if (isPressed) {
            if (hasFocus){  
	        g.setColor(focus);
        	g.drawRect(0, 0, w-1, h-1);
            }	  
            g.setColor(shadow);         // inner border
            g.drawRect(1, 1, w-3, h-3);
      
            g.setColor(highlight);    // inner 3D border
            g.drawLine(2, h-3, w-3, h-3);
            g.drawLine(w-3, 2, w-3, h-4);
      
        } else {
            if (hasFocus) {
	        g.setColor(focus);
	        g.drawRect(0, 0, w-1, h-1);
	
	        g.setColor(highlight);   // inner 3D border
	        g.drawLine(1, 1, 1, h-3);
	        g.drawLine(2, 1, w-4, 1);
	
	        g.setColor(shadow);     
	        g.drawLine(2, h-3, w-3, h-3);
	        g.drawLine(w-3, 1, w-3, h-4);
	
	        g.setColor(darkShadow);        // black drop shadow  __|
	        g.drawLine(1, h-2, w-2, h-2);
	        g.drawLine(w-2, h-2, w-2, 1);
            } else {
	        g.setColor(highlight);    // inner 3D border
	        g.drawLine(1,1,1,h-3);
	        g.drawLine(2,1,w-4,1);
	        g.setColor(shadow);
                g.drawLine(2,h-3,w-3,h-3);
	        g.drawLine(w-3,1,w-3,h-4);
	
	        g.setColor(darkShadow);         // black drop shadow  __|
	        g.drawLine(1,h-2,w-2,h-2);
	        g.drawLine(w-2,h-2,w-2,0);
	
            }
            g.translate(-x, -y);
        }
        g.setColor(oldColor);