Class ImageDisplay.VisRect
- java.lang.Object
-
- java.awt.geom.RectangularShape
-
- java.awt.geom.Rectangle2D
-
- java.awt.Rectangle
-
- org.openstreetmap.josm.gui.layer.geoimage.ImageDisplay.VisRect
-
- All Implemented Interfaces:
java.awt.Shape,java.io.Serializable,java.lang.Cloneable
- Enclosing class:
- ImageDisplay
public static class ImageDisplay.VisRect extends java.awt.Rectangle
Manage the visible rectangle of an image with full bounds stored in init.- Since:
- 13127
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.awt.RectangleinitbooleanisDragUpdateset when thisVisRectis updated by a mouse drag operation and unset on mouse release
-
Constructor Summary
Constructors Constructor Description VisRect()Constructs a new emptyVisRect.VisRect(int x, int y, int width, int height)Constructs a newVisRect.VisRect(int x, int y, int width, int height, ImageDisplay.VisRect peer)Constructs a newVisRect.VisRect(ImageDisplay.VisRect v)Constructs a newVisRectfrom another one.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckPointInside(java.awt.Point p)voidcheckRectPos()voidcheckRectSize()booleanequals(java.lang.Object obj)inthashCode()booleanisFullView()booleanisFullView1D()voidreset()-
Methods inherited from class java.awt.Rectangle
add, add, add, contains, contains, contains, contains, createIntersection, createUnion, getBounds, getBounds2D, getHeight, getLocation, getSize, getWidth, getX, getY, grow, inside, intersection, intersects, isEmpty, move, outcode, reshape, resize, setBounds, setBounds, setLocation, setLocation, setRect, setSize, setSize, toString, translate, union
-
Methods inherited from class java.awt.geom.Rectangle2D
add, add, add, contains, contains, getPathIterator, getPathIterator, 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
-
-
-
-
Field Detail
-
init
private final java.awt.Rectangle init
-
isDragUpdate
public boolean isDragUpdate
set when thisVisRectis updated by a mouse drag operation and unset on mouse release
-
-
Constructor Detail
-
VisRect
public VisRect(int x, int y, int width, int height)
Constructs a newVisRect.- Parameters:
x- the specified X coordinatey- the specified Y coordinatewidth- the width of the rectangleheight- the height of the rectangle
-
VisRect
public VisRect(int x, int y, int width, int height, ImageDisplay.VisRect peer)
Constructs a newVisRect.- Parameters:
x- the specified X coordinatey- the specified Y coordinatewidth- the width of the rectangleheight- the height of the rectanglepeer- share full bounds with this peerVisRect
-
VisRect
public VisRect(ImageDisplay.VisRect v)
Constructs a newVisRectfrom another one.- Parameters:
v- rectangle to copy
-
VisRect
public VisRect()
Constructs a new emptyVisRect.
-
-
Method Detail
-
isFullView
public boolean isFullView()
-
isFullView1D
public boolean isFullView1D()
-
reset
public void reset()
-
checkRectPos
public void checkRectPos()
-
checkRectSize
public void checkRectSize()
-
checkPointInside
public void checkPointInside(java.awt.Point p)
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.awt.geom.Rectangle2D
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.awt.Rectangle
-
-