1 package javax
.swing
.plaf
;
4 import javax
.swing
.border
.*;
7 import javax
.accessibility
.*;
9 public abstract class ComponentUI
10 implements UIResource
// ??
12 boolean contains(JComponent c
, int x
, int y
)
17 // this SHOULD thow an error:
18 public static ComponentUI
createUI(JComponent c
)
20 Exception e
= new Exception("createUI from ComponentUI should never be called");
26 public Accessible
getAccessibleChild(JComponent c
, int i
)
28 //Return the nth Accessible child of the object.
32 public int getAccessibleChildrenCount(JComponent c
)
34 //Returns the number of accessible children in the object.
38 public Dimension
getMaximumSize(JComponent c
)
40 return getPreferredSize(c
);
43 public Dimension
getMinimumSize(JComponent c
)
45 return getPreferredSize(c
);
48 public Dimension
getPreferredSize(JComponent c
)
53 public void installUI(JComponent c
)
55 String id
= c
.getUIClassID() + ".border";
57 Border s
= UIManager
.getBorder( id
);
62 //System.out.println("OK-INSTALL: " + this + ", ID=" + id + ",B="+s);
66 ///System.out.println("FAIL-INSTALL: " + this + ", " + id);
70 public void paint(Graphics g
, JComponent c
)
72 // System.out.println("UI-COMPONENT-> unimplemented paint: " + c + ", UI="+this);
75 public void uninstallUI(JComponent c
)
79 public void update(Graphics g
, JComponent c
) {
81 g
.setColor(c
.getBackground());
82 g
.fillRect(0, 0, c
.getWidth(),c
.getHeight());