Code examples for AttributedString

Codota analyzed 7,668,838 open source code samples to find the most common, credible and clear examples.
You can now enable Codota on your own code to easily search and navigate your Java codebase.
104:	AttributedString attrString = new AttributedString(test); 
105:	AttributedCharacterIterator it = attrString.getIterator(); 
-
107:	it = attrString.getIterator(null, 0, 3); 
-
109:	it = attrString.getIterator(null, 2, 8); 
-
111:	it = attrString.getIterator(null, 0, 0); 
Full Snippet Info
7
CodeRank
121:	AttributedString astr = new AttributedString(str); 
122:	astr.addAttribute(TextAttribute.RUN_DIRECTION, TextAttribute.RUN_DIRECTION_RTL); 
-
124:	astr.addAttribute(TextAttribute.BIDI_EMBEDDING, 
-
129:	Bidi bidi = new Bidi(astr.getIterator()); 
Full Snippet Info
7
CodeRank
195:	AttributedString as = new AttributedString(string); 
-
197:	as.addAttribute(AttributedCharacterIterator.Attribute.LANGUAGE, 
-
199:	as.addAttribute(AttributedCharacterIterator.Attribute.READING, 
-
201:	as.addAttribute(AttributedCharacterIterator.Attribute.LANGUAGE, 
Full Snippet Info
6
CodeRank
104:	AttributedString attrString = new AttributedString(test); 
105:	AttributedCharacterIterator it = attrString.getIterator(); 
-
107:	it = attrString.getIterator(null, 0, 3); 
-
109:	it = attrString.getIterator(null, 2, 8); 
-
111:	it = attrString.getIterator(null, 0, 0); 
Full Snippet Info
6
CodeRank
329:	AttributedString as = new AttributedString("123", new WeakHashMap()); 
-
331:	as.addAttribute(AttributedCharacterIterator.Attribute.LANGUAGE, "english"); 
332:	as.addAttribute(AttributedCharacterIterator.Attribute.INPUT_METHOD_SEGMENT, 
-
334:	as.addAttribute(AttributedCharacterIterator.Attribute.READING, "reading"); 
-
337:	as.addAttribute(null, new TreeSet()); 
-
343:	as.addAttribute(null, null); 
Full Snippet Info
6
CodeRank
42:	AttributedString styledText = new AttributedString(text); 
-
48:	styledText.addAttribute(TextAttribute.FAMILY, font.getFamily()); 
49:	styledText.addAttribute(TextAttribute.SIZE, new Float(font.getSize())); 
50:	styledText.addAttribute(TextAttribute.FOREGROUND, Color.black); 
-
57:	styledText.addAttribute(TextAttribute.WEIGHT, 
-
61:	styledText.addAttribute(TextAttribute.POSTURE, 
-
65:	styledText.addAttribute(TextAttribute.UNDERLINE, 
-
67:	styledText.addAttribute(TextAttribute.STRIKETHROUGH, 
-
124:	styledText.addAttribute(TextAttribute.FOREGROUND, 
-
128:	styledText.addAttribute(TextAttribute.FOREGROUND, 
-
132:	styledText.addAttribute(TextAttribute.FOREGROUND, 
-
135:	java.text.AttributedCharacterIterator iter = styledText.getIterator(); 
-
140:	styledText.addAttribute(TextAttribute.BACKGROUND, 
-
143:	iter = styledText.getIterator(); 
Full Snippet Info
6
CodeRank
329:	AttributedString as = new AttributedString("123", new WeakHashMap()); 
-
331:	as.addAttribute(AttributedCharacterIterator.Attribute.LANGUAGE, "english"); 
332:	as.addAttribute(AttributedCharacterIterator.Attribute.INPUT_METHOD_SEGMENT, 
-
334:	as.addAttribute(AttributedCharacterIterator.Attribute.READING, "reading"); 
-
337:	as.addAttribute(null, new TreeSet()); 
-
343:	as.addAttribute(null, null); 
Full Snippet Info
6
CodeRank
83:	AttributedString s1 = new AttributedString("ABC"); 
84:	assertFalse(AttributedStringUtilities.equal(s1, null)); 
85:	assertFalse(AttributedStringUtilities.equal(null, s1)); 
-
88:	assertTrue(AttributedStringUtilities.equal(s1, s2)); 
-
90:	s1.addAttribute(TextAttribute.BACKGROUND, Color.blue, 1, 2); 
91:	assertFalse(AttributedStringUtilities.equal(s1, s2)); 
-
93:	assertTrue(AttributedStringUtilities.equal(s1, s2)); 
Full Snippet Info
6
CodeRank
195:	AttributedString as = new AttributedString(string); 
-
197:	as.addAttribute(AttributedCharacterIterator.Attribute.LANGUAGE, 
-
199:	as.addAttribute(AttributedCharacterIterator.Attribute.READING, 
-
201:	as.addAttribute(AttributedCharacterIterator.Attribute.LANGUAGE, 
Full Snippet Info
6
CodeRank
115:	AttributedString astr = new AttributedString(str); 
116:	astr.addAttribute(TextAttribute.RUN_DIRECTION, TextAttribute.RUN_DIRECTION_RTL); 
-
118:	astr.addAttribute(TextAttribute.BIDI_EMBEDDING, 
-
123:	Bidi bidi = new Bidi(astr.getIterator()); 
Full Snippet Info
6
CodeRank
272:	AttributedString label = new AttributedString("Axis Label"); 
273:	label.addAttribute(TextAttribute.SUPERSCRIPT, 
-
275:	a1.setLabel(label); 
Full Snippet Info
6
CodeRank
127:	as = new AttributedString("test"); 
128:	as.addAttribute(AttributedCharacterIterator.Attribute.LANGUAGE, null, 
-
130:	it = as.getIterator(); 
Full Snippet Info
5
CodeRank
29:	atrString = new AttributedString(string); 
-
31:	atrString.addAttribute(TextAttribute.FAMILY, font.getFamily()); 
32:	atrString.addAttribute(TextAttribute.SIZE, fontSize); 
33:	atrString.addAttribute(TextAttribute.WEIGHT, bold); 
34:	atrString.addAttribute(TextAttribute.POSTURE, italic); 
35:	atrString.addAttribute(TextAttribute.UNDERLINE, underline, 0, string.length()); 
-
45:	return atrString.getIterator(); 
Full Snippet Info
6
CodeRank
73:	AttributedString as = new AttributedString(s); 
74:	as.addAttribute(TextAttribute.FONT, f, 0, 10); 
75:	as.addAttribute(TextAttribute.FONT, f1, 10, s.length()); 
76:	AttributedCharacterIterator aci = as.getIterator(); 
Full Snippet Info
6
CodeRank
354:	AttributedString as = new AttributedString("Test String"); 
355:	as.addAttribute(TextAttribute.FONT, new Font("Dialog", Font.PLAIN, 12)); 
Full Snippet Info
5
CodeRank
693:	g2.setAttributedLabel(1, new AttributedString("TESTING")); 
Full Snippet Info
5
CodeRank
112:	AttributedString aString = new AttributedString(String 
-
114:	aString.addAttribute(TextAttribute.FONT, font, 0, 1); 
115:	return aString.getIterator(); 
Full Snippet Info
4
CodeRank
146:	g2.setAttributedLabel(1, new AttributedString("XYZ")); 
Full Snippet Info
4
CodeRank
115:	AttributedString astr = new AttributedString(str); 
116:	astr.addAttribute(TextAttribute.RUN_DIRECTION, TextAttribute.RUN_DIRECTION_RTL); 
-
118:	astr.addAttribute(TextAttribute.BIDI_EMBEDDING, 
-
123:	Bidi bidi = new Bidi(astr.getIterator()); 
Full Snippet Info
5
CodeRank
225:	AttributedString ats = new AttributedString(sr); 
-
227:	ats.addAttribute(TextAttribute.SIZE, new Float(font.getSize2D())); 
228:	ats.addAttribute(TextAttribute.FONT, font); 
-
230:	ats.addAttribute(TextAttribute.UNDERLINE, TextAttribute.UNDERLINE_ON); 
-
232:	ats.addAttribute(TextAttribute.POSTURE, TextAttribute.POSTURE_OBLIQUE); 
233:	else ats.addAttribute(TextAttribute.POSTURE, TextAttribute.POSTURE_REGULAR); 
-
235:	ats.addAttribute(TextAttribute.WEIGHT, TextAttribute.WEIGHT_BOLD); 
Full Snippet Info
4
CodeRank