com.alee.laf.scroll
Class AdaptiveScrollBarPainter<E extends javax.swing.JScrollBar>

java.lang.Object
  extended by com.alee.extended.painter.AbstractPainter<E>
      extended by com.alee.extended.painter.AdaptivePainter<E>
          extended by com.alee.laf.scroll.AdaptiveScrollBarPainter<E>
All Implemented Interfaces:
Painter<E>, SpecificPainter, ScrollBarPainter<E>

public class AdaptiveScrollBarPainter<E extends javax.swing.JScrollBar>
extends AdaptivePainter<E>
implements ScrollBarPainter<E>

Simple ScrollBarPainter adapter class. It is used to install simple non-specific painters into WebScrollBarUI.

Author:
Mikle Garin

Field Summary
 
Fields inherited from class com.alee.extended.painter.AbstractPainter
listeners, margin, opaque, preferredSize
 
Constructor Summary
AdaptiveScrollBarPainter(Painter painter)
          Constructs new AdaptiveScrollBarPainter for the specified painter.
 
Method Summary
 void setDragged(boolean dragged)
          Sets whether scroll bar thumb is being dragged or not.
 void setPaintButtons(boolean paint)
          Sets whether scroll bar arrow buttons are visible or not.
 void setPaintTrack(boolean paint)
          Sets whether scroll bar track should be painted or not.
 void setThumbBounds(java.awt.Rectangle bounds)
          Sets scroll bar thumb bounds.
 void setTrackBounds(java.awt.Rectangle bounds)
          Sets scroll bar track bounds.
 
Methods inherited from class com.alee.extended.painter.AdaptivePainter
addPainterListener, getMargin, getPainter, getPreferredSize, install, isOpaque, paint, removePainterListener, uninstall
 
Methods inherited from class com.alee.extended.painter.AbstractPainter
p, repaint, repaint, repaint, revalidate, setMargin, setMargin, setMargin, setOpaque, setPreferredSize, 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, paint, removePainterListener, uninstall
 

Constructor Detail

AdaptiveScrollBarPainter

public AdaptiveScrollBarPainter(Painter painter)
Constructs new AdaptiveScrollBarPainter for the specified painter.

Parameters:
painter - painter to adapt
Method Detail

setPaintButtons

public void setPaintButtons(boolean paint)
Sets whether scroll bar arrow buttons are visible or not. Buttons are painted separately, this mark simply informs whether they are actually visible or not.

Specified by:
setPaintButtons in interface ScrollBarPainter<E extends javax.swing.JScrollBar>
Parameters:
paint - whether scroll bar arrow buttons are visible or not

setPaintTrack

public void setPaintTrack(boolean paint)
Sets whether scroll bar track should be painted or not.

Specified by:
setPaintTrack in interface ScrollBarPainter<E extends javax.swing.JScrollBar>
Parameters:
paint - whether scroll bar track should be painted or not

setDragged

public void setDragged(boolean dragged)
Sets whether scroll bar thumb is being dragged or not. This value is updated by WebScrollBarUI when drag event starts or ends.

Specified by:
setDragged in interface ScrollBarPainter<E extends javax.swing.JScrollBar>
Parameters:
dragged - whether scroll bar thumb is being dragged or not

setTrackBounds

public void setTrackBounds(java.awt.Rectangle bounds)
Sets scroll bar track bounds. This value is updated by WebScrollBarUI on each paint call to ensure that proper bounds presented.

Specified by:
setTrackBounds in interface ScrollBarPainter<E extends javax.swing.JScrollBar>
Parameters:
bounds - new scroll bar track bounds

setThumbBounds

public void setThumbBounds(java.awt.Rectangle bounds)
Sets scroll bar thumb bounds. This value is updated by WebScrollBarUI on each paint call to ensure that proper bounds presented.

Specified by:
setThumbBounds in interface ScrollBarPainter<E extends javax.swing.JScrollBar>
Parameters:
bounds - new scroll bar thumb bounds