![]() |
||
![]() |
![]() Alden Hosting provides professional, efficient, and reliable business-class Web hosting services to small- and medium-sized businesses. |
|
|
JAVA, JSP, SERVLETS, TOMCAT, SERVLETS MANAGER, |
||||||||||||||||||||
// draw Line2D.Double g2.draw(new Line2D.Double(x1, y1, x2, y2)); |
|
This class includes several setLine() methods to define the endpoints of the line.
Aternatively, the endpoints of the line could be specified by using the constructor for the Line2D.Float class as follows:
Line2D.Float(float X1, float Y1, float X2, float Y2)Line2D.Float(Point2D p1, Point2D p2)Stroke object in the
Graphics2D class to define the stroke for the line path.
java.awt.geom package enables you to create a quadratic or cubic curve segment.
QuadCurve2D class implements the Shape interface.
This class represents a quadratic parametric curve segment in (x, y) coordinate space.
The QuadCurve2D.Float and QuadCurve2D.Double subclasses specify a quadratic curve
in float and double precision.
Several setCurve methods are used to specify two endpoints and a control point of the curve,
whose coordinates can be defined directly, by the coordinates of other points and by using a given array.
A very useful method, setCurve(QuadCurve2D c), sets the quadratic curve with
the same endpoints and the control point as a supplied curve. For example:
// create new QuadCurve2D.Float QuadCurve2D q = new QuadCurve2D.Float(); // draw QuadCurve2D.Float with set coordinates g2.draw(q.setCurve(x1, y1, ctrlx, ctrly, x2, y2)); |
![]() |
CubicCurve2D class also implements the
Shape interface.
This class represents a cubic parametric curve segment in (x, y) coordinate space.
CubicCurve2D.Float and CubicCurve2D.Double subclasses specify a cubic curve
in float and double precision.
The CubicCurve2D class has similar methods for setting the curve as the
QuadraticCurve2Dclass, except with a second control point. For example:
// create new CubicCurve2D.Double CubicCurve2D c = new CubicCurve2D.Double(); // draw CubicCurve2D.Double with set coordinates g2.draw(c.setCurve(x1, y1, ctrlx1, ctrly1, ctrlx2, ctrly2, x2, y2)); |
![]() |
Classes that specify primitives represented in the following example extend the RectangularShape class, which
implements the Shape interface and adds a few methods of its own.
These methods enables you to get information about a shape’s location and size, to examine the center point of a rectangle, and to set the bounds of the shape.
The
Rectangle2D class represents a rectangle defined by a location (x, y) and dimension (w x h).
The Rectangle2D.Float and Rectangle2D.Double subclasses specify a rectangle
in float and double precision. For example:
// draw Rectangle2D.Double
g2.draw(new Rectangle2D.Double(x, y,
rectwidth,
rectheight));
|
|
The
RoundRectangle2D class represents a rectangle with rounded
corners defined by a location (x, y), a dimension (w x h), and the width
and height of the corner arc. The RoundRectangle2D.Float and RoundRectangle2D.Double subclasses
specify a round rectangle in float and double precision.
The rounded rectangle is specified with following parameters:
RoundRectangle2D object, use the method
setRoundRect(double a, double y, double w, double h, double arcWidth, double arcHeight). For example:
// draw RoundRectangle2D.Double
g2.draw(new RoundRectangle2D.Double(x, y,
rectwidth,
rectheight,
10, 10));
|
|
Ellipse2d class represents an ellipse defined by a bounding rectangle.
The Ellipse2D.Float and Ellipse2D.Double subclasses
specify an ellipse in float and double precision.
Ellipse is fully defined by a location, a width and a height. For example:
// draw Ellipse2D.Double
g2.draw(new Ellipse2D.Double(x, y,
rectwidth,
rectheight));
|
|
Arc2D class. This class represents an arc defined
by a bounding rectangle, a start angle, an angular extent, and a closure type.
The Arc2D.Float and Arc2D.Double subclasses
specify an ellipse in float and double precision.
The Arc2D class defines the following three types of arcs,
represented by corresponding constants in this class: OPEN, PIE and CHORD.

