org.jdrawing.graphics
Class Fill3DRect

java.lang.Object
  extended byorg.jdrawing.graphics.GraphicsOperation
      extended byorg.jdrawing.graphics.RectangleOperation
          extended byorg.jdrawing.graphics.AbstractFillRect
              extended byorg.jdrawing.graphics.Fill3DRect
All Implemented Interfaces:
DrawingElement

public class Fill3DRect
extends AbstractFillRect

Graphics element which corresponds to Graphics.fill3DRect(int, int, int, int, boolean)


Constructor Summary
Fill3DRect(int x, int y, int width, int height, boolean raised)
          Returns Fill3DRect with given rectangle.
Fill3DRect(int x, int y, int width, int height, boolean raised, Style style)
          Returns Fill3DRect with given rectangle.
 
Method Summary
 boolean equals(java.lang.Object object)
          Checks whether two fill 3D rect operations are equal.
 int hashCode()
          Returns the hashcode for this fill 3D rect operation.
 boolean isRaised()
          Returns if the rectangle appears to be raised above the surface or sunk into the surface
 void paintOperation(java.awt.Graphics2D graphics)
          Performs drawing operation.
 void setRaised(boolean raised)
          Sets if the rectangle appears to be raised above the surface or sunk into the surface
 
Methods inherited from class org.jdrawing.graphics.AbstractFillRect
getShapeOfOperation
 
Methods inherited from class org.jdrawing.graphics.RectangleOperation
getHeight, getWidth, getX, getY, setHeight, setRectangle, setWidth, setX, setY
 
Methods inherited from class org.jdrawing.graphics.GraphicsOperation
contains, getBounds, getBounds2D, getPosition, getStyle, intersects, paint, setPosition, setStyle
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Fill3DRect

public Fill3DRect(int x,
                  int y,
                  int width,
                  int height,
                  boolean raised)
Returns Fill3DRect with given rectangle.

Parameters:
x - left edge of the rectangle
y - top edge of the rectangle
width - width of the rectangle
height - height of the rectangle
raised - a boolean that determines whether the rectangle appears to be raised above the surface or sunk into the surface

Fill3DRect

public Fill3DRect(int x,
                  int y,
                  int width,
                  int height,
                  boolean raised,
                  Style style)
Returns Fill3DRect with given rectangle.

Parameters:
x - left edge of the rectangle
y - top edge of the rectangle
width - width of the rectangle
height - height of the rectangle
raised - a boolean that determines whether the rectangle appears to be raised above the surface or sunk into the surface
Method Detail

setRaised

public void setRaised(boolean raised)
Sets if the rectangle appears to be raised above the surface or sunk into the surface

Parameters:
raised - a boolean that determines whether the rectangle appears to be raised above the surface or sunk into the surface

isRaised

public boolean isRaised()
Returns if the rectangle appears to be raised above the surface or sunk into the surface

Returns:
a boolean that determines whether the rectangle appears to be raised above the surface or sunk into the surface

paintOperation

public void paintOperation(java.awt.Graphics2D graphics)
Performs drawing operation. This implementation invokes graphics.fill3DRect ().

Specified by:
paintOperation in class GraphicsOperation
Parameters:
graphics - graphics context to use for painting

equals

public boolean equals(java.lang.Object object)
Checks whether two fill 3D rect operations are equal. The result is true if and only if the argument is not null and is a Fill3DRect object that has the same attributes as this Fill3DRect.

Overrides:
equals in class RectangleOperation
Parameters:
object - the Object to compare with this Fill3DRect
Returns:
true if the objects are equal; false otherwise.

hashCode

public int hashCode()
Returns the hashcode for this fill 3D rect operation.

Overrides:
hashCode in class RectangleOperation
Returns:
a hash code for this fill 3D rect operation.