|
||||||||||
| 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: the painter support will be switched to painter_work as soon it enters main.
| 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.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
protected Painter |
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()
|
|
| 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 |
isOpaque()
Returns true if this component is completely opaque. |
protected void |
paintComponent(Graphics g)
Calls the UI delegate's paint method, if the UI delegate is non- null. |
protected void |
paintComponentWithPainter(Graphics2D g)
PRE: painter != null |
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)
Registers the text to display in a tool tip. |
void |
validate()
Overridden for performance reasons. |
| Methods inherited from class javax.swing.JCheckBox |
|---|
configurePropertiesFromAction, createActionPropertyChangeListener, 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()
An opaque component paints every pixel within its rectangular bounds. A non-opaque component paints only a subset of its pixels or none at all, allowing the pixels underneath it to "show through". Therefore, a component that does not fully paint its pixels provides a degree of transparency.
Subclasses that guarantee to always completely paint their contents should override this method and return true.
Overridden to return true if there is no painter.
isOpaque in class JComponentJComponent.setOpaque(boolean)public void setToolTipText(String text)
See How to Use Tool Tips in The Java Tutorial for further documentation.
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 JComponenttext - the string to display; if the text is null,
the tool tip is turned off for this componentJComponent.TOOL_TIP_TEXT_KEYprotected void paintComponent(Graphics g)
javax.swing.JComponentnull. We pass the delegate a copy of the
Graphics object to protect the rest of the
paint code from irrevocable changes
(for example, Graphics.translate).
If you override this in a subclass you should not make permanent
changes to the passed in Graphics. For example, you
should not alter the clip Rectangle or modify the
transform. If you need to do these operations you may find it
easier to create a new Graphics from the passed in
Graphics and manipulate it. Further, if you do not
invoker super's implementation you must honor the opaque property,
that is
if this component is opaque, you must completely fill in the background
in a non-opaque color. If you do not honor the opaque property you
will likely see visual artifacts.
The passed in Graphics object might
have a transform other than the identify transform
installed on it. In this case, you might get
unexpected results if you cumulatively apply
another transform.
paintComponent in class JComponentg - the Graphics object to protectJComponent.paint(java.awt.Graphics),
ComponentUIprotected void paintComponentWithPainter(Graphics2D g)
g - public void invalidate()
invalidate in class ContainerContainer.validate(),
Container.layout(),
LayoutManagerpublic void validate()
validate in class ContainerContainer.add(java.awt.Component),
Component.invalidate(),
JComponent.revalidate()public void revalidate()
revalidate in class JComponentComponent.invalidate(),
Container.validate(),
JComponent.isValidateRoot(),
RepaintManager.addInvalidComponent(javax.swing.JComponent)
public void repaint(long tm,
int x,
int y,
int width,
int height)
repaint in class JComponenttm - this parameter is not usedx - the x value of the dirty regiony - the y value of the dirty regionwidth - the width of the dirty regionheight - the height of the dirty regionComponent.isShowing(),
RepaintManager.addDirtyRegion(javax.swing.JComponent, int, int, int, int)public void repaint(Rectangle r)
repaint in class JComponentr - a Rectangle containing the dirty regionComponent.isShowing(),
RepaintManager.addDirtyRegion(javax.swing.JComponent, int, int, int, int)public void repaint()
repaint in class ComponentComponent.update(Graphics)
protected void firePropertyChange(String propertyName,
Object oldValue,
Object newValue)
firePropertyChange in class ComponentpropertyName - the property whose value has changedoldValue - the property's previous valuenewValue - the property's new value
public void firePropertyChange(String propertyName,
boolean oldValue,
boolean newValue)
firePropertyChange in class JComponentpropertyName - the property whose value has changedoldValue - the property's previous valuenewValue - the property's new value
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||