net.xoetrope.optional.laf.synth
Class ButtonPainter

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

public class ButtonPainter
extends ImagePainter

Synth painter for JButtons

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


Constructor Summary
ButtonPainter()
           
 
Method Summary
 void paintArrowButtonBackground(javax.swing.plaf.synth.SynthContext context, java.awt.Graphics g, int x, int y, int w, int h)
          Paints the background of an arrow button.
 void paintArrowButtonForeground(javax.swing.plaf.synth.SynthContext context, java.awt.Graphics g, int x, int y, int w, int h, int direction)
          Paints the foreground of an arrow button.
 void paintButtonBackground(javax.swing.plaf.synth.SynthContext context, java.awt.Graphics g, int x, int y, int w, int h)
          Paints the background of a button.
 void paintButtonBorder(javax.swing.plaf.synth.SynthContext context, java.awt.Graphics g, int x, int y, int w, int h)
          Paints the background of a button.
 void paintCheckBoxBackground(javax.swing.plaf.synth.SynthContext context, java.awt.Graphics g, int x, int y, int w, int h)
          Paints the background of a toggle button.
 void paintRadioButtonBackground(javax.swing.plaf.synth.SynthContext context, java.awt.Graphics g, int x, int y, int w, int h)
          Paints the background of a toggle button.
 void paintToggleButtonBackground(javax.swing.plaf.synth.SynthContext context, java.awt.Graphics g, int x, int y, int w, int h)
          Paints the background of a toggle button.
 
Methods inherited from class net.xoetrope.optional.laf.synth.ImagePainter
drawBottomCenter, drawBottomLeft, drawBottomRight, drawCenter, drawLeft, drawRight, drawTopCenter, drawTopLeft, drawTopRight, getImage, getImage, paint, setH, setW
 
Methods inherited from class javax.swing.plaf.synth.SynthPainter
paintArrowButtonBorder, 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, 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, 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

ButtonPainter

public ButtonPainter()
Method Detail

paintButtonBackground

public void paintButtonBackground(javax.swing.plaf.synth.SynthContext context,
                                  java.awt.Graphics g,
                                  int x,
                                  int y,
                                  int w,
                                  int h)
Paints the background of a button.

Overrides:
paintButtonBackground in class javax.swing.plaf.synth.SynthPainter
Parameters:
context - SynthContext identifying the JComponent and Region to paint to
g - Graphics to paint to
x - X coordinate of the area to paint to
y - Y coordinate of the area to paint to
w - Width of the area to paint to
h - Height of the area to paint to

paintButtonBorder

public void paintButtonBorder(javax.swing.plaf.synth.SynthContext context,
                              java.awt.Graphics g,
                              int x,
                              int y,
                              int w,
                              int h)
Paints the background of a button.

Overrides:
paintButtonBorder in class javax.swing.plaf.synth.SynthPainter
Parameters:
context - SynthContext identifying the JComponent and Region to paint to
g - Graphics to paint to
x - X coordinate of the area to paint to
y - Y coordinate of the area to paint to
w - Width of the area to paint to
h - Height of the area to paint to

paintToggleButtonBackground

public void paintToggleButtonBackground(javax.swing.plaf.synth.SynthContext context,
                                        java.awt.Graphics g,
                                        int x,
                                        int y,
                                        int w,
                                        int h)
Paints the background of a toggle button.

Overrides:
paintToggleButtonBackground in class javax.swing.plaf.synth.SynthPainter
Parameters:
context - SynthContext identifying the JComponent and Region to paint to
g - Graphics to paint to
x - X coordinate of the area to paint to
y - Y coordinate of the area to paint to
w - Width of the area to paint to
h - Height of the area to paint to

paintCheckBoxBackground

public void paintCheckBoxBackground(javax.swing.plaf.synth.SynthContext context,
                                    java.awt.Graphics g,
                                    int x,
                                    int y,
                                    int w,
                                    int h)
Paints the background of a toggle button.

Overrides:
paintCheckBoxBackground in class javax.swing.plaf.synth.SynthPainter
Parameters:
context - SynthContext identifying the JComponent and Region to paint to
g - Graphics to paint to
x - X coordinate of the area to paint to
y - Y coordinate of the area to paint to
w - Width of the area to paint to
h - Height of the area to paint to

paintRadioButtonBackground

public void paintRadioButtonBackground(javax.swing.plaf.synth.SynthContext context,
                                       java.awt.Graphics g,
                                       int x,
                                       int y,
                                       int w,
                                       int h)
Paints the background of a toggle button.

Overrides:
paintRadioButtonBackground in class javax.swing.plaf.synth.SynthPainter
Parameters:
context - SynthContext identifying the JComponent and Region to paint to
g - Graphics to paint to
x - X coordinate of the area to paint to
y - Y coordinate of the area to paint to
w - Width of the area to paint to
h - Height of the area to paint to

paintArrowButtonBackground

public void paintArrowButtonBackground(javax.swing.plaf.synth.SynthContext context,
                                       java.awt.Graphics g,
                                       int x,
                                       int y,
                                       int w,
                                       int h)
Paints the background of an arrow button. Arrow buttons are created by some components, such as JScrollBar.

Overrides:
paintArrowButtonBackground in class javax.swing.plaf.synth.SynthPainter
Parameters:
context - SynthContext identifying the JComponent and Region to paint to
g - Graphics to paint to
x - X coordinate of the area to paint to
y - Y coordinate of the area to paint to
w - Width of the area to paint to
h - Height of the area to paint to

paintArrowButtonForeground

public void paintArrowButtonForeground(javax.swing.plaf.synth.SynthContext context,
                                       java.awt.Graphics g,
                                       int x,
                                       int y,
                                       int w,
                                       int h,
                                       int direction)
Paints the foreground of an arrow button. This method is responsible for drawing a graphical representation of a direction, typically an arrow. Arrow buttons are created by some components, such as JScrollBar

Overrides:
paintArrowButtonForeground in class javax.swing.plaf.synth.SynthPainter
Parameters:
context - SynthContext identifying the JComponent and Region to paint to
g - Graphics to paint to
x - X coordinate of the area to paint to
y - Y coordinate of the area to paint to
w - Width of the area to paint to
h - Height of the area to paint to
direction - One of SwingConstants.NORTH, SwingConstants.SOUTH SwingConstants.EAST or SwingConstants.WEST