Package org.jdesktop.swingx.plaf.basic
Class TextCrossingPainter<T extends 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>
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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
doPaint
(Graphics2D g, Rectangle r) protected void
doPaint
(Graphics2D g, JComponent comp, int width, int height) Subclasses must implement this method and perform custom painting operations here.Returns the color to use for painting the cross.void
setForeground
(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
-
Field Details
-
Constructor Details
-
TextCrossingPainter
TextCrossingPainter()
-
-
Method Details
-
doPaint
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 JComponent>
- Parameters:
g
- The Graphics2D object in which to paintcomp
-width
-height
-
-
doPaint
-
setForeground
- Parameters:
crossColor
- the color to paint the cross with
-
getForeground
Returns the color to use for painting the cross.- Returns:
- the color used for painting.
-