|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jdesktop.swingx.renderer.ComponentProvider<JLabel>
org.jdesktop.swingx.renderer.LabelProvider
public class LabelProvider
A component provider which uses a JLabel
as rendering
component.
It configures the Label's text and icon property from the StringValue.
StringValue
,
FormatStringValue
,
IconValue
,
Serialized FormField Summary |
---|
Fields inherited from class org.jdesktop.swingx.renderer.ComponentProvider |
---|
alignment, defaultVisuals, formatter, rendererComponent |
Constructor Summary | |
---|---|
LabelProvider()
Instantiates a LabelProvider with default to-String converter and LEADING horizontal alignment . |
|
LabelProvider(int alignment)
Instantiates a LabelProvider with default to-String converter and given horizontal alignment. |
|
LabelProvider(StringValue converter)
Instantiates a LabelProvider with the given to-String converter and LEADING horizontal alignment. |
|
LabelProvider(StringValue converter,
int alignment)
Instantiates a LabelProvider with given to-String converter and given horizontal alignment. |
Method Summary | |
---|---|
protected void |
configureState(CellContext context)
Configures the renderering component's state from the given cell context. |
protected JLabel |
createRendererComponent()
Factory method to create and return the component to use for rendering. |
protected void |
format(CellContext context)
Formats the renderering component's content from the given cell context. |
Methods inherited from class org.jdesktop.swingx.renderer.ComponentProvider |
---|
configureContent, configureVisuals, createDefaultVisuals, getDefaultVisuals, getHorizontalAlignment, getRendererComponent, getString, getStringValue, getValueAsIcon, getValueAsString, setHorizontalAlignment, setStringValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LabelProvider()
public LabelProvider(StringValue converter)
converter
- the converter to use for mapping the cell value to a
String representation.public LabelProvider(int alignment)
alignment
- the horizontal alignment.public LabelProvider(StringValue converter, int alignment)
converter
- the converter to use for mapping the cell value to a
String representation.alignment
- the horizontal alignment.Method Detail |
---|
protected JLabel createRendererComponent()
createRendererComponent
in class ComponentProvider<JLabel>
protected void configureState(CellContext context)
configureState
in class ComponentProvider<JLabel>
context
- the cell context to configure from, must not be null.protected void format(CellContext context)
format
in class ComponentProvider<JLabel>
context
- the cellContext to useComponentProvider.getValueAsString(CellContext)
,
ComponentProvider.getValueAsIcon(CellContext)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |