com.alee.managers.style.skin.web
Class WebVerticalLabelPainter<E extends javax.swing.JLabel>
java.lang.Object
com.alee.extended.painter.AbstractPainter<E>
com.alee.managers.style.skin.web.WebLabelPainter<E>
com.alee.managers.style.skin.web.WebVerticalLabelPainter<E>
- All Implemented Interfaces:
- Painter<E>, SpecificPainter, LabelPainter<E>
public class WebVerticalLabelPainter<E extends javax.swing.JLabel>
- extends WebLabelPainter<E>
Web-style painter for WebVerticalLabel component.
It is used as WebVerticalLabelUI default painter.
- Author:
- Mikle Garin
Method Summary |
protected java.awt.Rectangle |
copyRectangle(java.awt.Rectangle from,
java.awt.Rectangle to)
Returns rectangle copy. |
java.awt.Dimension |
getPreferredSize(E label)
Returns preferred size required for proper painting of visual data provided by this painter. |
protected java.lang.String |
layoutCL(E label,
java.awt.FontMetrics fontMetrics,
java.lang.String text,
javax.swing.Icon icon,
java.awt.Rectangle viewR,
java.awt.Rectangle iconR,
java.awt.Rectangle textR)
Performs label layout and returns clipped or full label text. |
protected java.awt.Dimension |
transposeDimension(java.awt.Dimension from)
Returns transposed dimension. |
protected java.awt.Rectangle |
transposeRectangle(java.awt.Rectangle from,
java.awt.Rectangle to)
Returns transposed rectangle. |
Methods inherited from class com.alee.managers.style.skin.web.WebLabelPainter |
getBackgroundPainter, getMargin, getShadeColor, getTransparency, isDrawShade, isOpaque, layout, paint, 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 |
verticalViewR
protected java.awt.Rectangle verticalViewR
- Runtime variables.
verticalIconR
protected java.awt.Rectangle verticalIconR
verticalTextR
protected java.awt.Rectangle verticalTextR
WebVerticalLabelPainter
public WebVerticalLabelPainter()
layoutCL
protected java.lang.String layoutCL(E label,
java.awt.FontMetrics fontMetrics,
java.lang.String text,
javax.swing.Icon icon,
java.awt.Rectangle viewR,
java.awt.Rectangle iconR,
java.awt.Rectangle textR)
- Performs label layout and returns clipped or full label text.
- Overrides:
layoutCL
in class WebLabelPainter<E extends javax.swing.JLabel>
- Parameters:
label
- label to processfontMetrics
- label font metricstext
- label texticon
- label iconviewR
- rectangle limited by label insetsiconR
- icon rectangle dummytextR
- text rectangle dummy
- Returns:
- clipped or full label text
transposeRectangle
protected java.awt.Rectangle transposeRectangle(java.awt.Rectangle from,
java.awt.Rectangle to)
- Returns transposed rectangle.
If destination rectangle is null it will be created.
- Parameters:
from
- rectangle to transposeto
- destination rectangle
- Returns:
- transposed rectangle
copyRectangle
protected java.awt.Rectangle copyRectangle(java.awt.Rectangle from,
java.awt.Rectangle to)
- Returns rectangle copy.
If destination rectangle is null it will be created.
- Parameters:
from
- rectangle to copyto
- destination rectangle
- Returns:
- rectangle copy
getPreferredSize
public java.awt.Dimension getPreferredSize(E label)
- Returns preferred size required for proper painting of visual data provided by this painter.
This should not take into account any sizes not related to this painter settings (for example text size on button).
- Specified by:
getPreferredSize
in interface Painter<E extends javax.swing.JLabel>
- Overrides:
getPreferredSize
in class WebLabelPainter<E extends javax.swing.JLabel>
- Parameters:
label
- component to process
- Returns:
- preferred size required for proper painting of visual data provided by this painter
transposeDimension
protected java.awt.Dimension transposeDimension(java.awt.Dimension from)
- Returns transposed dimension.
- Parameters:
from
- dimension to transpose
- Returns:
- transposed dimension