public class Picture
extends java.awt.Rectangle
Modifier and Type | Field and Description |
---|---|
protected java.awt.Image |
mImage
The image for the picture.
|
protected java.awt.Point |
mOrigin
The upper left hand corner of the image.
|
protected java.net.URL |
mURL
The URL for the picture.
|
static java.awt.Point |
ORIGIN
The origin for new points from the zero args constructor.
|
Constructor and Description |
---|
Picture()
Construct a Picture.
|
Picture(int x,
int y,
int width,
int height)
Construct a Picture over the area given.
|
Picture(Picture picture)
Construct a picture from the one given.
|
Picture(java.awt.Rectangle r)
Construct a picture over the rectangle given.
|
Modifier and Type | Method and Description |
---|---|
java.awt.Image |
getImage()
Getter for property image.
|
java.awt.Point |
getOrigin()
Getter for property origin.
|
java.net.URL |
getURL()
Getter for property URL.
|
void |
reset()
Reset the picture to uncropped size.
|
boolean |
same(Picture picture)
Return
true if that picture is the same as this one. |
void |
setImage(java.awt.Image image)
Setter for property image.
|
void |
setOrigin(java.awt.Point origin)
Setter for property origin.
|
void |
setURL(java.net.URL url)
Setter for property URL.
|
java.lang.String |
toString()
Create a string representation of the picture.
|
add, add, add, contains, contains, contains, contains, createIntersection, createUnion, equals, getBounds, getBounds2D, getHeight, getLocation, getSize, getWidth, getX, getY, grow, inside, intersection, intersects, isEmpty, move, outcode, reshape, resize, setBounds, setBounds, setLocation, setLocation, setRect, setSize, setSize, translate, union
add, add, add, contains, contains, getPathIterator, getPathIterator, hashCode, intersect, intersects, intersectsLine, intersectsLine, outcode, setFrame, setRect, union
clone, contains, contains, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal
public static final java.awt.Point ORIGIN
protected java.net.URL mURL
protected java.awt.Image mImage
protected java.awt.Point mOrigin
Rectangle
fields x
, y
,
width
and height
will change, but the
origin remains the same.public Picture()
public Picture(int x, int y, int width, int height)
x
- The x coordinate.y
- The y coordinate.width
- The width of the picture.height
- The height of the picture.public Picture(java.awt.Rectangle r)
r
- The coordinates of the area.public Picture(Picture picture)
picture
- The picture to copy.public java.net.URL getURL()
public void setURL(java.net.URL url)
url
- New value of property URL.public java.awt.Image getImage()
public void setImage(java.awt.Image image)
image
- New value of property image.public java.awt.Point getOrigin()
public void setOrigin(java.awt.Point origin)
origin
- New value of property origin.public boolean same(Picture picture)
true
if that picture is the same as this one.picture
- The picture to check.true
if the images match.public void reset()
public java.lang.String toString()
toString
in class java.awt.Rectangle
HTML Parser is an open source library released under LGPL.