jcckit.graphic
Class ClippingRectangle

java.lang.Object
  extended byjcckit.graphic.ClippingRectangle
All Implemented Interfaces:
ClippingShape

public class ClippingRectangle
extends java.lang.Object
implements ClippingShape

Immutable class of a rectangular clipping area.

Author:
Franz-Josef Elmer

Constructor Summary
ClippingRectangle(double x1, double y1, double x2, double y2)
          Creates an instance for the specified coordinates of two opposite corner points.
 
Method Summary
 ClippingRectangle getBoundingBox()
          Returns this instance.
 BasicGraphicalElement getGraphicalElement()
          Returns a Rectangle.
 double getMaxX()
          Returns the maximum x value.
 double getMaxY()
          Returns the maximum y value.
 double getMinX()
          Returns the minimum x value.
 double getMinY()
          Returns the minimum y value.
 boolean isInside(GraphPoint point)
          Returns true if the specified point is inside this rectangle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClippingRectangle

public ClippingRectangle(double x1,
                         double y1,
                         double x2,
                         double y2)
Creates an instance for the specified coordinates of two opposite corner points.

Method Detail

isInside

public boolean isInside(GraphPoint point)
Returns true if the specified point is inside this rectangle.

Specified by:
isInside in interface ClippingShape

getMinX

public double getMinX()
Returns the minimum x value.


getMaxX

public double getMaxX()
Returns the maximum x value.


getMinY

public double getMinY()
Returns the minimum y value.


getMaxY

public double getMaxY()
Returns the maximum y value.


getBoundingBox

public ClippingRectangle getBoundingBox()
Returns this instance.

Specified by:
getBoundingBox in interface ClippingShape

getGraphicalElement

public BasicGraphicalElement getGraphicalElement()
Returns a Rectangle.

Specified by:
getGraphicalElement in interface ClippingShape