java.io.Serializable
public class LabelProvider extends ComponentProvider<javax.swing.JLabel>
JLabel
as rendering
component. It configures the Label's text and icon property from the StringValue.
StringValue
,
FormatStringValue
,
IconValue
,
Serialized Formalignment, defaultVisuals, formatter, rendererComponent
Constructor | Description |
---|---|
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.
|
Modifier and Type | Method | Description |
---|---|---|
protected void |
configureState(CellContext context) |
Configures the renderering component's state from the
given cell context.
|
protected javax.swing.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.
|
configureContent, configureVisuals, createDefaultVisuals, getDefaultVisuals, getHorizontalAlignment, getRendererComponent, getString, getStringValue, getValueAsIcon, getValueAsString, setHorizontalAlignment, setStringValue
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.protected javax.swing.JLabel createRendererComponent()
createRendererComponent
in class ComponentProvider<javax.swing.JLabel>
protected void configureState(CellContext context)
configureState
in class ComponentProvider<javax.swing.JLabel>
context
- the cell context to configure from, must not be null.protected void format(CellContext context)
format
in class ComponentProvider<javax.swing.JLabel>
context
- the cellContext to useComponentProvider.getValueAsString(CellContext)
,
ComponentProvider.getValueAsIcon(CellContext)