src/share/classes/java/awt/BasicStroke.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -25,11 +25,11 @@
package java.awt;
import java.beans.ConstructorProperties;
-import javax.tools.annotation.GenerateNativeHeader;
+import java.lang.annotation.Native;
/**
* The <code>BasicStroke</code> class defines a basic set of rendering
* attributes for the outlines of graphics primitives, which are rendered
* with a {@link Graphics2D} object that has its Stroke attribute set to
@@ -109,51 +109,49 @@
* For more information on the user space coordinate system and the
* rendering process, see the <code>Graphics2D</code> class comments.
* @see Graphics2D
* @author Jim Graham
*/
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
public class BasicStroke implements Stroke {
/**
* Joins path segments by extending their outside edges until
* they meet.
*/
- public final static int JOIN_MITER = 0;
+ @Native public final static int JOIN_MITER = 0;
/**
* Joins path segments by rounding off the corner at a radius
* of half the line width.
*/
- public final static int JOIN_ROUND = 1;
+ @Native public final static int JOIN_ROUND = 1;
/**
* Joins path segments by connecting the outer corners of their
* wide outlines with a straight segment.
*/
- public final static int JOIN_BEVEL = 2;
+ @Native public final static int JOIN_BEVEL = 2;
/**
* Ends unclosed subpaths and dash segments with no added
* decoration.
*/
- public final static int CAP_BUTT = 0;
+ @Native public final static int CAP_BUTT = 0;
/**
* Ends unclosed subpaths and dash segments with a round
* decoration that has a radius equal to half of the width
* of the pen.
*/
- public final static int CAP_ROUND = 1;
+ @Native public final static int CAP_ROUND = 1;
/**
* Ends unclosed subpaths and dash segments with a square
* projection that extends beyond the end of the segment
* to a distance equal to half of the line width.
*/
- public final static int CAP_SQUARE = 2;
+ @Native public final static int CAP_SQUARE = 2;
float width;
int join;
int cap;