Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jdesktop.swingx.painter
Class RectanglePainter

    java.lang.Object
      org.jdesktop.beans.AbstractBean
          org.jdesktop.swingx.painter.AbstractPainter<T>
              org.jdesktop.swingx.painter.AbstractLayoutPainter<T>
                  org.jdesktop.swingx.painter.AbstractAreaPainter<java.lang.Object>
                      org.jdesktop.swingx.painter.RectanglePainter

All Implemented Interfaces:
  Painter<java.lang.Object>

    public class RectanglePainter

extends AbstractAreaPainter<java.lang.Object>

A painter which paints square and rounded rectangles

Author:
  joshua.marinacci@sun.com

Nested Class Summary

Nested classes/interfaces inherited from class org.jdesktop.swingx.painter.AbstractAreaPainter
`AbstractAreaPainter.Style`

Nested classes/interfaces inherited from class org.jdesktop.swingx.painter.AbstractLayoutPainter
`AbstractLayoutPainter.HorizontalAlignment, AbstractLayoutPainter.VerticalAlignment`

Nested classes/interfaces inherited from class org.jdesktop.swingx.painter.AbstractPainter
`AbstractPainter.Interpolation`

Constructor Summary
`RectanglePainter()` Creates a new instance of RectanglePainter
`RectanglePainter(java.awt.Color fillPaint, java.awt.Color borderPaint)`
`RectanglePainter(java.awt.Insets insets, int width, int height, int roundWidth, int roundHeight, boolean rounded, java.awt.Paint fillPaint, float strokeWidth, java.awt.Paint borderPaint)`
`RectanglePainter(int top, int left, int bottom, int right)`
`RectanglePainter(int top, int left, int bottom, int right, int roundWidth, int roundHeight)`
`RectanglePainter(int top, int left, int bottom, int right, int roundWidth, int roundHeight, boolean rounded, java.awt.Paint fillPaint, float strokeWidth, java.awt.Paint borderPaint)`
`RectanglePainter(int width, int height, int cornerRadius, java.awt.Paint fillPaint)`
`RectanglePainter(java.awt.Paint fillPaint, java.awt.Paint borderPaint, float borderWidth, AbstractAreaPainter.Style style)`

Method Summary
`protected java.awt.geom.RectangularShape` | `calculateShape(int width, int height)`
`protected void` | `doPaint(java.awt.Graphics2D g, java.lang.Object component, int width, int height)` Subclasses must implement this method and perform custom painting operations here.
`int` | `getRoundHeight()` gets the round height of the rectangle
`int` | `getRoundWidth()` gets the round width of the rectangle
`boolean` | `isRounded()` Indicates if the rectangle is rounded
`protected java.awt.Shape` | `provideShape(java.awt.Graphics2D g, java.lang.Object comp, int width, int height)` Returns the outline shape of this painter.
`void` | `setRounded(boolean rounded)` sets if the rectangle should be rounded
`void` | `setRoundHeight(int roundHeight)` sets the round height of the rectangle
`void` | `setRoundWidth(int roundWidth)` sets the round width of the rectangle

Methods inherited from class org.jdesktop.swingx.painter.AbstractAreaPainter
`getAreaEffects, getBorderPaint, getBorderWidth, getFillPaint, getStyle, isPaintStretched, setAreaEffects, setBorderPaint, setBorderWidth, setFillPaint, setPaintStretched, setStyle`

Methods inherited from class org.jdesktop.swingx.painter.AbstractLayoutPainter
`calculateLayout, getHorizontalAlignment, getInsets, getVerticalAlignment, isFillHorizontal, isFillVertical, setFillHorizontal, setFillVertical, setHorizontalAlignment, setInsets, setVerticalAlignment`

Methods inherited from class org.jdesktop.swingx.painter.AbstractPainter
`clearCache, configureGraphics, getFilters, getInterpolation, isAntialiasing, isCacheable, isDirty, isVisible, paint, setAntialiasing, setCacheable, setDirty, setFilters, setInterpolation, setVisible, shouldUseCache, validate`

Methods inherited from class org.jdesktop.beans.AbstractBean
`addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, clone, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### RectanglePainter

    public RectanglePainter()

  Creates a new instance of RectanglePainter

### RectanglePainter

    public RectanglePainter(java.awt.Color fillPaint,
                            java.awt.Color borderPaint)

### RectanglePainter

    public RectanglePainter(java.awt.Paint fillPaint,
                            java.awt.Paint borderPaint,
                            float borderWidth,
                            AbstractAreaPainter.Style style)

### RectanglePainter

    public RectanglePainter(int top,
                            int left,
                            int bottom,
                            int right)

### RectanglePainter

    public RectanglePainter(int top,
                            int left,
                            int bottom,
                            int right,
                            int roundWidth,
                            int roundHeight)

### RectanglePainter

    public RectanglePainter(int width,
                            int height,
                            int cornerRadius,
                            java.awt.Paint fillPaint)

### RectanglePainter

    public RectanglePainter(java.awt.Insets insets,
                            int width,
                            int height,
                            int roundWidth,
                            int roundHeight,
                            boolean rounded,
                            java.awt.Paint fillPaint,
                            float strokeWidth,
                            java.awt.Paint borderPaint)

### RectanglePainter

    public RectanglePainter(int top,
                            int left,
                            int bottom,
                            int right,
                            int roundWidth,
                            int roundHeight,
                            boolean rounded,
                            java.awt.Paint fillPaint,
                            float strokeWidth,
                            java.awt.Paint borderPaint)

Method Detail

### isRounded

    public boolean isRounded()

  Indicates if the rectangle is rounded

  Returns:
    if the rectangle is rounded

### setRounded

    public void setRounded(boolean rounded)

  sets if the rectangle should be rounded

  Parameters:
    `rounded` - if the rectangle should be rounded

### getRoundWidth

    public int getRoundWidth()

  gets the round width of the rectangle

  Returns:
    the current round width

### setRoundWidth

    public void setRoundWidth(int roundWidth)

  sets the round width of the rectangle

  Parameters:
    `roundWidth` - a new round width

### getRoundHeight

    public int getRoundHeight()

  gets the round height of the rectangle

  Returns:
    the current round height

### setRoundHeight

    public void setRoundHeight(int roundHeight)

  sets the round height of the rectangle

  Parameters:
    `roundHeight` - a new round height

### calculateShape

    protected java.awt.geom.RectangularShape calculateShape(int width,
                                                            int height)

### doPaint

    protected void doPaint(java.awt.Graphics2D g,
                           java.lang.Object component,
                           int width,
                           int height)

  Description copied from class: `AbstractPainter`
  Subclasses must implement this method and perform custom painting operations here.

  Specified by:
    `doPaint` in class `AbstractPainter<java.lang.Object>`
  Parameters:
    `g` - The Graphics2D object in which to paint

### provideShape

    protected java.awt.Shape provideShape(java.awt.Graphics2D g,
                                          java.lang.Object comp,
                                          int width,
                                          int height)

  Description copied from class: `AbstractAreaPainter`
  Returns the outline shape of this painter. Subclasses must implement this method. This shape will be used for filling, stroking, and clipping.

  Specified by:
    `provideShape` in class `AbstractAreaPainter<java.lang.Object>`
  Parameters:
    `g` - graphics
    `comp` - The Object this painter will be painted on.
    `width` - the width to paint
    `height` - the height to paint
  Returns:
    the outline shape of this painter

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2010. All Rights Reserved.