net.xoetrope.optional.laf.synth
Class ImagePainter

java.lang.Object
  extended by javax.swing.plaf.synth.SynthPainter
      extended by net.xoetrope.optional.laf.synth.ImagePainter
Direct Known Subclasses:
ButtonPainter

public class ImagePainter
extends javax.swing.plaf.synth.SynthPainter

Paints an image in sections, distinguishing the corners and edges and center so that the eges can be stretched.

A variation on the Synth ImagePainter class but as the Syth class is not public we cannot derive from it so this class duplicates some of its methods.

Copyright: Copyright (c) Xoetrope Ltd., 2004-2005
License: see license.txt $Revision: 1.4 $

See Also:
ImagePainter

Constructor Summary
ImagePainter()
           
ImagePainter(javax.swing.plaf.synth.SynthContext c, java.awt.Graphics g, int ax, int ay, int aw, int ah, java.lang.String imagePath, java.awt.Insets srcInsets, java.awt.Insets dstInsets, boolean bTiles, boolean bCenter)
           
ImagePainter(javax.swing.plaf.synth.SynthContext c, java.awt.Graphics g, int ax, int ay, int aw, int ah, java.lang.String imagePath, java.awt.Insets srcInsets, java.awt.Insets dstInsets, boolean bTiles, boolean bCenter, boolean convert)
           
 
Method Summary
 void drawBottomCenter(java.awt.Graphics g)
           
 void drawBottomLeft(java.awt.Graphics g)
           
 void drawBottomRight(java.awt.Graphics g)
           
 void drawCenter(java.awt.Graphics g)
           
 void drawLeft(java.awt.Graphics g)
           
 void drawRight(java.awt.Graphics g)
           
 void drawTopCenter(java.awt.Graphics g)
           
 void drawTopLeft(java.awt.Graphics g)
           
 void drawTopRight(java.awt.Graphics g)
           
 java.awt.Image getImage(java.lang.String imagePath)
           
 java.awt.Image getImage(java.lang.String imagePath, boolean convert)
           
 void paint(java.awt.Graphics g)
           
 void setH(int h)
           
 void setW(int w)
           
 
