public class StringLabelFactory extends java.lang.Object implements LabelFactory
StringLabelFactory object makes a simple
StringLabel out of a String.| Constructor and Description |
|---|
StringLabelFactory() |
| Modifier and Type | Method and Description |
|---|---|
Label |
newLabel(Label oldLabel)
Create a new
StringLabel, where the label is
formed from
the Label object passed in. |
Label |
newLabel(java.lang.String labelStr)
Make a new label with this
String as the "name". |
Label |
newLabel(java.lang.String labelStr,
int options)
Make a new label with this
String as the "name". |
Label |
newLabelFromString(java.lang.String labelStr)
Make a new label with this
String as the "name". |
public Label newLabel(java.lang.String labelStr)
String as the "name".newLabel in interface LabelFactorylabelStr - A string that determines the content of the label.
For a StringLabel, it is exactly the given stringpublic Label newLabel(java.lang.String labelStr, int options)
String as the "name".newLabel in interface LabelFactorylabelStr - A string that determines the content of the label.
For a StringLabel, it is exactly the given stringoptions - The options are ignored by a StringLabelFactorypublic Label newLabelFromString(java.lang.String labelStr)
String as the "name".
This version does no decoding -- StringLabels just have a value.newLabelFromString in interface LabelFactorylabelStr - A string that determines the content of the label.
For a StringLabel, it is exactly the given stringpublic Label newLabel(Label oldLabel)
StringLabel, where the label is
formed from
the Label object passed in. Depending on what fields
each label has, other things will be null.newLabel in interface LabelFactoryoldLabel - The Label that the new label is being created from