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:
mdb
2006-09-15 01:19:55 +00:00
parent 900dd533ea
commit 6c9a29b4bd
@@ -80,7 +80,7 @@ public class MultiLineLabel extends JComponent
*/
public MultiLineLabel (String text, int align, int constrain, int size)
{
_label = new Label(text);
_label = createLabel(text);
_label.setAlignment(align);
noteConstraints(constrain, size);
}
@@ -306,6 +306,14 @@ public class MultiLineLabel extends JComponent
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
* accordingly like to re-layout the label, update our component's