/[classpath]/classpath/javax/swing/plaf/ComponentUI.java
ViewVC logotype

Diff of /classpath/javax/swing/plaf/ComponentUI.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by rveldema, Mon Mar 11 15:48:06 2002 UTC revision 1.2 by rveldema, Tue Mar 12 11:36:23 2002 UTC
# Line 5  import javax.swing.border.*; Line 5  import javax.swing.border.*;
5  import javax.swing.*;  import javax.swing.*;
6    
7    
8  public abstract class ComponentUI  public abstract class ComponentUI
9        implements UIResource // ??
10  {  {
11      boolean contains(JComponent c, int x, int y)      boolean contains(JComponent c, int x, int y)
12      {      {
# Line 13  public abstract class ComponentUI Line 14  public abstract class ComponentUI
14      }      }
15    
16      // this SHOULD thow an error:      // this SHOULD thow an error:
17      static ComponentUI createUI(JComponent c)      public static ComponentUI createUI(JComponent c)
18      {      {
19          Exception e = new Exception("createUI from ComponentUI should never be called");          Exception e = new Exception("createUI from ComponentUI should never be called");
20          e.printStackTrace();          e.printStackTrace();
# Line 21  public abstract class ComponentUI Line 22  public abstract class ComponentUI
22          return null;          return null;
23      }      }
24    
25      Accessible getAccessibleChild(JComponent c, int i)      public Accessible getAccessibleChild(JComponent c, int i)
26      {      {
27          //Return the nth Accessible child of the object.          //Return the nth Accessible child of the object.
28          return null;          return null;
29      }      }
30        
31      int getAccessibleChildrenCount(JComponent c)      public int getAccessibleChildrenCount(JComponent c)
32      {      {
33          //Returns the number of accessible children in the object.          //Returns the number of accessible children in the object.
34          return 0;          return 0;
35      }      }
36        
37      Dimension getMaximumSize(JComponent c)      public Dimension getMaximumSize(JComponent c)
38      {      {
39          return getPreferredSize(c);          return getPreferredSize(c);
40      }      }
41    
42      Dimension getMinimumSize(JComponent c)      public Dimension getMinimumSize(JComponent c)
43      {      {
44          return getPreferredSize(c);          return getPreferredSize(c);
45      }      }
46    
47      Dimension getPreferredSize(JComponent c)      public Dimension getPreferredSize(JComponent c)
48      {      {
49          return null;          return null;
50      }      }
51    
52      void installUI(JComponent c)      public void installUI(JComponent c)
53      {      {
54          String id = c.getUIClassID() + ".border";          String id = c.getUIClassID() + ".border";
55    
# Line 65  public abstract class ComponentUI Line 66  public abstract class ComponentUI
66              }                }  
67      }      }
68    
69      void paint(Graphics g, JComponent c)      public void paint(Graphics g, JComponent c)
70      {      {
71          //  System.out.println("UI-COMPONENT-> unimplemented paint: " + c + ", UI="+this);          //  System.out.println("UI-COMPONENT-> unimplemented paint: " + c + ", UI="+this);
72      }      }
73    
74      void uninstallUI(JComponent c)      public void uninstallUI(JComponent c)
75      {        {  
76      }      }
77    
78      void update(Graphics g, JComponent c) {      public void update(Graphics g, JComponent c) {
79          if (c.isOpaque()) {          if (c.isOpaque()) {
80              g.setColor(c.getBackground());              g.setColor(c.getBackground());
81              g.fillRect(0, 0, c.getWidth(),c.getHeight());              g.fillRect(0, 0, c.getWidth(),c.getHeight());

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26