Methods inherited from class javax.swing.plaf.synth.SynthPainter
paintArrowButtonBackground, paintArrowButtonBorder, paintArrowButtonForeground, paintButtonBackground, paintButtonBorder, paintCheckBoxBackground, paintCheckBoxBorder, paintCheckBoxMenuItemBackground, paintCheckBoxMenuItemBorder, paintColorChooserBackground, paintColorChooserBorder, paintComboBoxBackground, paintComboBoxBorder, paintDesktopIconBackground, paintDesktopIconBorder, paintDesktopPaneBackground, paintDesktopPaneBorder, paintEditorPaneBackground, paintEditorPaneBorder, paintFileChooserBackground, paintFileChooserBorder, paintFormattedTextFieldBackground, paintFormattedTextFieldBorder, paintInternalFrameBackground, paintInternalFrameBorder, paintInternalFrameTitlePaneBackground, paintInternalFrameTitlePaneBorder, paintLabelBackground, paintLabelBorder, paintListBackground, paintListBorder, paintMenuBackground, paintMenuBarBackground, paintMenuBarBorder, paintMenuBorder, paintMenuItemBackground, paintMenuItemBorder, paintOptionPaneBackground, paintOptionPaneBorder, paintPanelBackground, paintPanelBorder, paintPasswordFieldBackground, paintPasswordFieldBorder, paintPopupMenuBackground, paintPopupMenuBorder, paintProgressBarBackground, paintProgressBarBackground, paintProgressBarBorder, paintProgressBarBorder, paintProgressBarForeground, paintRadioButtonBackground, paintRadioButtonBorder, paintRadioButtonMenuItemBackground, paintRadioButtonMenuItemBorder, paintRootPaneBackground, paintRootPaneBorder, paintScrollBarBackground, paintScrollBarBackground, paintScrollBarBorder, paintScrollBarBorder, paintScrollBarThumbBackground, paintScrollBarThumbBorder, paintScrollBarTrackBackground, paintScrollBarTrackBackground, paintScrollBarTrackBorder, paintScrollBarTrackBorder, paintScrollPaneBackground, paintScrollPaneBorder, paintSeparatorBackground, paintSeparatorBackground, paintSeparatorBorder, paintSeparatorBorder, paintSeparatorForeground, paintSliderBackground, paintSliderBackground, paintSliderBorder, paintSliderBorder, paintSliderThumbBackground, paintSliderThumbBorder, paintSliderTrackBackground, paintSliderTrackBackground, paintSliderTrackBorder, paintSliderTrackBorder, paintSpinnerBackground, paintSpinnerBorder, paintSplitPaneBackground, paintSplitPaneBorder, paintSplitPaneDividerBackground, paintSplitPaneDividerBackground, paintSplitPaneDividerForeground, paintSplitPaneDragDivider, paintTabbedPaneBackground, paintTabbedPaneBorder, paintTabbedPaneContentBackground, paintTabbedPaneContentBorder, paintTabbedPaneTabAreaBackground, paintTabbedPaneTabAreaBackground, paintTabbedPaneTabAreaBorder, paintTabbedPaneTabAreaBorder, paintTabbedPaneTabBackground, paintTabbedPaneTabBackground, paintTabbedPaneTabBorder, paintTabbedPaneTabBorder, paintTableBackground, paintTableBorder, paintTableHeaderBackground, paintTableHeaderBorder, paintTextAreaBackground, paintTextAreaBorder, paintTextFieldBackground, paintTextFieldBorder, paintTextPaneBackground, paintTextPaneBorder, paintToggleButtonBackground, paintToggleButtonBorder, paintToolBarBackground, paintToolBarBackground, paintToolBarBorder, paintToolBarBorder, paintToolBarContentBackground, paintToolBarContentBackground, paintToolBarContentBorder, paintToolBarContentBorder, paintToolBarDragWindowBackground, paintToolBarDragWindowBackground, paintToolBarDragWindowBorder, paintToolBarDragWindowBorder, paintToolTipBackground, paintToolTipBorder, paintTreeBackground, paintTreeBorder, paintTreeCellBackground, paintTreeCellBorder, paintTreeCellFocus, paintViewportBackground, paintViewportBorder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImagePainter

public ImagePainter()

ImagePainter

public ImagePainter(javax.swing.plaf.synth.SynthContext c,
                    java.awt.Graphics g,
                    int ax,
                    int ay,
                    int aw,
                    int ah,
                    java.lang.String imagePath,
                    java.awt.Insets srcInsets,
                    java.awt.Insets dstInsets,
                    boolean bTiles,
                    boolean bCenter,
                    boolean convert)

ImagePainter

public ImagePainter(javax.swing.plaf.synth.SynthContext c,
                    java.awt.Graphics g,
                    int ax,
                    int ay,
                    int aw,
                    int ah,
                    java.lang.String imagePath,
                    java.awt.Insets srcInsets,
                    java.awt.Insets dstInsets,
                    boolean bTiles,
                    boolean bCenter)
Method Detail

getImage

public java.awt.Image getImage(java.lang.String imagePath)

getImage

public java.awt.Image getImage(java.lang.String imagePath,
                               boolean convert)

paint

public void paint(java.awt.Graphics g)

drawTopLeft

public void drawTopLeft(java.awt.Graphics g)

drawTopCenter

public void drawTopCenter(java.awt.Graphics g)

drawTopRight

public void drawTopRight(java.awt.Graphics g)

drawRight

public void drawRight(java.awt.Graphics g)

drawBottomRight

public void drawBottomRight(java.awt.Graphics g)

drawBottomCenter

public void drawBottomCenter(java.awt.Graphics g)

drawBottomLeft

public void drawBottomLeft(java.awt.Graphics g)

drawLeft

public void drawLeft(java.awt.Graphics g)

drawCenter

public void drawCenter(java.awt.Graphics g)

setW

public void setW(int w)

setH

public void setH(int h)