public final class Ellipses
extends java.lang.Object
This will work for standard JLabels and labels type renderers used in trees, lists and tables, e.g. DefaultListCellRenderer.
Currently supported locations are: SwingConstants.LEADING, SwingConstants.CENTER, SwingConstants.TRAILING.
Modifier and Type | Method and Description |
---|---|
static void |
setEllipsesLocation(javax.swing.JLabel label,
int ellipsesLocation)
Adapt a label based component or renderer so that the '...' truncation elipses appear at a custom
location rather than always at the end.
|
public static void setEllipsesLocation(javax.swing.JLabel label, int ellipsesLocation)
This will work for standard JLabels and labels type renderers used in lists and tables, e.g. DefaultListCellRenderer.
Currently supported locations are: SwingConstants.LEADING, SwingConstants.CENTER, SwingConstants.TRAILING.
label
- the label to adapt.ellipsesLocation
- SwingConstants.LEADING, SwingConstants.CENTER, SwingConstants.TRAILING