class TextCrossingPainter<T extends JComponent> extends AbstractPainter<T>
AbstractPainter.Interpolation
Modifier and Type | Field and Description |
---|---|
(package private) Color |
crossColor |
(package private) Insets |
insetss |
(package private) Rectangle |
paintIconR |
(package private) Rectangle |
paintTextR |
(package private) Rectangle |
paintViewR |
Constructor and Description |
---|
TextCrossingPainter() |
Modifier and Type | Method and Description |
---|---|
protected void |
doPaint(Graphics2D g,
JComponent comp,
int width,
int height)
Subclasses must implement this method and perform custom painting operations
here.
|
private void |
doPaint(Graphics2D g,
Rectangle r) |
Color |
getForeground()
Returns the color to use for painting the cross.
|
void |
setForeground(Color crossColor) |
clearCache, configureGraphics, getFilters, getInterpolation, isAntialiasing, isCacheable, isDirty, isVisible, paint, setAntialiasing, setCacheable, setDirty, setFilters, setInterpolation, setVisible, shouldUseCache, validate
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, clone, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener
Rectangle paintIconR
Rectangle paintViewR
Rectangle paintTextR
Color crossColor
TextCrossingPainter()
protected void doPaint(Graphics2D g, JComponent comp, int width, int height)
Paints a diagonal cross over the text if the comp is of type JLabel, does nothing otherwise.
doPaint
in class AbstractPainter<T extends JComponent>
g
- The Graphics2D object in which to paintprivate void doPaint(Graphics2D g, Rectangle r)
public void setForeground(Color crossColor)
crossColor
- the color to paint the cross withpublic Color getForeground()
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses