com.alee.extended.painter
Class InnerShadePainter<E extends javax.swing.JComponent>
java.lang.Object
com.alee.extended.painter.AbstractPainter<E>
com.alee.extended.painter.NinePatchIconPainter<E>
com.alee.extended.painter.InnerShadePainter<E>
- All Implemented Interfaces:
- Painter<E>
public class InnerShadePainter<E extends javax.swing.JComponent>
- extends NinePatchIconPainter<E>
- Author:
- Mikle Garin
Methods inherited from class com.alee.extended.painter.AbstractPainter |
addPainterListener, 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 |
shadeWidth
protected int shadeWidth
round
protected int round
shadeOpacity
protected float shadeOpacity
drawTop
protected boolean drawTop
drawLeft
protected boolean drawLeft
drawBottom
protected boolean drawBottom
drawRight
protected boolean drawRight
cachedShadeWidth
protected int cachedShadeWidth
cachedRound
protected int cachedRound
cachedShadeOpacity
protected float cachedShadeOpacity
InnerShadePainter
public InnerShadePainter()
InnerShadePainter
public InnerShadePainter(int shadeWidth,
int round,
float shadeOpacity)
InnerShadePainter
public InnerShadePainter(boolean drawTop,
boolean drawLeft,
boolean drawBottom,
boolean drawRight)
updateNinePatchIcon
protected void updateNinePatchIcon()
getShadeWidth
public int getShadeWidth()
setShadeWidth
public InnerShadePainter<E> setShadeWidth(int shadeWidth)
getRound
public int getRound()
setRound
public InnerShadePainter<E> setRound(int round)
getShadeOpacity
public float getShadeOpacity()
setShadeOpacity
public InnerShadePainter<E> setShadeOpacity(float shadeOpacity)
isDrawTop
public boolean isDrawTop()
setDrawTop
public InnerShadePainter<E> setDrawTop(boolean drawTop)
isDrawLeft
public boolean isDrawLeft()
setDrawLeft
public InnerShadePainter<E> setDrawLeft(boolean drawLeft)
isDrawBottom
public boolean isDrawBottom()
setDrawBottom
public InnerShadePainter<E> setDrawBottom(boolean drawBottom)
isDrawRight
public boolean isDrawRight()
setDrawRight
public InnerShadePainter<E> setDrawRight(boolean drawRight)
setDrawSides
public InnerShadePainter<E> setDrawSides(boolean drawTop,
boolean drawLeft,
boolean drawBottom,
boolean drawRight)
getMargin
public java.awt.Insets getMargin(E c)
- Returns margin required for visual data provided by this painter.
This margin is usually added to component's margin when the final component border is calculated.
You may pass null instead of zero margin - it will simply be ignored in that case.
- Specified by:
getMargin
in interface Painter<E extends javax.swing.JComponent>
- Overrides:
getMargin
in class NinePatchIconPainter<E extends javax.swing.JComponent>
- Parameters:
c
- component to process
- Returns:
- margin required for visual data provided by this painter or null for zero margin
paint
public void paint(java.awt.Graphics2D g2d,
java.awt.Rectangle bounds,
E c)
- 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.JComponent>
- Overrides:
paint
in class NinePatchIconPainter<E extends javax.swing.JComponent>
- Parameters:
g2d
- component graphicsbounds
- bounds for painter visual datac
- component to process