Several methods set the size and parameters of the arc:
Point2D and Dimension2DArc2DsetArcByCenter method to specify an arc from a center point,
given by its coordinates and a radius.
// draw Arc2D.Double
g2.draw(new Arc2D.Double(x, y,
rectwidth,
rectheight,
90, 135,
Arc2D.OPEN));
|
![]() |
The
ShapesDemo2D.java code example contains implementations off all described
geometric primitives.
For more information about classes and methods represented in this section see the
java.awt.geom specification.
Alden Hosting offers private JVM (Java Virtual Machine), Java Server Pages (JSP), Servlets, and Servlets Manager with our Web Hosting Plans WEB 4 PLAN and WEB 5 PLAN , WEB 6 PLAN .
At Alden Hosting we eat and breathe Java! We are the industry leader in providing affordable, quality and efficient Java web hosting in the shared hosting marketplace. All our sites run on our Java hosing platform configured for optimum performance using Java 1.6, Tomcat 6, MySQL 5, Apache 2.2 and web application frameworks such as Struts, Hibernate, Cocoon, Ant, etc.
We offer only one type of Java hosting - Private Tomcat. Hosting accounts on the Private Tomcat environment get their very own Tomcat server. You can start and re-start your entire Tomcat server yourself.
![]() |
|
http://alden-servlet-Hosting.com
JSP at alden-servlet-Hosting.com
Servlets at alden-servlet-Hosting.com
Servlet at alden-servlet-Hosting.com
Tomcat at alden-servlet-Hosting.com
MySQL at alden-servlet-Hosting.com
Java at alden-servlet-Hosting.com
sFTP at alden-servlet-Hosting.com
http://alden-tomcat-Hosting.com
JSP at alden-tomcat-Hosting.com
Servlets at alden-tomcat-Hosting.com
Servlet at alden-tomcat-Hosting.com
Tomcat at alden-tomcat-Hosting.com
MySQL at alden-tomcat-Hosting.com
Java at alden-tomcat-Hosting.com
sFTP at alden-tomcat-Hosting.com
http://alden-sftp-Hosting.com
JSP at alden-sftp-Hosting.com
Servlets at alden-sftp-Hosting.com
Servlet at alden-sftp-Hosting.com
Tomcat at alden-sftp-Hosting.com
MySQL at alden-sftp-Hosting.com
Java at alden-sftp-Hosting.com
sFTP at alden-sftp-Hosting.com
http://alden-jsp-Hosting.com
JSP at alden-jsp-Hosting.com
Servlets at alden-jsp-Hosting.com
Servlet at alden-jsp-Hosting.com
Tomcat at alden-jsp-Hosting.com
MySQL at alden-jsp-Hosting.com
Java at alden-jsp-Hosting.com
sFTP at alden-jsp-Hosting.com
http://alden-java-Hosting.com
JSp at alden-java-Hosting.com
Servlets at alden-java-Hosting.com
Servlet at alden-java-Hosting.com
Tomcat at alden-java-Hosting.com
MySQL at alden-java-Hosting.com
Java at alden-java-Hosting.com
sFTP at alden-java-Hosting.com
JSP
Servlets
Tomcat
mysql
Java
JSP
Servlets
Tomcat
mysql
Java
JSP
Servlets
Tomcat
mysql
Java
JSP
Servlets
Tomcat
mysql
Java
JSP at JSP.aldenWEBhosting.com
Servlets at servlets.aldenWEBhosting.com
Tomcat at Tomcat.aldenWEBhosting.com
mysql at mysql.aldenWEBhosting.com
Java at Java.aldenWEBhosting.com
Web Hosts Portal
Web Links
Web Links
Web Hosting
JSP Solutions Web Links
JSP Solutions Web Hosting
Servlets Solutions Web Links
Servlets Solutions Web Hosting
Web Links
Web Links
.
.
.
.
.
.
.
.
.
.
jsp hosting
servlets hosting
web hosting
web sites designed
cheap web hosting
web site hosting
myspace web hosting