org.jdesktop.swingx.renderer
Class LabelProvider

java.lang.Object
  extended by org.jdesktop.swingx.renderer.ComponentProvider<javax.swing.JLabel>
      extended by org.jdesktop.swingx.renderer.LabelProvider
All Implemented Interfaces:
java.io.Serializable

public class LabelProvider
extends ComponentProvider<javax.swing.JLabel>

A component provider which uses a JLabel as rendering component.

It configures the Label's text and icon property from the StringValue.

Author:
Jeanette Winzenburg
See Also:
StringValue, FormatStringValue, IconValue, Serialized Form

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
 
Methods inherited from class org.jdesktop.swingx.renderer.ComponentProvider
getHorizontalAlignment, getRendererComponent, getString, getStringValue, setHorizontalAlignment, setStringValue
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LabelProvider

public LabelProvider()
Instantiates a LabelProvider with default to-String converter and LEADING horizontal alignment .


LabelProvider

public LabelProvider(StringValue converter)
Instantiates a LabelProvider with the given to-String converter and LEADING horizontal alignment. If the converter is null, the default TO_STRING is used.

Parameters:
converter - the converter to use for mapping the cell value to a String representation.

LabelProvider

public LabelProvider(int alignment)
Instantiates a LabelProvider with default to-String converter and given horizontal alignment.

Parameters:
alignment - the horizontal alignment.

LabelProvider

public LabelProvider(StringValue converter,
                     int alignment)
Instantiates a LabelProvider with given to-String converter and given horizontal alignment. If the converter is null, the default TO_STRING is used.

Parameters:
converter - the converter to use for mapping the cell value to a String representation.
alignment - the horizontal alignment.