Synth's ScrollPaneUI.
| Method from javax.swing.plaf.synth.SynthScrollPaneUI Detail: |
public static ComponentUI createUI(JComponent x) {
return new SynthScrollPaneUI();
}
|
public SynthContext getContext(JComponent c) {
return getContext(c, getComponentState(c));
}
|
protected void installDefaults(JScrollPane scrollpane) {
updateStyle(scrollpane);
}
|
protected void installListeners(JScrollPane c) {
super.installListeners(c);
c.addPropertyChangeListener(this);
}
|
public void paint(Graphics g,
JComponent c) {
SynthContext context = getContext(c);
paint(context, g);
context.dispose();
}
|
protected void paint(SynthContext context,
Graphics g) {
Border vpBorder = scrollpane.getViewportBorder();
if (vpBorder != null) {
Rectangle r = scrollpane.getViewportBorderBounds();
vpBorder.paintBorder(scrollpane, g, r.x, r.y, r.width, r.height);
}
}
|
public void paintBorder(SynthContext context,
Graphics g,
int x,
int y,
int w,
int h) {
context.getPainter().paintScrollPaneBorder(context, g, x, y, w, h);
}
|
public void propertyChange(PropertyChangeEvent e) {
if (SynthLookAndFeel.shouldUpdateStyle(e)) {
updateStyle(scrollpane);
}
}
|
protected void uninstallDefaults(JScrollPane c) {
SynthContext context = getContext(c, ENABLED);
style.uninstallDefaults(context);
context.dispose();
if (scrollpane.getViewportBorder() instanceof UIResource) {
scrollpane.setViewportBorder(null);
}
}
|
protected void uninstallListeners(JComponent c) {
super.uninstallListeners(c);
c.removePropertyChangeListener(this);
}
|
public void update(Graphics g,
JComponent c) {
SynthContext context = getContext(c);
SynthLookAndFeel.update(context, g);
context.getPainter().paintScrollPaneBackground(context,
g, 0, 0, c.getWidth(), c.getHeight());
paint(context, g);
context.dispose();
}
|