Home » openjdk-7 » javax » swing » plaf » basic » [javadoc | source]

    1   package javax.swing.plaf.basic;
    2   
    3   import javax.swing;
    4   import java.awt;
    5   import javax.swing.border;
    6   
    7   class BasicBorder extends MatteBorder
    8   {
    9       static Color BtnPointClr = new Color( 180, 180, 180);
   10   
   11   	BasicBorder()
   12   	{
   13   	    super(5,5,5,5, null);
   14   	}
   15   	
   16   	public void paintBorder(Component  c,
   17   				Graphics  g, 
   18   				int  x, 
   19   				int  y, 
   20   				int  width, 
   21   				int  height)
   22   	{
   23   	    //    System.out.println("PAINT-------------------------------------------BORDER");
   24   
   25   	    if (g != null)
   26   		{
   27   		    g.setColor( BtnPointClr);
   28   		    g.draw3DRect( 0, 0, width-1, height-1, true);
   29   		}
   30   	}
   31    }
   32   
   33   class PanelBorder extends MatteBorder
   34   {
   35       PanelBorder()
   36       {
   37   	super(5,5,5,5, null);
   38   	}
   39   	
   40   	public void paintBorder(Component  c,
   41   				Graphics  g, 
   42   				int  x, 
   43   				int  y, 
   44   				int  width, 
   45   				int  height)
   46   	{
   47   	    //    System.out.println("PAINT-------------------------------------------BORDER");
   48   	    super.paintBorder(c, g, x, y, width, height);
   49   	}
   50    }
   51   
   52   public class BasicDefaults extends UIDefaults
   53   {
   54       public BasicDefaults()
   55       {
   56   	//	System.out.println("BasicDefaults !!!!!!!!!!!!!!!!!!!!!!!!!");
   57   	put("JButton", new BasicButtonUI());
   58   	put("JLabel",  new BasicLabelUI());
   59   	
   60   	put("JPanel",  new BasicPanelUI());
   61   	put("JCheckBox",  new BasicCheckBoxUI());
   62   	put("JRadioButton",  new BasicRadioButtonUI());
   63   	put("JToggleButton",  new BasicToggleButtonUI());
   64   	put("JOptionPane",  new BasicOptionPaneUI());
   65   	put("JList",  new BasicListUI());
   66   	put("JTree",  new BasicTreeUI());
   67   	put("JTextComponent",  new BasicTextUI());
   68   	put("JTabbedPane",  new BasicTabbedPaneUI());
   69   	put("JScrollPane", new BasicScrollPaneUI());
   70   	put("JViewport",   new BasicViewportUI());
   71   
   72   	put("JButton.border",      new BasicBorder());
   73   	put("JPanel.border",       new PanelBorder());
   74   
   75   	put("JToggleButton.border", new PanelBorder());
   76   	put("JCheckBox.border", new PanelBorder());
   77   	put("JRadioButton.border", new PanelBorder());
   78       }
   79       
   80   }
   81   
   82   

Home » openjdk-7 » javax » swing » plaf » basic » [javadoc | source]