com.alee.managers.style.skin.web
Class WebComboBoxElementPainter<E extends WebComboBoxElement>

java.lang.Object
  extended by com.alee.extended.painter.AbstractPainter<E>
      extended by com.alee.managers.style.skin.web.WebLabelPainter<E>
          extended by com.alee.managers.style.skin.web.WebComboBoxElementPainter<E>
All Implemented Interfaces:
Painter<E>, SpecificPainter, LabelPainter<E>

public class WebComboBoxElementPainter<E extends WebComboBoxElement>
extends WebLabelPainter<E>

Custom painter for ComboBox elements.

Author:
Mikle Garin
See Also:
AbstractPainter, Painter

Field Summary
protected  java.awt.Color bottomSelectedBackgroundColor
           
protected  java.awt.Color topSelectedBackgroundColor
          Style settings.
 
Fields inherited from class com.alee.managers.style.skin.web.WebLabelPainter
backgroundPainter, drawShade, paintIconR, paintTextR, shadeColor, transparency
 
Fields inherited from class com.alee.extended.painter.AbstractPainter
listeners, margin, opaque, preferredSize
 
Constructor Summary
WebComboBoxElementPainter()
          Constructs new combobox element painter.
 
Method Summary
 java.awt.Color getBottomSelectedBackgroundColor()
           
 java.awt.Color getTopSelectedBackgroundColor()
          Returns top selected background color.
 void paint(java.awt.Graphics2D g2d, java.awt.Rectangle bounds, E element)
          Paints visual data onto the component graphics.
protected  void paintBoxBackground(java.awt.Graphics2D g2d, java.awt.Rectangle bounds, E element)
          Paints combobox box element background.
protected  void paintDeselectedBackground(java.awt.Graphics2D g2d, java.awt.Rectangle bounds, E element)
          Paints deselected combobox popup list element background.
protected  void paintSelectedBackground(java.awt.Graphics2D g2d, java.awt.Rectangle bounds, E element)
          Paints selected combobox popup list element background.
 void setBottomSelectedBackgroundColor(java.awt.Color color)
           
 void setTopSelectedBackgroundColor(java.awt.Color color)
          Sets top selected background color.
 
Methods inherited from class com.alee.managers.style.skin.web.WebLabelPainter
getBackgroundPainter, getMargin, getPreferredSize, getShadeColor, getTransparency, isDrawShade, isOpaque, layout, layoutCL, paintDisabledText, paintEnabledText, paintShadowText, setBackgroundPainter, setDrawShade, setShadeColor, setTransparency
 
Methods inherited from class com.alee.extended.painter.AbstractPainter
addPainterListener, install, p, removePainterListener, repaint, repaint, repaint, revalidate, setMargin, setMargin, setMargin, setOpaque, setPreferredSize, uninstall, updateAll, updateOpacity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.alee.extended.painter.Painter
addPainterListener, install, removePainterListener, uninstall
 

Field Detail

topSelectedBackgroundColor

protected java.awt.Color topSelectedBackgroundColor
Style settings.


bottomSelectedBackgroundColor

protected java.awt.Color bottomSelectedBackgroundColor
Constructor Detail

WebComboBoxElementPainter

public WebComboBoxElementPainter()
Constructs new combobox element painter.

Method Detail

getTopSelectedBackgroundColor

public java.awt.Color getTopSelectedBackgroundColor()
Returns top selected background color.

Returns:
top selected background color

setTopSelectedBackgroundColor

public void setTopSelectedBackgroundColor(java.awt.Color color)
Sets top selected background color.

Parameters:
color - top selected background color

getBottomSelectedBackgroundColor

public java.awt.Color getBottomSelectedBackgroundColor()

setBottomSelectedBackgroundColor

public void setBottomSelectedBackgroundColor(java.awt.Color color)

paint

public void paint(java.awt.Graphics2D g2d,
                  java.awt.Rectangle bounds,
                  E element)
Paints visual data onto the component graphics. Provided graphics and component are taken directly from component UI paint method. Provided bounds are usually fake (zero location, component size) but in some cases it might be specified by componentUI.

Specified by:
paint in interface Painter<E extends WebComboBoxElement>
Overrides:
paint in class WebLabelPainter<E extends WebComboBoxElement>
Parameters:
g2d - component graphics
bounds - bounds for painter visual data
element - component to process

paintBoxBackground

protected void paintBoxBackground(java.awt.Graphics2D g2d,
                                  java.awt.Rectangle bounds,
                                  E element)
Paints combobox box element background.

Parameters:
g2d - graphics context
bounds - element bounds
element - combobox element

paintSelectedBackground

protected void paintSelectedBackground(java.awt.Graphics2D g2d,
                                       java.awt.Rectangle bounds,
                                       E element)
Paints selected combobox popup list element background.

Parameters:
g2d - graphics context
bounds - element bounds
element - combobox element

paintDeselectedBackground

protected void paintDeselectedBackground(java.awt.Graphics2D g2d,
                                         java.awt.Rectangle bounds,
                                         E element)
Paints deselected combobox popup list element background.

Parameters:
g2d - graphics context
bounds - element bounds
element - combobox element