com.alee.managers.style.skin.ninepatch
Class NPScrollBarButtonPainter<E extends javax.swing.AbstractButton>

java.lang.Object
  extended by com.alee.extended.painter.AbstractPainter<E>
      extended by com.alee.managers.style.skin.ninepatch.NPScrollBarButtonPainter<E>
All Implemented Interfaces:
Painter<E>, ScrollBarButtonPainter<E>

public class NPScrollBarButtonPainter<E extends javax.swing.AbstractButton>
extends AbstractPainter<E>
implements ScrollBarButtonPainter<E>

Base 9-patch painter for JScrollBar arrow buttons.

Author:
Mikle Garin

Field Summary
 
Fields inherited from class com.alee.extended.painter.AbstractPainter
listeners, margin, opaque, preferredSize
 
Constructor Summary
NPScrollBarButtonPainter()
           
 
Method Summary
 void paint(java.awt.Graphics2D g2d, java.awt.Rectangle bounds, E c)
          Paints visual data onto the component graphics.
 void setButtonType(ScrollBarButtonType type)
          todo 1.
 void setScrollbar(javax.swing.JScrollBar scrollbar)
          Sets scroll bar which uses this button.
 
Methods inherited from class com.alee.extended.painter.AbstractPainter
addPainterListener, getMargin, getPreferredSize, install, isOpaque, 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, getMargin, getPreferredSize, install, isOpaque, removePainterListener, uninstall
 

Constructor Detail

NPScrollBarButtonPainter

public NPScrollBarButtonPainter()
Method Detail

setButtonType

public void setButtonType(ScrollBarButtonType type)
todo 1. Implement when ButtonPainter/WebButtonPainter will be added and available

Specified by:
setButtonType in interface ScrollBarButtonPainter<E extends javax.swing.AbstractButton>
Parameters:
type - scroll bar button type

setScrollbar

public void setScrollbar(javax.swing.JScrollBar scrollbar)
Description copied from interface: ScrollBarButtonPainter
Sets scroll bar which uses this button.

Specified by:
setScrollbar in interface ScrollBarButtonPainter<E extends javax.swing.AbstractButton>
Parameters:
scrollbar - scroll bar which uses this button

paint

public void paint(java.awt.Graphics2D g2d,
                  java.awt.Rectangle bounds,
                  E c)
Description copied from interface: Painter
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 javax.swing.AbstractButton>
Parameters:
g2d - component graphics
bounds - bounds for painter visual data
c - component to process