Java Doc for RectangularShape.java in  » 6.0-JDK-Core » AWT » java » awt » geom » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Home
Java Source Code / Java Documentation
1.6.0 JDK Core
2.6.0 JDK Modules
3.6.0 JDK Modules com.sun
4.6.0 JDK Modules com.sun.java
5.6.0 JDK Modules sun
6.6.0 JDK Platform
7.Ajax
8.Apache Harmony Java SE
9.Aspect oriented
10.Authentication Authorization
11.Blogger System
12.Build
13.Byte Code
14.Cache
15.Chart
16.Chat
17.Code Analyzer
18.Collaboration
19.Content Management System
20.Database Client
21.Database DBMS
22.Database JDBC Connection Pool
23.Database ORM
24.Development
25.EJB Server
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » AWT » java.awt.geom 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.awt.geom.RectangularShape

All known Subclasses:   java.awt.geom.RoundRectangle2D,  java.awt.geom.Rectangle2D,  java.awt.geom.Ellipse2D,  java.awt.geom.Arc2D,
RectangularShape
abstract public class RectangularShape implements Shape,Cloneable(Code)
RectangularShape is the base class for a number of Shape objects whose geometry is defined by a rectangular frame. This class does not directly specify any specific geometry by itself, but merely provides manipulation methods inherited by a whole category of Shape objects. The manipulation methods provided by this class can be used to query and modify the rectangular frame, which provides a reference for the subclasses to define their geometry.
version:
   1.26, 05/05/07
author:
   Jim Graham
since:
   1.2



Constructor Summary
protected  RectangularShape()
     This is an abstract class that cannot be instantiated directly.

Method Summary
public  Objectclone()
     Creates a new object of the same class and with the same contents as this object.
public  booleancontains(Point2D p)
    
public  booleancontains(Rectangle2D r)
    
public  RectanglegetBounds()
    
public  doublegetCenterX()
     Returns the X coordinate of the center of the framing rectangle of the Shape in double precision.
public  doublegetCenterY()
     Returns the Y coordinate of the center of the framing rectangle of the Shape in double precision.
public  Rectangle2DgetFrame()
     Returns the framing Rectangle2D that defines the overall shape of this object.
abstract public  doublegetHeight()
     Returns the height of the framing rectangle in double precision.
public  doublegetMaxX()
     Returns the largest X coordinate of the framing rectangle of the Shape in double precision.
public  doublegetMaxY()
     Returns the largest Y coordinate of the framing rectangle of the Shape in double precision.
public  doublegetMinX()
     Returns the smallest X coordinate of the framing rectangle of the Shape in double precision.
public  doublegetMinY()
     Returns the smallest Y coordinate of the framing rectangle of the Shape in double precision.
public  PathIteratorgetPathIterator(AffineTransform at, double flatness)
     Returns an iterator object that iterates along the Shape object's boundary and provides access to a flattened view of the outline of the Shape object's geometry.
abstract public  doublegetWidth()
     Returns the width of the framing rectangle in double precision.
abstract public  doublegetX()
     Returns the X coordinate of the upper-left corner of the framing rectangle in double precision.
abstract public  doublegetY()
     Returns the Y coordinate of the upper-left corner of the framing rectangle in double precision.
public  booleanintersects(Rectangle2D r)
    
abstract public  booleanisEmpty()
     Determines whether the RectangularShape is empty.
abstract public  voidsetFrame(double x, double y, double w, double h)
     Sets the location and size of the framing rectangle of this Shape to the specified rectangular values.
public  voidsetFrame(Point2D loc, Dimension2D size)
     Sets the location and size of the framing rectangle of this Shape to the specified Point2D and Dimension2D , respectively.
public  voidsetFrame(Rectangle2D r)
     Sets the framing rectangle of this Shape to be the specified Rectangle2D.
public  voidsetFrameFromCenter(double centerX, double centerY, double cornerX, double cornerY)
     Sets the framing rectangle of this Shape based on the specified center point coordinates and corner point coordinates.
