com.alee.managers.style.skin.web
Class WebVerticalLabelPainter<E extends javax.swing.JLabel>

java.lang.Object
  extended by com.alee.extended.painter.AbstractPainter<E>
      extended by com.alee.managers.style.skin.web.WebLabelPainter<E>
          extended by 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

Field Summary
protected  java.awt.Rectangle verticalIconR
           
protected  java.awt.Rectangle verticalTextR
           
protected  java.awt.Rectangle verticalViewR
          Runtime variables.
 
Fields inherited from class com.alee.managers.style.skin.web.WebLabelPainter
backgroundPainter, drawShade, paintIconR, paintTextR, shadeColor, transparency
 
Fields inherited from class com.alee.extended.painter.AbstractPainter
listeners, margin, opaque, preferredSize
 
Constructor Summary
WebVerticalLabelPainter()
           
 
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
 
Methods inherited from interface com.alee.extended.painter.Painter
addPainterListener, install, removePainterListener, uninstall
 

Field Detail

verticalViewR

protected java.awt.Rectangle verticalViewR
Runtime variables.


verticalIconR

protected java.awt.Rectangle verticalIconR

verticalTextR

protected java.awt.Rectangle verticalTextR
Constructor Detail

WebVerticalLabelPainter

public WebVerticalLabelPainter()
Method Detail

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 process
fontMetrics - label font metrics
text - label text
icon - label icon
viewR - rectangle limited by label insets
iconR - icon rectangle dummy
textR - 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 transpose
to - 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 copy
to - 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