Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.flexstor.common.util
Class FlexRectangle  view FlexRectangle download FlexRectangle.java

java.lang.Object
  extended byjava.awt.geom.RectangularShape
      extended byjava.awt.geom.Rectangle2D
          extended byjava.awt.Rectangle
              extended bycom.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 Class Summary
 
Nested classes inherited from class java.awt.geom.Rectangle2D
java.awt.geom.Rectangle2D.Double, java.awt.geom.Rectangle2D.Float
 
Field Summary
 
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
FlexRectangle()
          Constructs a new rectangle.
FlexRectangle(java.awt.Dimension d)
          Constructs a rectangle and initializes it to the specified width and height.
FlexRectangle(int width, int height)
          Constructs a rectangle and initializes it with the specified width and height parameters.
FlexRectangle(int x, int y, int width, int height)
          Constructs and initializes a rectangle with the specified parameters.
FlexRectangle(java.awt.Point p)
          Constructs a rectangle and initializes it to the specified point.
FlexRectangle(java.awt.Point p, java.awt.Dimension d)
          Constructs a rectangle and initializes it to a specified point and dimension.
 
Method Summary
static FlexRectangle readObject(java.lang.String s)
           
 java.lang.String writeObject()
           
 
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
 
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
 

Constructor Detail

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.

Method Detail

writeObject

public java.lang.String writeObject()

readObject

public static FlexRectangle readObject(java.lang.String s)