Allow custom Label derivations to be used with MultiLineLabel.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1907 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -80,7 +80,7 @@ public class MultiLineLabel extends JComponent
|
|||||||
*/
|
*/
|
||||||
public MultiLineLabel (String text, int align, int constrain, int size)
|
public MultiLineLabel (String text, int align, int constrain, int size)
|
||||||
{
|
{
|
||||||
_label = new Label(text);
|
_label = createLabel(text);
|
||||||
_label.setAlignment(align);
|
_label.setAlignment(align);
|
||||||
noteConstraints(constrain, size);
|
noteConstraints(constrain, size);
|
||||||
}
|
}
|
||||||
@@ -306,6 +306,14 @@ public class MultiLineLabel extends JComponent
|
|||||||
layoutLabel();
|
layoutLabel();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates the underlying {@link Label} that we use to render our text.
|
||||||
|
*/
|
||||||
|
protected Label createLabel (String text)
|
||||||
|
{
|
||||||
|
return new Label(text);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the label has changed in some meaningful way and we'd
|
* Called when the label has changed in some meaningful way and we'd
|
||||||
* accordingly like to re-layout the label, update our component's
|
* accordingly like to re-layout the label, update our component's
|
||||||
|
|||||||
Reference in New Issue
Block a user