|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.AbstractButton
javax.swing.JToggleButton
javax.swing.JCheckBox
org.jdesktop.swingx.renderer.JRendererCheckBox
public class JRendererCheckBox
A JCheckBox optimized for usage in renderers and
with a minimal background painter support.
Note: As of revision #4223, there's a complete overhaul (aka: changed the tricksery) to fix Issue swingx-1513 (allow client code to set renderer transparent) while keeping fix Issue swingx-897 (striping/background lost when painter installed)
Note: The change of logic _did_ introduce a regression (swingx-1546) which was fixed by forcing the box's opacity to true (for regression release 1.6.5-1). Further improvements (like f.i. the option to delegate to the ui's update - to allow LAF installed painters - instead of paint) are deferred to a later normal release, more discussions needed.
paintComponent(Graphics),
Serialized Form| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JCheckBox |
|---|
JCheckBox.AccessibleJCheckBox |
| Nested classes/interfaces inherited from class javax.swing.JToggleButton |
|---|
JToggleButton.AccessibleJToggleButton, JToggleButton.ToggleButtonModel |
| Nested classes/interfaces inherited from class javax.swing.AbstractButton |
|---|
AbstractButton.AccessibleAbstractButton, AbstractButton.ButtonChangeListener |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
protected Painter |
painter
the swingx painter |
| Fields inherited from class javax.swing.JCheckBox |
|---|
BORDER_PAINTED_FLAT_CHANGED_PROPERTY |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface javax.swing.SwingConstants |
|---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
JRendererCheckBox()
Instantiates a JRendererCheckBox with opacity true. |
|
| Method Summary | |
|---|---|
void |
firePropertyChange(String propertyName,
boolean oldValue,
boolean newValue)
Overridden for performance reasons. |
protected void |
firePropertyChange(String propertyName,
Object oldValue,
Object newValue)
Overridden for performance reasons. |
Painter |
getPainter()
|
void |
invalidate()
Overridden for performance reasons. |
boolean |
isContentAreaFilled()
|
boolean |
isOpaque()
|
protected void |
paintComponent(Graphics g)
Overridden to snatch painting from super if a painter installed or Nimbus detected. |
protected void |
paintComponentWithPainter(Graphics2D g)
|
void |
repaint()
Overridden for performance reasons. |
void |
repaint(long tm,
int x,
int y,
int width,
int height)
Overridden for performance reasons. |
void |
repaint(Rectangle r)
Overridden for performance reasons. |
void |
revalidate()
Overridden for performance reasons. |
void |
setPainter(Painter painter)
|
void |
setToolTipText(String text)
|
void |
validate()
Overridden for performance reasons. |
| Methods inherited from class javax.swing.JCheckBox |
|---|
getAccessibleContext, getUIClassID, isBorderPaintedFlat, paramString, setBorderPaintedFlat, updateUI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected Painter painter
| Constructor Detail |
|---|
public JRendererCheckBox()
| Method Detail |
|---|
public Painter getPainter()
getPainter in interface PainterAwarepublic void setPainter(Painter painter)
setPainter in interface PainterAwarepublic boolean isOpaque()
Overridden to return false if painting flag is true.
isOpaque in class JComponentpublic boolean isContentAreaFilled()
Overridden to return false if painting flag is true.
isContentAreaFilled in class AbstractButtonpublic void setToolTipText(String text)
Overridden to not automatically de/register itself from/to the ToolTipManager. As rendering component it is not considered to be active in any way, so the manager must not listen.
setToolTipText in class JComponentprotected void paintComponent(Graphics g)
The overall logic currently (since 1.6.5) is to simply call super without SwingX painter. Otherwise, that is with SwingX painter:
contentAreaFilled and
opaque return false
ui.paint(...)
paintComponent in class JComponentprotected void paintComponentWithPainter(Graphics2D g)
g - public void invalidate()
invalidate in class Containerpublic void validate()
validate in class Containerpublic void revalidate()
revalidate in class JComponent
public void repaint(long tm,
int x,
int y,
int width,
int height)
repaint in class JComponentpublic void repaint(Rectangle r)
repaint in class JComponentpublic void repaint()
repaint in class Component
protected void firePropertyChange(String propertyName,
Object oldValue,
Object newValue)
firePropertyChange in class Component
public void firePropertyChange(String propertyName,
boolean oldValue,
boolean newValue)
firePropertyChange in class JComponent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||