public  voidsetFrameFromCenter(Point2D center, Point2D corner)
     Sets the framing rectangle of this Shape based on a specified center Point2D and corner Point2D.
public  voidsetFrameFromDiagonal(double x1, double y1, double x2, double y2)
     Sets the diagonal of the framing rectangle of this Shape based on the two specified coordinates.
public  voidsetFrameFromDiagonal(Point2D p1, Point2D p2)
     Sets the diagonal of the framing rectangle of this Shape based on two specified Point2D objects.


Constructor Detail
RectangularShape
protected RectangularShape()(Code)
This is an abstract class that cannot be instantiated directly.
See Also:   Arc2D
See Also:   Ellipse2D
See Also:   Rectangle2D
See Also:   RoundRectangle2D
since:
   1.2




Method Detail
clone
public Object clone()(Code)
Creates a new object of the same class and with the same contents as this object. a clone of this instance.
exception:
  OutOfMemoryError - if there is not enough memory.
See Also:   java.lang.Cloneable
since:
   1.2



contains
public boolean contains(Point2D p)(Code)

since:
   1.2



contains
public boolean contains(Rectangle2D r)(Code)

since:
   1.2



getBounds
public Rectangle getBounds()(Code)

since:
   1.2



getCenterX
public double getCenterX()(Code)
Returns the X coordinate of the center of the framing rectangle of the Shape in double precision. the X coordinate of the center of the framing rectangle of the Shape.
since:
   1.2



getCenterY
public double getCenterY()(Code)
Returns the Y coordinate of the center of the framing rectangle of the Shape in double precision. the Y coordinate of the center of the framing rectangle of the Shape.
since:
   1.2



getFrame
public Rectangle2D getFrame()(Code)
Returns the framing Rectangle2D that defines the overall shape of this object. a Rectangle2D, specified indouble coordinates.
See Also:   RectangularShape.setFrame(double,double,double,double)
See Also:   RectangularShape.setFrame(Point2D,Dimension2D)
See Also:   RectangularShape.setFrame(Rectangle2D)
since:
   1.2



getHeight
abstract public double getHeight()(Code)
Returns the height of the framing rectangle in double precision. the height of the framing rectangle.
since:
   1.2



getMaxX
public double getMaxX()(Code)
Returns the largest X coordinate of the framing rectangle of the Shape in double precision. the largest X coordinate of the framingrectangle of the Shape.
since:
   1.2



getMaxY
public double getMaxY()(Code)
Returns the largest Y coordinate of the framing rectangle of the Shape in double precision. the largest Y coordinate of the framing rectangle of the Shape.
since:
   1.2



getMinX
public double getMinX()(Code)
Returns the smallest X coordinate of the framing rectangle of the Shape in double precision. the smallest X coordinate of the framing rectangle of the Shape.
since:
   1.2



getMinY
public double getMinY()(Code)
Returns the smallest Y coordinate of the framing rectangle of the Shape in double precision. the smallest Y coordinate of the framing rectangle of the Shape.
since:
   1.2



getPathIterator
public PathIterator getPathIterator(AffineTransform at, double flatness)(Code)
Returns an iterator object that iterates along the Shape object's boundary and provides access to a flattened view of the outline of the Shape object's geometry.

Only SEG_MOVETO, SEG_LINETO, and SEG_CLOSE point types will be returned by the iterator.

The amount of subdivision of the curved segments is controlled by the flatness parameter, which specifies the maximum distance that any point on the unflattened transformed curve can deviate from the returned flattened path segments. An optional AffineTransform can be specified so that the coordinates returned in the iteration are transformed accordingly.
Parameters:
  at - an optional AffineTransform to be applied to thecoordinates as they are returned in the iteration, or null if untransformed coordinates are desired.
Parameters:
  flatness - the maximum distance that the line segments used toapproximate the curved segments are allowed to deviatefrom any point on the original curve a PathIterator object that provides access to the Shape object's flattened geometry.
since:
   1.2




