|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.alee.extended.painter.AbstractPainter<E> com.alee.managers.style.skin.web.WebScrollBarPainter<E>
public class WebScrollBarPainter<E extends javax.swing.JScrollBar>
Web-style painter for JScrollBar component. It is used as WebScrollBarUI default painter.
Field Summary | |
---|---|
protected boolean |
animated
Runtime variables. |
protected boolean |
dragged
|
protected java.awt.event.MouseAdapter |
mouseAdapter
Listeners. |
protected boolean |
paintButtons
Style settings. |
protected boolean |
paintTrack
|
protected boolean |
pressed
|
protected boolean |
rollover
|
protected WebTimer |
rolloverAnimator
|
protected float |
rolloverState
|
protected java.awt.Color |
thumbBackgroundColor
|
protected java.awt.Color |
thumbBorderColor
|
protected java.awt.Rectangle |
thumbBounds
|
protected java.awt.Color |
thumbDisabledBackgroundColor
|
protected java.awt.Color |
thumbDisabledBorderColor
|
protected java.awt.Insets |
thumbMargin
|
protected java.awt.Insets |
thumbMarginHL
|
protected java.awt.Insets |
thumbMarginHR
|
protected java.awt.Insets |
thumbMarginR
|
protected java.awt.Color |
thumbPressedBackgroundColor
|
protected java.awt.Color |
thumbPressedBorderColor
|
protected java.awt.Color |
thumbRolloverBackgroundColor
|
protected java.awt.Color |
thumbRolloverBorderColor
|
protected int |
thumbRound
|
protected java.awt.Color |
trackBackgroundColor
|
protected java.awt.Color |
trackBorderColor
|
protected java.awt.Rectangle |
trackBounds
|
Fields inherited from class com.alee.extended.painter.AbstractPainter |
---|
listeners, margin, opaque, preferredSize |
Constructor Summary | |
---|---|
WebScrollBarPainter()
|
Method Summary | |
---|---|
protected java.awt.Color |
getCurrentThumbBackgroundColor(E scrollbar)
Returns current thumb background color. |
protected java.awt.Color |
getCurrentThumbBorderColor(E scrollbar)
Returns current thumb border color. |
protected java.awt.Insets |
getCurrentThumbMargin(E scrollbar)
Returns current thumb margin rotated into proper position. |
java.awt.Insets |
getMargin(E scrollbar)
Returns margin required for visual data provided by this painter. |
java.awt.Color |
getThumbBackgroundColor()
Returns scroll bar thumb background color. |
java.awt.Color |
getThumbBorderColor()
Returns scroll bar thumb border color. |
java.awt.Color |
getThumbDisabledBackgroundColor()
Returns disabled scroll bar thumb background color. |
java.awt.Color |
getThumbDisabledBorderColor()
Returns disabled scroll bar thumb border color. |
java.awt.Insets |
getThumbMargin()
Returns scroll bar thumb margin. |
java.awt.Color |
getThumbPressedBackgroundColor()
Returns scroll bar pressed thumb background color. |
java.awt.Color |
getThumbPressedBorderColor()
Returns scroll bar pressed thumb border color. |
java.awt.Color |
getThumbRolloverBackgroundColor()
Returns scroll bar rollover thumb background color. |
java.awt.Color |
getThumbRolloverBorderColor()
Returns scroll bar rollover thumb border color. |
int |
getThumbRound()
Returns scroll bar thumb corners rounding. |
java.awt.Color |
getTrackBackgroundColor()
Returns scroll bar track background color. |
java.awt.Color |
getTrackBorderColor()
Returns scroll bar track border color. |
void |
install(E scrollbar)
Called when painter is intalled into some component. |
java.lang.Boolean |
isOpaque(E scrollbar)
Returns whether visual data provided by this painter is opaque or not. |
boolean |
isPaintButtons()
Returns whether scroll bar arrow buttons are visible or not. |
boolean |
isPaintTrack()
Returns whether scroll bar track should be painted or not. |
boolean |
isPressed()
Returns whether scroll bar thumb is pressed or not. |
boolean |
isRollover()
Returns whether scroll bar thumb is in rollover state or not. |
void |
paint(java.awt.Graphics2D g2d,
java.awt.Rectangle bounds,
E scrollbar)
Paints visual data onto the component graphics. |
protected void |
paintBackground(java.awt.Graphics2D g2d,
E scrollbar,
java.awt.Rectangle bounds)
Paints scroll bar background. |
protected void |
paintThumb(java.awt.Graphics2D g2d,
E scrollbar,
java.awt.Rectangle bounds)
Paints scroll bar thumb. |
protected void |
paintTrack(java.awt.Graphics2D g2d,
E scrollbar,
java.awt.Rectangle bounds)
Paints scroll bar track. |
void |
repaintThumb()
Forces scroll bar thumb to be repainted. |
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 |
setPressed(boolean pressed)
Sets whether scroll bar thumb is pressed or not. |
void |
setRollover(boolean rollover)
Sets whether scroll bar thumb is in rollover state or not. |
void |
setThumbBackgroundColor(java.awt.Color color)
Sets scroll bar thumb background color. |
void |
setThumbBorderColor(java.awt.Color color)
Sets scroll bar thumb border color. |
void |
setThumbBounds(java.awt.Rectangle bounds)
Sets scroll bar thumb bounds. |
void |
setThumbDisabledBackgroundColor(java.awt.Color color)
Sets disabled scroll bar thumb background color. |
void |
setThumbDisabledBorderColor(java.awt.Color color)
Sets disabled scroll bar thumb border color. |
void |
setThumbMargin(java.awt.Insets margin)
Sets scroll bar thumb margin. |
void |
setThumbPressedBackgroundColor(java.awt.Color color)
Sets scroll bar pressed thumb background color. |
void |
setThumbPressedBorderColor(java.awt.Color color)
Returns scroll bar pressed thumb border color. |
void |
setThumbRolloverBackgroundColor(java.awt.Color color)
Sets scroll bar rollover thumb background color. |
void |
setThumbRolloverBorderColor(java.awt.Color color)
Sets scroll bar rollover thumb border color. |
void |
setThumbRound(int round)
Sets scroll bar thumb corners rounding. |
void |
setTrackBackgroundColor(java.awt.Color color)
Sets scroll bar track background color. |
void |
setTrackBorderColor(java.awt.Color color)
Sets scroll bar track border color. |
void |
setTrackBounds(java.awt.Rectangle bounds)
Sets scroll bar track bounds. |
void |
uninstall(E scrollbar)
Called when painter is intalled into some component. |
protected void |
updateThumbMargins()
Updates cached thumb margins. |
Methods inherited from class com.alee.extended.painter.AbstractPainter |
---|
addPainterListener, getPreferredSize, p, removePainterListener, 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, getPreferredSize, removePainterListener |
Field Detail |
---|
protected boolean paintButtons
protected boolean paintTrack
protected int thumbRound
protected java.awt.Insets thumbMargin
protected java.awt.Color trackBorderColor
protected java.awt.Color trackBackgroundColor
protected java.awt.Color thumbBorderColor
protected java.awt.Color thumbBackgroundColor
protected java.awt.Color thumbDisabledBorderColor
protected java.awt.Color thumbDisabledBackgroundColor
protected java.awt.Color thumbRolloverBorderColor
protected java.awt.Color thumbRolloverBackgroundColor
protected java.awt.Color thumbPressedBorderColor
protected java.awt.Color thumbPressedBackgroundColor
protected boolean animated
protected WebTimer rolloverAnimator
protected float rolloverState
protected boolean rollover
protected boolean pressed
protected boolean dragged
protected java.awt.Rectangle trackBounds
protected java.awt.Rectangle thumbBounds
protected java.awt.Insets thumbMarginR
protected java.awt.Insets thumbMarginHL
protected java.awt.Insets thumbMarginHR
protected java.awt.event.MouseAdapter mouseAdapter
Constructor Detail |
---|
public WebScrollBarPainter()
Method Detail |
---|
public void install(E scrollbar)
install
in interface Painter<E extends javax.swing.JScrollBar>
install
in class AbstractPainter<E extends javax.swing.JScrollBar>
scrollbar
- component to processpublic void uninstall(E scrollbar)
uninstall
in interface Painter<E extends javax.swing.JScrollBar>
uninstall
in class AbstractPainter<E extends javax.swing.JScrollBar>
scrollbar
- component to processpublic boolean isPaintButtons()
public void setPaintButtons(boolean paint)
setPaintButtons
in interface ScrollBarPainter<E extends javax.swing.JScrollBar>
paint
- whether scroll bar arrow buttons are visible or notpublic boolean isPaintTrack()
public void setPaintTrack(boolean paint)
setPaintTrack
in interface ScrollBarPainter<E extends javax.swing.JScrollBar>
paint
- whether scroll bar track should be painted or notpublic int getThumbRound()
public void setThumbRound(int round)
round
- new scroll bar thumb corners roundingpublic java.awt.Insets getThumbMargin()
public void setThumbMargin(java.awt.Insets margin)
margin
- new scroll bar thumb marginprotected void updateThumbMargins()
public java.awt.Color getTrackBorderColor()
public void setTrackBorderColor(java.awt.Color color)
color
- new scroll bar track border colorpublic java.awt.Color getTrackBackgroundColor()
public void setTrackBackgroundColor(java.awt.Color color)
color
- new scroll bar track background colorpublic java.awt.Color getThumbBorderColor()
public void setThumbBorderColor(java.awt.Color color)
color
- new scroll bar thumb border colorpublic java.awt.Color getThumbBackgroundColor()
public void setThumbBackgroundColor(java.awt.Color color)
color
- new scroll bar thumb background colorpublic java.awt.Color getThumbDisabledBorderColor()
public void setThumbDisabledBorderColor(java.awt.Color color)
color
- new disabled scroll bar thumb border colorpublic java.awt.Color getThumbDisabledBackgroundColor()
public void setThumbDisabledBackgroundColor(java.awt.Color color)
color
- new disabled scroll bar thumb background colorpublic java.awt.Color getThumbRolloverBorderColor()
public void setThumbRolloverBorderColor(java.awt.Color color)
color
- new scroll bar rollover thumb border colorpublic java.awt.Color getThumbRolloverBackgroundColor()
public void setThumbRolloverBackgroundColor(java.awt.Color color)
color
- new scroll bar rollover thumb background colorpublic java.awt.Color getThumbPressedBorderColor()
public void setThumbPressedBorderColor(java.awt.Color color)
color
- new scroll bar pressed thumb border colorpublic java.awt.Color getThumbPressedBackgroundColor()
public void setThumbPressedBackgroundColor(java.awt.Color color)
color
- new scroll bar pressed thumb background colorpublic boolean isRollover()
public void setRollover(boolean rollover)
rollover
- whether scroll bar thumb is in rollover state or notpublic boolean isPressed()
public void setPressed(boolean pressed)
pressed
- whether scroll bar thumb is pressed or notpublic void setDragged(boolean dragged)
setDragged
in interface ScrollBarPainter<E extends javax.swing.JScrollBar>
dragged
- whether scroll bar thumb is being dragged or notpublic void setTrackBounds(java.awt.Rectangle bounds)
setTrackBounds
in interface ScrollBarPainter<E extends javax.swing.JScrollBar>
bounds
- new scroll bar track boundspublic void setThumbBounds(java.awt.Rectangle bounds)
setThumbBounds
in interface ScrollBarPainter<E extends javax.swing.JScrollBar>
bounds
- new scroll bar thumb boundspublic java.lang.Boolean isOpaque(E scrollbar)
isOpaque
in interface Painter<E extends javax.swing.JScrollBar>
isOpaque
in class AbstractPainter<E extends javax.swing.JScrollBar>
scrollbar
- component to process
public java.awt.Insets getMargin(E scrollbar)
getMargin
in interface Painter<E extends javax.swing.JScrollBar>
getMargin
in class AbstractPainter<E extends javax.swing.JScrollBar>
scrollbar
- component to process
public void paint(java.awt.Graphics2D g2d, java.awt.Rectangle bounds, E scrollbar)
paint
in interface Painter<E extends javax.swing.JScrollBar>
g2d
- component graphicsbounds
- bounds for painter visual datascrollbar
- component to processprotected void paintBackground(java.awt.Graphics2D g2d, E scrollbar, java.awt.Rectangle bounds)
g2d
- graphics contextscrollbar
- scroll barbounds
- scroll bar boundsprotected void paintTrack(java.awt.Graphics2D g2d, E scrollbar, java.awt.Rectangle bounds)
g2d
- graphics contextscrollbar
- scroll barbounds
- track boundsprotected void paintThumb(java.awt.Graphics2D g2d, E scrollbar, java.awt.Rectangle bounds)
g2d
- graphics contextscrollbar
- scroll bar componentbounds
- thumb boundsprotected java.awt.Insets getCurrentThumbMargin(E scrollbar)
scrollbar
- scroll bar component
protected java.awt.Color getCurrentThumbBorderColor(E scrollbar)
scrollbar
- scroll bar component
protected java.awt.Color getCurrentThumbBackgroundColor(E scrollbar)
scrollbar
- scroll bar component
public void repaintThumb()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |