com.alee.laf.table.editors
Class GenericCellEditorPainter

java.lang.Object
  extended by com.alee.extended.painter.AbstractPainter<GenericCellEditor>
      extended by com.alee.laf.table.editors.GenericCellEditorPainter
All Implemented Interfaces:
Painter<GenericCellEditor>

public class GenericCellEditorPainter
extends AbstractPainter<GenericCellEditor>

Custom painter to provide visual feedback for invalid editor cells.

Author:
Mikle Garin
See Also:
AbstractPainter, Painter

Field Summary
 
Fields inherited from class com.alee.extended.painter.AbstractPainter
listeners, margin, opaque, preferredSize
 
Constructor Summary
GenericCellEditorPainter()
          Constructs new generic cell editor painter.
 
Method Summary
 java.awt.Insets getMargin(GenericCellEditor c)
          Returns margin required for visual data provided by this painter.
 void paint(java.awt.Graphics2D g2d, java.awt.Rectangle bounds, GenericCellEditor c)
          Paints visual data onto the component graphics.
 
Methods inherited from class com.alee.extended.painter.AbstractPainter
addPainterListener, getPreferredSize, 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
 

Constructor Detail

GenericCellEditorPainter

public GenericCellEditorPainter()
Constructs new generic cell editor painter.

Method Detail

getMargin

public java.awt.Insets getMargin(GenericCellEditor 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<GenericCellEditor>
Overrides:
getMargin in class AbstractPainter<GenericCellEditor>
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,
                  GenericCellEditor 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.

Parameters:
g2d - component graphics
bounds - bounds for painter visual data
c - component to process