equal
deleted
inserted
replaced
97 } |
97 } |
98 context.setStyle(newStyle); |
98 context.setStyle(newStyle); |
99 newStyle.installDefaults(context); |
99 newStyle.installDefaults(context); |
100 } |
100 } |
101 this.style = newStyle; |
101 this.style = newStyle; |
102 context.dispose(); |
|
103 } |
102 } |
104 |
103 |
105 /** |
104 /** |
106 * Installs listeners into the viewport. |
105 * Installs listeners into the viewport. |
107 * |
106 * |
126 * @param c a {@code JViewport} object |
125 * @param c a {@code JViewport} object |
127 */ |
126 */ |
128 protected void uninstallDefaults(JComponent c) { |
127 protected void uninstallDefaults(JComponent c) { |
129 SynthContext context = getContext(c, ENABLED); |
128 SynthContext context = getContext(c, ENABLED); |
130 style.uninstallDefaults(context); |
129 style.uninstallDefaults(context); |
131 context.dispose(); |
|
132 style = null; |
130 style = null; |
133 } |
131 } |
134 |
132 |
135 /** |
133 /** |
136 * {@inheritDoc} |
134 * {@inheritDoc} |
166 |
164 |
167 SynthLookAndFeel.update(context, g); |
165 SynthLookAndFeel.update(context, g); |
168 context.getPainter().paintViewportBackground(context, |
166 context.getPainter().paintViewportBackground(context, |
169 g, 0, 0, c.getWidth(), c.getHeight()); |
167 g, 0, 0, c.getWidth(), c.getHeight()); |
170 paint(context, g); |
168 paint(context, g); |
171 context.dispose(); |
|
172 } |
169 } |
173 |
170 |
174 /** |
171 /** |
175 * Paints the border. The method is never called, |
172 * Paints the border. The method is never called, |
176 * because the {@code JViewport} class does not support a border. |
173 * because the {@code JViewport} class does not support a border. |
200 @Override |
197 @Override |
201 public void paint(Graphics g, JComponent c) { |
198 public void paint(Graphics g, JComponent c) { |
202 SynthContext context = getContext(c); |
199 SynthContext context = getContext(c); |
203 |
200 |
204 paint(context, g); |
201 paint(context, g); |
205 context.dispose(); |
|
206 } |
202 } |
207 |
203 |
208 /** |
204 /** |
209 * Paints the specified component. This implementation does nothing. |
205 * Paints the specified component. This implementation does nothing. |
210 * |
206 * |