/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/* @test
*
* @bug 6608456
* @author Igor Kushnirskiy
* @summary tests if delegate RepaintManager gets invoked.
*/
public class bug6608456 {
new Callable<JComponent>() {
if ( ! registerDelegate(
button, new TestRepaintManager())) {
return null;
}
frame.setVisible(true);
return button;
}
});
throw new RuntimeException("failed. can not register delegate");
}
// trigger repaint for delegate RepaintManager
return null;
}
});
try {
// passed
}
} catch (Exception e) {
throw new RuntimeException("failed", e);
} finally {
}
}
}
if (RepaintManager.currentManager(c) == this) {
} else {
}
super.addDirtyRegion(c, x, y, w, h);
}
}
private volatile boolean defaultCalled = false;
private volatile boolean delegateCalled = false;
public TestFuture() {
return null;
}
});
}
public void defaultCalled() {
defaultCalled = true;
updateState();
}
public void delegateCalled() {
delegateCalled = true;
updateState();
}
private void updateState() {
if (defaultCalled && delegateCalled) {
}
}
}
boolean rv = false;
try {
JComponent.class, RepaintManager.class);
rv = true;
}
return rv;
}
}
while (p == null) {
try {
p = comp.getLocationOnScreen();
} catch (IllegalStateException e) {
try {
} catch (InterruptedException ie) {
}
}
}
}
}