com.alee.managers.style.skin.ninepatch
Class NPPanelPainter<E extends javax.swing.JPanel>

java.lang.Object
  extended by com.alee.extended.painter.AbstractPainter<E>
      extended by com.alee.managers.style.skin.ninepatch.NPDecorationPainter<E>
          extended by com.alee.managers.style.skin.ninepatch.NPPanelPainter<E>
All Implemented Interfaces:
Painter<E>, PartialDecoration, SpecificPainter, PanelPainter<E>

public class NPPanelPainter<E extends javax.swing.JPanel>
extends NPDecorationPainter<E>
implements PanelPainter<E>

Base 9-patch painter for JPanel component.

Author:
Mikle Garin

Field Summary
 
Fields inherited from class com.alee.managers.style.skin.ninepatch.NPDecorationPainter
backgroundIcon, bottomSeparatorIcon, detectSideByContentPatches, focused, focusedBackgroundIcon, focusTracker, hiddenSideSpacing, leftSeparatorIcon, paintBottom, paintBottomLine, paintFocus, paintLeft, paintLeftLine, paintRight, paintRightLine, paintTop, paintTopLine, rightSeparatorIcon, separatorIcon, topSeparatorIcon, undecorated
 
Fields inherited from class com.alee.extended.painter.AbstractPainter
listeners, margin, opaque, preferredSize
 
Constructor Summary
NPPanelPainter()
           
 
Method Summary
 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.
 
Methods inherited from class com.alee.managers.style.skin.ninepatch.NPDecorationPainter
getBackgroundBounds, getBackgroundIcon, getBottomSeparatorIcon, getCurrentBackgroundIcon, getCurrentBottomSeparatorIcon, getCurrentLeftSeparatorIcon, getCurrentRightSeparatorIcon, getCurrentTopSeparatorIcon, getFocusedBackgroundIcon, getHiddenSideSpacing, getLeftSeparatorIcon, getMargin, getRightSeparatorIcon, getSeparatorIcon, getTopSeparatorIcon, install, isAnyLineShouldBePainted, isBottomLineShouldBePainted, isDetectSideByContentPatches, isLeftLineShouldBePainted, isPaintBottom, isPaintBottomLine, isPaintFocus, isPaintLeft, isPaintLeftLine, isPaintRight, isPaintRightLine, isPaintTop, isPaintTopLine, isRightLineShouldBePainted, isTopLineShouldBePainted, isUndecorated, setBackgroundIcon, setBottomSeparatorIcon, setDetectSideByContentPatches, setFocusedBackgroundIcon, setHiddenSideSpacing, setLeftSeparatorIcon, setPaintBottom, setPaintBottomLine, setPaintFocus, setPaintLeft, setPaintLeftLine, setPaintRight, setPaintRightLine, setPaintSideLines, setPaintSides, setPaintTop, setPaintTopLine, setRightSeparatorIcon, setSeparatorIcon, setTopSeparatorIcon, setUndecorated, uninstall
 
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.laf.panel.PanelPainter
setPaintFocus, setUndecorated
 
Methods inherited from interface com.alee.extended.painter.Painter
addPainterListener, getMargin, getPreferredSize, install, removePainterListener, uninstall
 
Methods inherited from interface com.alee.extended.painter.PartialDecoration
setPaintBottom, setPaintBottomLine, setPaintLeft, setPaintLeftLine, setPaintRight, setPaintRightLine, setPaintSideLines, setPaintSides, setPaintTop, setPaintTopLine
 

Constructor Detail

NPPanelPainter

public NPPanelPainter()
Method Detail

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 javax.swing.JPanel>
Overrides:
isOpaque in class AbstractPainter<E extends javax.swing.JPanel>
Parameters:
c - component to process
Returns:
true if visual data provided by this painter is opaque, false otherwise

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.JPanel>
Overrides:
paint in class NPDecorationPainter<E extends javax.swing.JPanel>
Parameters:
g2d - component graphics
bounds - bounds for painter visual data
c - component to process