Package org.jdesktop.swingx.plaf.basic
Class TextCrossingPainter<T extends javax.swing.JComponent>
- java.lang.Object
-
- org.jdesktop.beans.AbstractBean
-
- org.jdesktop.swingx.painter.AbstractPainter<T>
-
- org.jdesktop.swingx.plaf.basic.TextCrossingPainter<T>
-
- All Implemented Interfaces:
Painter<T>
class TextCrossingPainter<T extends javax.swing.JComponent> extends AbstractPainter<T>
Painter used to cross-out unselectable dates. PENDING JW: subclass (or maybe even use?) one of the painter subclasses.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jdesktop.swingx.painter.AbstractPainter
AbstractPainter.Interpolation
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.awt.Color
crossColor
(package private) java.awt.Insets
insetss
(package private) java.awt.Rectangle
paintIconR
(package private) java.awt.Rectangle
paintTextR
(package private) java.awt.Rectangle
paintViewR
-
Constructor Summary
Constructors Constructor Description TextCrossingPainter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
doPaint(java.awt.Graphics2D g, java.awt.Rectangle r)
protected void
doPaint(java.awt.Graphics2D g, javax.swing.JComponent comp, int width, int height)
Subclasses must implement this method and perform custom painting operations here.java.awt.Color
getForeground()
Returns the color to use for painting the cross.void
setForeground(java.awt.Color crossColor)
-
Methods inherited from class org.jdesktop.swingx.painter.AbstractPainter
clearCache, configureGraphics, getFilters, getInterpolation, isAntialiasing, isCacheable, isDirty, isVisible, paint, setAntialiasing, setCacheable, setDirty, setFilters, setInterpolation, setVisible, shouldUseCache, validate
-
Methods inherited from class org.jdesktop.beans.AbstractBean
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, clone, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener
-
-
-
-
Method Detail
-
doPaint
protected void doPaint(java.awt.Graphics2D g, javax.swing.JComponent comp, int width, int height)
Subclasses must implement this method and perform custom painting operations here.Paints a diagonal cross over the text if the comp is of type JLabel, does nothing otherwise.
- Specified by:
doPaint
in classAbstractPainter<T extends javax.swing.JComponent>
- Parameters:
g
- The Graphics2D object in which to paint
-
doPaint
private void doPaint(java.awt.Graphics2D g, java.awt.Rectangle r)
-
setForeground
public void setForeground(java.awt.Color crossColor)
- Parameters:
crossColor
- the color to paint the cross with
-
getForeground
public java.awt.Color getForeground()
Returns the color to use for painting the cross.- Returns:
- the color used for painting.
-
-