javax.swing.text.html
Class Map.RectangleRegionContainment

java.lang.Object
  extended byjavax.swing.text.html.Map.RectangleRegionContainment
All Implemented Interfaces:
Map.RegionContainment
Enclosing class:
Map

static class Map.RectangleRegionContainment
extends Object
implements Map.RegionContainment

Used to test for containment in a rectangular region.


Field Summary
(package private)  int lastHeight
          Last value of height passed in.
(package private)  int lastWidth
          Last value of width passed in.
(package private)  float[] percents
          Will be non-null if one of the values is a percent, and any value that is non null indicates it is a percent (order is x, y, width, height).
(package private)  int x0
          Top left.
(package private)  int x1
          Bottom right.
(package private)  int y0
           
(package private)  int y1
           
 
Constructor Summary
Map.RectangleRegionContainment(AttributeSet as)
           
 
Method Summary
 boolean contains(int x, int y)
           
 boolean contains(int x, int y, int width, int height)
          Returns true if the location x, y falls inside the region defined in the receiver.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

percents

float[] percents
Will be non-null if one of the values is a percent, and any value that is non null indicates it is a percent (order is x, y, width, height).


lastWidth

int lastWidth
Last value of width passed in.


lastHeight

int lastHeight
Last value of height passed in.


x0

int x0
Top left.


y0

int y0

x1

int x1
Bottom right.


y1

int y1
Constructor Detail

Map.RectangleRegionContainment

public Map.RectangleRegionContainment(AttributeSet as)
Method Detail

contains

public boolean contains(int x,
                        int y,
                        int width,
                        int height)
Description copied from interface: Map.RegionContainment
Returns true if the location x, y falls inside the region defined in the receiver. width, height is the size of the enclosing region.

Specified by:
contains in interface Map.RegionContainment

contains

public boolean contains(int x,
                        int y)