mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-25 15:20:11 +00:00
8345618: javax/swing/text/Caret/8163124/CaretFloatingPointAPITest.java leaves Caret is not complete
Reviewed-by: azvegint
This commit is contained in:
parent
3ab521e1a1
commit
15e06b6186
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -222,11 +222,11 @@ public class CaretFloatingPointAPITest {
|
||||
|
||||
Graphics2D g2d = (Graphics2D) g;
|
||||
g2d.draw(new Line2D.Float(c, cy, c, cy + ch));
|
||||
g2d.draw(new Line2D.Float(cx, cy, cx + cw, cy));
|
||||
g2d.draw(new Line2D.Float(cx, cy + ch, cx + cw, cy + ch));
|
||||
}
|
||||
|
||||
void repaint(Rectangle r) {
|
||||
r.width += 1;
|
||||
r.height += 1;
|
||||
component.repaint(r);
|
||||
}
|
||||
|
||||
@ -424,6 +424,8 @@ public class CaretFloatingPointAPITest {
|
||||
|
||||
protected synchronized void damage(Rectangle r) {
|
||||
if (r != null && component != null) {
|
||||
r.width += 1;
|
||||
r.height += 1;
|
||||
component.repaint(r);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user