getWidth
abstract public double getWidth()(Code)
Returns the width of the framing rectangle in double precision. the width of the framing rectangle.
since:
   1.2



getX
abstract public double getX()(Code)
Returns the X coordinate of the upper-left corner of the framing rectangle in double precision. the X coordinate of the upper-left corner ofthe framing rectangle.
since:
   1.2



getY
abstract public double getY()(Code)
Returns the Y coordinate of the upper-left corner of the framing rectangle in double precision. the Y coordinate of the upper-left corner ofthe framing rectangle.
since:
   1.2



intersects
public boolean intersects(Rectangle2D r)(Code)

since:
   1.2



isEmpty
abstract public boolean isEmpty()(Code)
Determines whether the RectangularShape is empty. When the RectangularShape is empty, it encloses no area. true if the RectangularShape is empty; false otherwise.
since:
   1.2



setFrame
abstract public void setFrame(double x, double y, double w, double h)(Code)
Sets the location and size of the framing rectangle of this Shape to the specified rectangular values.
Parameters:
  x - the X coordinate of the upper-left corner of thespecified rectangular shape
Parameters:
  y - the Y coordinate of the upper-left corner of thespecified rectangular shape
Parameters:
  w - the width of the specified rectangular shape
Parameters:
  h - the height of the specified rectangular shape
See Also:   RectangularShape.getFrame
since:
   1.2



setFrame
public void setFrame(Point2D loc, Dimension2D size)(Code)
Sets the location and size of the framing rectangle of this Shape to the specified Point2D and Dimension2D , respectively. The framing rectangle is used by the subclasses of RectangularShape to define their geometry.
Parameters:
  loc - the specified Point2D
Parameters:
  size - the specified Dimension2D
See Also:   RectangularShape.getFrame
since:
   1.2



setFrame
public void setFrame(Rectangle2D r)(Code)
Sets the framing rectangle of this Shape to be the specified Rectangle2D. The framing rectangle is used by the subclasses of RectangularShape to define their geometry.
Parameters:
  r - the specified Rectangle2D
See Also:   RectangularShape.getFrame
since:
   1.2



setFrameFromCenter
public void setFrameFromCenter(double centerX, double centerY, double cornerX, double cornerY)(Code)
Sets the framing rectangle of this Shape based on the specified center point coordinates and corner point coordinates. The framing rectangle is used by the subclasses of RectangularShape to define their geometry.
Parameters:
  centerX - the X coordinate of the specified center point
Parameters:
  centerY - the Y coordinate of the specified center point
Parameters:
  cornerX - the X coordinate of the specified corner point
Parameters:
  cornerY - the Y coordinate of the specified corner point
since:
   1.2



setFrameFromCenter
public void setFrameFromCenter(Point2D center, Point2D corner)(Code)
Sets the framing rectangle of this Shape based on a specified center Point2D and corner Point2D. The framing rectangle is used by the subclasses of RectangularShape to define their geometry.
Parameters:
  center - the specified center Point2D
Parameters:
  corner - the specified corner Point2D
since:
   1.2



setFrameFromDiagonal
public void setFrameFromDiagonal(double x1, double y1, double x2, double y2)(Code)
Sets the diagonal of the framing rectangle of this Shape based on the two specified coordinates. The framing rectangle is used by the subclasses of RectangularShape to define their geometry.
Parameters:
  x1 - the X coordinate of the start point of the specified diagonal
Parameters:
  y1 - the Y coordinate of the start point of the specified diagonal
Parameters:
  x2 - the X coordinate of the end point of the specified diagonal
Parameters:
  y2 - the Y coordinate of the end point of the specified diagonal
since:
   1.2



setFrameFromDiagonal
public void setFrameFromDiagonal(Point2D p1, Point2D p2)(Code)
Sets the diagonal of the framing rectangle of this Shape based on two specified Point2D objects. The framing rectangle is used by the subclasses of RectangularShape to define their geometry.
Parameters:
  p1 - the start Point2D of the specified diagonal
Parameters:
  p2 - the end Point2D of the specified diagonal
since:
   1.2



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.