This fixes a Mauve tests. Besides that it hasn't much impact as these
methods aren't used in Swing itself.
2006-07-26 Roman Kennke <[EMAIL PROTECTED]>
* javax/swing/RepaintManager.java
(markCompletelyDirty): Add dirty region with Integer.MAX_VALUE
for the component.
(isCompletelyDirty): Consider a component completely dirty
when it has a dirty region with Integer.MAX_VALUE.
/Roman
Index: javax/swing/RepaintManager.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/RepaintManager.java,v
retrieving revision 1.42
diff -u -1 -2 -r1.42 RepaintManager.java
--- javax/swing/RepaintManager.java 19 Jul 2006 19:37:18 -0000 1.42
+++ javax/swing/RepaintManager.java 26 Jul 2006 21:14:28 -0000
@@ -453,26 +453,25 @@
* Mark a component as dirty over its entire bounds.
*
* @param component The component to mark as dirty
*
* @see #dirtyComponents
* @see #addDirtyRegion
* @see #getDirtyRegion
* @see #isCompletelyDirty
* @see #markCompletelyClean
*/
public void markCompletelyDirty(JComponent component)
{
- Rectangle r = component.getBounds();
- addDirtyRegion(component, 0, 0, r.width, r.height);
+ addDirtyRegion(component, 0, 0, Integer.MAX_VALUE, Integer.MAX_VALUE);
}
/**
* Remove all dirty regions for a specified component
*
* @param component The component to mark as clean
*
* @see #dirtyComponents
* @see #addDirtyRegion
* @see #getDirtyRegion
* @see #isCompletelyDirty
* @see #markCompletelyDirty
@@ -492,31 +491,29 @@
* @param component The component to check for complete dirtyness
*
* @return Whether the component is completely dirty
*
* @see #dirtyComponents
* @see #addDirtyRegion
* @see #getDirtyRegion
* @see #isCompletelyDirty
* @see #markCompletelyClean
*/
public boolean isCompletelyDirty(JComponent component)
{
- boolean retVal = false;
- if (dirtyComponents.containsKey(component))
- {
- Rectangle dirtyRegion = (Rectangle) dirtyComponents.get(component);
- retVal = dirtyRegion.equals(SwingUtilities.getLocalBounds(component));
- }
- return retVal;
+ boolean dirty = false;
+ Rectangle r = getDirtyRegion(component);
+ if(r.width == Integer.MAX_VALUE && r.height == Integer.MAX_VALUE)
+ dirty = true;
+ return dirty;
}
/**
* Validate all components which have been marked invalid in the [EMAIL PROTECTED]
* #invalidComponents} vector.
*/
public void validateInvalidComponents()
{
// We don't use an iterator here because that would fail when there are
// components invalidated during the validation of others, which happens
// quite frequently. Instead we synchronize the access a little more.
while (invalidComponents.size() > 0)