org.jdrawing.graphics
Class RoundRectOperation

java.lang.Object
  extended byorg.jdrawing.graphics.GraphicsOperation
      extended byorg.jdrawing.graphics.RectangleOperation
          extended byorg.jdrawing.graphics.RoundRectOperation
All Implemented Interfaces:
DrawingElement
Direct Known Subclasses:
DrawRoundRect, FillRoundRect

public abstract class RoundRectOperation
extends RectangleOperation

Base class for operations, which get reounded rectangle as argument.


Constructor Summary
RoundRectOperation(int x, int y, int width, int height, int arcWidth, int arcHeight)
          Returns RoundRectOperation with given rounded rectangle.
RoundRectOperation(int x, int y, int width, int height, int arcWidth, int arcHeight, Style style)
          Returns RoundRectOperation with given rounded rectangle and style.
 
Method Summary
 int getArcHeight()
          Gets the vertical diameter of the arc at the four corners.
 int getArcWidth()
          Gets the horizontal diameter of the arc at the four corners.
 void setArcHeight(int arcHeight)
          Sets the vertical diameter of the arc at the four corners.
 void setArcWidth(int arcWidth)
          Sets the horizontal diameter of the arc at the four corners.
 void setRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
          Sets the attributes of the rounded rectangle.
 
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, getShapeOfOperation, getStyle, intersects, paint, paintOperation, setPosition, setStyle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RoundRectOperation

public RoundRectOperation(int x,
                          int y,
                          int width,
                          int height,
                          int arcWidth,
                          int arcHeight)
Returns RoundRectOperation with given rounded rectangle.

Parameters:
x - left edge of the rectangle
y - top edge of the rectangle
width - width of the rectangle
height - height of the rectangle
arcWidth - the horizontal diameter of the arc at the four corners
arcHeight - the vertical diameter of the arc at the four corners

RoundRectOperation

public RoundRectOperation(int x,
                          int y,
                          int width,
                          int height,
                          int arcWidth,
                          int arcHeight,
                          Style style)
Returns RoundRectOperation with given rounded rectangle and style.

Parameters:
x - left edge of the rectangle
y - top edge of the rectangle
width - width of the rectangle
height - height of the rectangle
arcWidth - the horizontal diameter of the arc at the four corners
arcHeight - the vertical diameter of the arc at the four corners
style - style for this rectangle
Method Detail

setArcWidth

public void setArcWidth(int arcWidth)
Sets the horizontal diameter of the arc at the four corners.

Parameters:
arcWidth - the horizontal diameter of the arc at the four corners

getArcWidth

public int getArcWidth()
Gets the horizontal diameter of the arc at the four corners.

Returns:
the horizontal diameter of the arc at the four corners

setArcHeight

public void setArcHeight(int arcHeight)
Sets the vertical diameter of the arc at the four corners.

Parameters:
arcHeight - the vertical diameter of the arc at the four corners

getArcHeight

public int getArcHeight()
Gets the vertical diameter of the arc at the four corners.

Returns:
the vertical diameter of the arc at the four corners

setRoundRect

public void setRoundRect(int x,
                         int y,
                         int width,
                         int height,
                         int arcWidth,
                         int arcHeight)
Sets the attributes of the rounded rectangle.

Parameters:
x - left edge of the rectangle
y - top edge of the rectangle
width - width of the rectangle
height - height of the rectangle
arcWidth - the horizontal diameter of the arc at the four corners
arcHeight - the vertical diameter of the arc at the four corners