1 package javax
.swing
.plaf
.basic
;
4 import javax
.swing
.plaf
.*;
10 public class BasicScrollPaneUI
extends ScrollPaneUI
15 public static ComponentUI
createUI(final JComponent c
)
17 return new BasicScrollPaneUI();
21 public void installUI(final JComponent c
)
27 public Dimension
getPreferredSize(JComponent c
)
29 JScrollPane p
= (JScrollPane
) c
;
31 Dimension d
= new Dimension(min_w
,
34 Dimension a
= p
.getViewport().getPreferredSize();
38 d
.width
= Math
.max(d
.width
, a
.width
);
39 d
.height
= Math
.max(d
.height
, a
.height
);
43 System
.out
.println("BasicScrollPaneUI->preff->"+d
);
47 public void paint(Graphics g
, JComponent c
)
49 System
.out
.println("BasicScrollPaneUI->paint()->"+c
);
51 JScrollPane p
= (JScrollPane
) c
;
52 p
.getViewport().paint(g
);