Allow subclasses to add attributes to the AttributedTextString.

git-svn-id: https://samskivert.googlecode.com/svn/trunk@1776 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
ray
2006-02-01 02:11:25 +00:00
parent fc810b5c2a
commit f5e8fdda6e
+10 -3
View File
@@ -644,8 +644,17 @@ public class Label implements SwingConstants, LabelStyleConstants
map.put(TextAttribute.UNDERLINE,
TextAttribute.UNDERLINE_LOW_ONE_PIXEL);
}
AttributedString text = new AttributedString(_text, map);
AttributedString text = new AttributedString(_text, map);
addAttributes(text);
return text.getIterator();
}
/**
* Add any attributes to the text.
*/
protected void addAttributes (AttributedString text)
{
// add any color attributes for specific segments
if (_rawText != null) {
Matcher m = COLOR_PATTERN.matcher(_rawText);
@@ -685,8 +694,6 @@ public class Label implements SwingConstants, LabelStyleConstants
startSeg, _text.length());
}
}
return text.getIterator();
}
/**