53 |
import java.awt.Insets; |
import java.awt.Insets; |
54 |
import java.awt.Point; |
import java.awt.Point; |
55 |
import java.awt.Rectangle; |
import java.awt.Rectangle; |
56 |
|
import java.awt.Shape; |
57 |
import java.awt.Window; |
import java.awt.Window; |
58 |
import java.awt.dnd.DropTarget; |
import java.awt.dnd.DropTarget; |
59 |
import java.awt.event.ActionEvent; |
import java.awt.event.ActionEvent; |
65 |
import java.awt.event.KeyEvent; |
import java.awt.event.KeyEvent; |
66 |
import java.awt.event.MouseEvent; |
import java.awt.event.MouseEvent; |
67 |
import java.awt.geom.Rectangle2D; |
import java.awt.geom.Rectangle2D; |
|
import java.awt.image.ImageObserver; |
|
68 |
import java.awt.peer.LightweightPeer; |
import java.awt.peer.LightweightPeer; |
69 |
import java.beans.PropertyChangeEvent; |
import java.beans.PropertyChangeEvent; |
70 |
import java.beans.PropertyChangeListener; |
import java.beans.PropertyChangeListener; |
183 |
/** |
/** |
184 |
* An explicit value for the component's preferred size; if not set by a |
* An explicit value for the component's preferred size; if not set by a |
185 |
* user, this is calculated on the fly by delegating to the {@link |
* user, this is calculated on the fly by delegating to the {@link |
186 |
* ComponentUI.getPreferredSize} method on the {@link #ui} property. |
* ComponentUI#getPreferredSize} method on the {@link #ui} property. |
187 |
*/ |
*/ |
188 |
Dimension preferredSize; |
Dimension preferredSize; |
189 |
|
|
190 |
/** |
/** |
191 |
* An explicit value for the component's minimum size; if not set by a |
* An explicit value for the component's minimum size; if not set by a |
192 |
* user, this is calculated on the fly by delegating to the {@link |
* user, this is calculated on the fly by delegating to the {@link |
193 |
* ComponentUI.getMinimumSize} method on the {@link #ui} property. |
* ComponentUI#getMinimumSize} method on the {@link #ui} property. |
194 |
*/ |
*/ |
195 |
Dimension minimumSize; |
Dimension minimumSize; |
196 |
|
|
197 |
/** |
/** |
198 |
* An explicit value for the component's maximum size; if not set by a |
* An explicit value for the component's maximum size; if not set by a |
199 |
* user, this is calculated on the fly by delegating to the {@link |
* user, this is calculated on the fly by delegating to the {@link |
200 |
* ComponentUI.getMaximumSize} method on the {@link #ui} property. |
* ComponentUI#getMaximumSize} method on the {@link #ui} property. |
201 |
*/ |
*/ |
202 |
Dimension maximumSize; |
Dimension maximumSize; |
203 |
|
|
265 |
/** |
/** |
266 |
* A set of flags indicating which debugging graphics facilities should |
* A set of flags indicating which debugging graphics facilities should |
267 |
* be enabled on this component. The values should be a combination of |
* be enabled on this component. The values should be a combination of |
268 |
* {@link DebugGraphics.NONE_OPTION}, {@link DebugGraphics.LOG_OPTION}, |
* {@link DebugGraphics#NONE_OPTION}, {@link DebugGraphics#LOG_OPTION}, |
269 |
* {@link DebugGraphics.FLASH_OPTION}, or {@link |
* {@link DebugGraphics#FLASH_OPTION}, or {@link |
270 |
* DebugGraphics.BUFFERED_OPTION}. |
* DebugGraphics#BUFFERED_OPTION}. |
271 |
* |
* |
272 |
* @see setDebugGraphicsOptions |
* @see #setDebugGraphicsOptions |
273 |
* @see getDebugGraphicsOptions |
* @see #getDebugGraphicsOptions |
274 |
* @see DebugGraphics |
* @see DebugGraphics |
275 |
* @see getComponentGraphics |
* @see #getComponentGraphics |
276 |
*/ |
*/ |
277 |
int debugGraphicsOptions; |
int debugGraphicsOptions; |
278 |
|
|
335 |
* timed intervals, continuing off in the direction the mouse exited the |
* timed intervals, continuing off in the direction the mouse exited the |
336 |
* component, until the mouse is released or re-enters the component. |
* component, until the mouse is released or re-enters the component. |
337 |
* |
* |
338 |
* @see setAutoscrolls |
* @see #setAutoscrolls |
339 |
* @see getAutoscrolls |
* @see #getAutoscrolls |
340 |
*/ |
*/ |
341 |
boolean autoscrolls = false; |
boolean autoscrolls = false; |
342 |
|
|
1512 |
*/ |
*/ |
1513 |
protected void paintChildren(Graphics g) |
protected void paintChildren(Graphics g) |
1514 |
{ |
{ |
1515 |
|
Shape originalClip = g.getClip(); |
1516 |
|
Rectangle inner = SwingUtilities.calculateInnerArea(this, new Rectangle()); |
1517 |
|
g.clipRect(inner.x, inner.y, inner.width, inner.height); |
1518 |
Component[] children = getComponents(); |
Component[] children = getComponents(); |
1519 |
for (int i = children.length - 1; i >= 0; --i) |
for (int i = children.length - 1; i >= 0; --i) |
1520 |
{ |
{ |
1544 |
g.setClip(oldClip); |
g.setClip(oldClip); |
1545 |
} |
} |
1546 |
} |
} |
1547 |
|
g.setClip(originalClip); |
1548 |
} |
} |
1549 |
|
|
1550 |
/** |
/** |