java.lang.Object
java.awt.geom.RectangularShape
java.awt.geom.Rectangle2D
java.awt.Rectangle
com.flexstor.common.util.FlexRectangle
- All Implemented Interfaces:
- java.lang.Cloneable, java.io.Serializable, java.awt.Shape
- public class FlexRectangle
- extends java.awt.Rectangle
This class extends Rectangle so that it can be saved as a string
in the database or in a text file and be reconstructed.
Basically, this is a very simple Serializable interface.
Two methods readObject (create an object from a string)
and writeObject (transforms an object to a string) implement
that functionality.
| Nested classes inherited from class java.awt.geom.Rectangle2D |
java.awt.geom.Rectangle2D.Double, java.awt.geom.Rectangle2D.Float |
| 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, toString, 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 |
FlexRectangle
public FlexRectangle()
- Constructs a new rectangle.
FlexRectangle
public FlexRectangle(int x,
int y,
int width,
int height)
- Constructs and initializes a rectangle with the specified parameters.
FlexRectangle
public FlexRectangle(int width,
int height)
- Constructs a rectangle and initializes it with the specified width and
height parameters.
FlexRectangle
public FlexRectangle(java.awt.Point p,
java.awt.Dimension d)
- Constructs a rectangle and initializes it to a specified point and
dimension.
FlexRectangle
public FlexRectangle(java.awt.Point p)
- Constructs a rectangle and initializes it to the specified point.
FlexRectangle
public FlexRectangle(java.awt.Dimension d)
- Constructs a rectangle and initializes it to the specified width and
height.
writeObject
public java.lang.String writeObject()
readObject
public static FlexRectangle readObject(java.lang.String s)