|
HTML Parser Home Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.geom.RectangularShape
java.awt.geom.Rectangle2D
java.awt.Rectangle
org.htmlparser.lexerapplications.thumbelina.Picture
public class Picture
Class to track pictures within the frame. Maintains an image, an area and the URL for it.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.awt.geom.Rectangle2D |
|---|
Rectangle2D.Double, Rectangle2D.Float |
| Field Summary | |
|---|---|
protected Image |
mImage
The image for the picture. |
protected Point |
mOrigin
The upper left hand corner of the image. |
protected URL |
mURL
The URL for the picture. |
static Point |
ORIGIN
The origin for new points from the zero args constructor. |
| Fields inherited from class java.awt.Rectangle |
|---|
height, width, x, y |
| Fields inherited from class java.awt.geom.Rectangle2D |
|---|
OUT_BOTTOM, OUT_LEFT, OUT_RIGHT, OUT_TOP |
| Constructor Summary | |
|---|---|
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(Rectangle r)
Construct a picture over the rectangle given. |
|
| Method Summary | |
|---|---|
Image |
getImage()
Getter for property image. |
Point |
getOrigin()
Getter for property origin. |
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(Image image)
Setter for property image. |
void |
setOrigin(Point origin)
Setter for property origin. |
void |
setURL(URL url)
Setter for property URL. |
String |
toString()
Create a string representation of the picture. |
| Methods inherited from class java.awt.Rectangle |
|---|
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 |
| Methods inherited from class java.awt.geom.Rectangle2D |
|---|
add, add, add, contains, contains, getPathIterator, getPathIterator, hashCode, intersect, intersects, intersectsLine, intersectsLine, outcode, setFrame, setRect, union |
| Methods inherited from class java.awt.geom.RectangularShape |
|---|
clone, contains, contains, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.awt.Shape |
|---|
contains, contains, contains, contains, getPathIterator, getPathIterator, intersects, intersects |
| Field Detail |
|---|
public static final Point ORIGIN
protected URL mURL
protected Image mImage
protected Point mOrigin
Rectangle fields x, y,
width and height will change, but the
origin remains the same.
| Constructor Detail |
|---|
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(Rectangle r)
r - The coordinates of the area.public Picture(Picture picture)
picture - The picture to copy.| Method Detail |
|---|
public URL getURL()
public void setURL(URL url)
url - New value of property URL.public Image getImage()
public void setImage(Image image)
image - New value of property image.public Point getOrigin()
public void setOrigin(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 String toString()
toString in class Rectangle
|
© 2005 Derrick Oswald Jun 10, 2006
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
| HTML Parser is an open source library released under LGPL. | |