com.alee.managers.style.skin.web
Class WebBreadcrumbLabelPainter<E extends WebBreadcrumbLabel>

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.WebBreadcrumbLabelPainter<E>
All Implemented Interfaces:
Painter<E>, SpecificPainter, LabelPainter<E>

public class WebBreadcrumbLabelPainter<E extends WebBreadcrumbLabel>
extends WebLabelPainter<E>

Custom painter for WebBreadcrumbLabel component.

Author:
Mikle Garin

Field Summary
protected  AncestorAdapter ancestorAdapter
           
protected  WebBreadcrumb breadcrumb
          Runtime variables.
protected  java.awt.event.ContainerAdapter containerAdapter
          Listeners.
 
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
WebBreadcrumbLabelPainter()
           
 
Method Summary
 java.awt.Insets getMargin(E label)
          Returns margin required for visual data provided by this painter.
 void install(E c)
          Called when painter is intalled into some component.
 java.lang.Boolean isOpaque(E c)
          Returns whether visual data provided by this painter is opaque or not.
 void paint(java.awt.Graphics2D g2d, java.awt.Rectangle bounds, E c)
          Paints visual data onto the component graphics.
protected  void removeBreadcrumbAdapter()
          Removes ContainerAdapter from parent breadcrumb if it exists.
 void uninstall(E c)
          Called when painter is intalled into some component.
 
Methods inherited from class com.alee.managers.style.skin.web.WebLabelPainter
getBackgroundPainter, getPreferredSize, getShadeColor, getTransparency, isDrawShade, layout, layoutCL, paintDisabledText, paintEnabledText, paintShadowText, setBackgroundPainter, setDrawShade, setShadeColor, setTransparency
 
Methods inherited from class com.alee.extended.painter.AbstractPainter
addPainterListener, 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, removePainterListener
 

Field Detail

containerAdapter

protected java.awt.event.ContainerAdapter containerAdapter
Listeners.


ancestorAdapter

protected AncestorAdapter ancestorAdapter

breadcrumb

protected WebBreadcrumb breadcrumb
Runtime variables.

Constructor Detail

WebBreadcrumbLabelPainter

public WebBreadcrumbLabelPainter()
Method Detail

install

public void install(E c)
Called when painter is intalled into some component. You might want to use this method to add custom component listeners or modify component settings.

Specified by:
install in interface Painter<E extends WebBreadcrumbLabel>
Overrides:
install in class AbstractPainter<E extends WebBreadcrumbLabel>
Parameters:
c - component to process

uninstall

public void uninstall(E c)
Called when painter is intalled into some component. You might want to use this method to add custom component listeners or modify component settings.

Specified by:
uninstall in interface Painter<E extends WebBreadcrumbLabel>
Overrides:
uninstall in class AbstractPainter<E extends WebBreadcrumbLabel>
Parameters:
c - component to process

removeBreadcrumbAdapter

protected void removeBreadcrumbAdapter()
Removes ContainerAdapter from parent breadcrumb if it exists.


isOpaque

public java.lang.Boolean isOpaque(E c)
Returns whether visual data provided by this painter is opaque or not. Returned value might affect component opacity depending on painter support inside that component UI. Simply return null if you don't want to change default component opacity.

Specified by:
isOpaque in interface Painter<E extends WebBreadcrumbLabel>
Overrides:
isOpaque in class WebLabelPainter<E extends WebBreadcrumbLabel>
Parameters:
c - component to process
Returns:
true if visual data provided by this painter is opaque, false otherwise

getMargin

public java.awt.Insets getMargin(E label)
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 WebBreadcrumbLabel>
Overrides:
getMargin in class WebLabelPainter<E extends WebBreadcrumbLabel>
Parameters:
label - 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 WebBreadcrumbLabel>
Overrides:
paint in class WebLabelPainter<E extends WebBreadcrumbLabel>
Parameters:
g2d - component graphics
bounds - bounds for painter visual data
c - component to process