|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jdesktop.swingx.renderer.DefaultVisuals<T>
public class DefaultVisuals<T extends javax.swing.JComponent>
Encapsulates the default visual configuration of renderering components,
respecting the state of the passed-in CellContext. It's
basically re-usable across all types of renderees (JTable, JList, JTree).
Guarantees to completely configure the default visual properties (listed
below) of a given component. As a consequence, client code (f.i. in
Highlighters) can safely change them without long-lasting
visual artefacts.
PENDING: allow mutators for overruling the CellContexts
defaults? Would prefer not to, as in the context of SwingX visual config on
the renderer level is discouraged (the way to go are Highlighters.
PENDING: not yet quite decided whether the toolTipText property belongs into the visual default config. Doing so gives client code the choice to set it either in a Highlighter or a custom ComponentProvider.
CellContext,
Serialized Form| Constructor Summary | |
|---|---|
DefaultVisuals()
|
|
| Method Summary | |
|---|---|
void |
configureVisuals(T renderingComponent,
CellContext context)
Configures all default visual state of the rendering component from the given cell context. |
void |
setBackground(java.awt.Color c)
Sets the renderer's unselected-background color to the specified color. |
void |
setForeground(java.awt.Color c)
Sets the renderer's unselected-foreground color to the specified color. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultVisuals()
| Method Detail |
|---|
public void setForeground(java.awt.Color c)
not null this color will overrule the default color of
the CellContext.
c - set the foreground color to this valuepublic void setBackground(java.awt.Color c)
not null this color will overrule the default color of
the CellContext.
c - set the background color to this value
public void configureVisuals(T renderingComponent,
CellContext context)
renderingComponent - the component to configure, must not be nullcontext - the cell context to configure from, must not be null
java.lang.NullPointerException - if either renderingComponent or cellContext
is null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||