com.sun.java.swing.plaf.nimbus
Class InternalFrameInternalFrameTitlePaneInternalFrameTitlePaneMaximizeButtonPainter

java.lang.Object
  extended by com.sun.java.swing.plaf.nimbus.AbstractRegionPainter
      extended by com.sun.java.swing.plaf.nimbus.InternalFrameInternalFrameTitlePaneInternalFrameTitlePaneMaximizeButtonPainter
All Implemented Interfaces:
Painter<JComponent>

public final class InternalFrameInternalFrameTitlePaneInternalFrameTitlePaneMaximizeButtonPainter
extends AbstractRegionPainter


Nested Class Summary
 
Nested classes/interfaces inherited from class com.sun.java.swing.plaf.nimbus.AbstractRegionPainter
AbstractRegionPainter.PaintContext
 
Constructor Summary
InternalFrameInternalFrameTitlePaneInternalFrameTitlePaneMaximizeButtonPainter(AbstractRegionPainter.PaintContext ctx, int state)
           
 
Method Summary
protected  void doPaint(Graphics2D g, JComponent c, int width, int height, Object[] extendedCacheKeys)
          Actually performs the painting operation.
protected  AbstractRegionPainter.PaintContext getPaintContext()
          Gets the PaintContext for this painting operation.
 
Methods inherited from class com.sun.java.swing.plaf.nimbus.AbstractRegionPainter
configureGraphics, decodeAnchorX, decodeAnchorY, decodeColor, decodeColor, decodeGradient, decodeRadialGradient, decodeX, decodeY, getComponentColor, getExtendedCacheKeys, paint
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InternalFrameInternalFrameTitlePaneInternalFrameTitlePaneMaximizeButtonPainter

public InternalFrameInternalFrameTitlePaneInternalFrameTitlePaneMaximizeButtonPainter(AbstractRegionPainter.PaintContext ctx,
                                                                                      int state)
Method Detail

doPaint

protected void doPaint(Graphics2D g,
                       JComponent c,
                       int width,
                       int height,
                       Object[] extendedCacheKeys)
Description copied from class: AbstractRegionPainter
Actually performs the painting operation. Subclasses must implement this method. The graphics object passed may represent the actual surface being rendererd to, or it may be an intermediate buffer. It has also been pre-translated. Simply render the component as if it were located at 0, 0 and had a width of width and a height of height. For performance reasons, you may want to read the clip from the Graphics2D object and only render within that space.

Specified by:
doPaint in class AbstractRegionPainter
Parameters:
g - The Graphics2D surface to paint to
c - The JComponent related to the drawing event. For example, if the region being rendered is Button, then c will be a JButton. If the region being drawn is ScrollBarSlider, then the component will be JScrollBar. This value may be null.
width - The width of the region to paint. Note that in the case of painting the foreground, this value may differ from c.getWidth().
height - The height of the region to paint. Note that in the case of painting the foreground, this value may differ from c.getHeight().
extendedCacheKeys - The result of the call to getExtendedCacheKeys()

getPaintContext

protected final AbstractRegionPainter.PaintContext getPaintContext()
Description copied from class: AbstractRegionPainter

Gets the PaintContext for this painting operation. This method is called on every paint, and so should be fast and produce no garbage. The PaintContext contains information such as cache hints. It also contains data necessary for decoding points at runtime, such as the stretching insets, the canvas size at which the encoded points were defined, and whether the stretching insets are inverted.

This method allows for subclasses to package the painting of different states with possibly different canvas sizes, etc, into one AbstractRegionPainter implementation.

Specified by:
getPaintContext in class AbstractRegionPainter
Returns:
a PaintContext associated with this paint operation.