diff options
author | mark <mark@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-11-15 23:20:01 +0000 |
---|---|---|
committer | mark <mark@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-11-15 23:20:01 +0000 |
commit | 3b3101d8b5ae4f08a16c0b7111da6cad41bbd282 (patch) | |
tree | a5eb7cf42a51869cc8aa1fad7ad6a90cca47fdd8 /libjava/classpath/javax/swing/border/LineBorder.java | |
parent | 7e55c49d7d91ef9f09e93c1100119b1ab3652446 (diff) | |
download | ppe42-gcc-3b3101d8b5ae4f08a16c0b7111da6cad41bbd282.tar.gz ppe42-gcc-3b3101d8b5ae4f08a16c0b7111da6cad41bbd282.zip |
Imported GNU Classpath 0.19 + gcj-import-20051115.
* sources.am: Regenerated.
* Makefile.in: Likewise.
* scripts/makemake.tcl: Use glob -nocomplain.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@107049 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/classpath/javax/swing/border/LineBorder.java')
-rw-r--r-- | libjava/classpath/javax/swing/border/LineBorder.java | 44 |
1 files changed, 20 insertions, 24 deletions
diff --git a/libjava/classpath/javax/swing/border/LineBorder.java b/libjava/classpath/javax/swing/border/LineBorder.java index c34e38c5789..36abddd915d 100644 --- a/libjava/classpath/javax/swing/border/LineBorder.java +++ b/libjava/classpath/javax/swing/border/LineBorder.java @@ -50,8 +50,7 @@ import java.awt.Insets; * * @author Sascha Brawer (brawer@dandelis.ch) */ -public class LineBorder - extends AbstractBorder +public class LineBorder extends AbstractBorder { /** * Determined using the <code>serialver</code> tool @@ -71,7 +70,7 @@ public class LineBorder /** * A shared instance of a gray, one pixel thick, plain LineBorder. * The singleton object is lazily created by {@link - * #createBlackGrayBorder()} upon its first invocation. + * #createGrayLineBorder()} upon its first invocation. */ private static LineBorder grayLineBorder; @@ -213,29 +212,27 @@ public class LineBorder { g.setColor(lineColor); - /* If width and height were not adjusted, the border would - * appear one pixel too large in both directions. - */ + // If width and height were not adjusted, the border would + // appear one pixel too large in both directions. width -= 1; height -= 1; - /* Blurred, too large appearance - * ----------------------------- - * While Java 2D has introduced line strokes of arbitrary width, - * it seems desirable to keep this code independent of Java 2D. - * Therefore, multiple nested rectangles (or rounded rectangles) - * are drawn in order to simulate a line whose thickness is - * greater than one pixel. - * - * This hack causes a blurred appearance when anti-aliasing is - * on. Interestingly enough, though, the Sun JDK 1.3.1 (at least - * on MacOS X 10.1.5) shows exactly the same appearance under - * this condition. It thus seems likely that Sun does the same - * hack for simulating thick lines. For this reason, the - * blurred appearance seems acceptable -- especially since GNU - * Classpath tries to be compatible with the Sun reference - * implementation. - */ + // Blurred, too large appearance + // ----------------------------- + // While Java 2D has introduced line strokes of arbitrary width, + // it seems desirable to keep this code independent of Java 2D. + // Therefore, multiple nested rectangles (or rounded rectangles) + // are drawn in order to simulate a line whose thickness is + // greater than one pixel. + // + // This hack causes a blurred appearance when anti-aliasing is + // on. Interestingly enough, though, the Sun JDK 1.3.1 (at least + // on MacOS X 10.1.5) shows exactly the same appearance under + // this condition. It thus seems likely that Sun does the same + // hack for simulating thick lines. For this reason, the + // blurred appearance seems acceptable -- especially since GNU + // Classpath tries to be compatible with the Sun reference + // implementation. for (int i = 0; i < thickness; i++) { if (roundedCorners) @@ -340,4 +337,3 @@ public class LineBorder return (!roundedCorners) && (lineColor.getAlpha() == 255); } } - |