public class LabelProvider extends ComponentProvider<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 and 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 and Description |
|---|---|
protected void |
configureState(CellContext context)
Configures the rendering 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.
|
configureContent, configureVisuals, createDefaultVisuals, getDefaultVisuals, getHorizontalAlignment, getRendererComponent, getString, getStringValue, getValueAsIcon, getValueAsString, setHorizontalAlignment, setStringValue, updateUIpublic 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 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)Copyright © 2017. All Rights Reserved.