Line Wrap Example v-
Share   astrient - Thursday January 12, 2006 16:41 UTC - http://hostj2me.com/a/6
http://www.hostj2me.com/d/34/6/LineEnumeration.java

The LineEnumeration wraps text on a canvas.

Platform

J2ME

Usage Example

Within the paint method:

String longText = ...;
Font myFont = Font.getFont(Font.FACE_PROPORTIONAL, Font.STYLE_PLAIN, Font.SIZE_SMALL);
LineEnumeration e = new LineEnumeration(myFont,,getWidth());
e.writeTo(g,10,10,myFont);


Alternative:

LineEnumeration e = new LineEnumeration(myFont,myText,lineWidth);
while ( e.hasMoreElements() )
{
g.drawString(e.nextElement().toString(), startX,startY, Graphics.TOP | Graphics.LEFT);
startY += myFont.getHeight();
}


Device Compatibility

Should work on all Midp 2.0 devices.

report this application
Total Accounts: 100,516
Total Applications: 6,490
Total Files: 218,713
Total Downloads: 6,556,217
Total Stored: 15.69GB
IndiDictionary(Eng-Eng)
by ashishi
IndiDictionary(Eng-Mar)
by ashishi
IndiDictionary(Eng-Hindi)
by ashishi
Caccia al Quadro
by mikesac
Naija Lyrics Wiki - ME
by trinisoftinc
Advertising  /  Build  /  Terms  /  Comments  /  Libraries  /  Devices  /  Clients  /  Forum  /  blog  /  xhtml
Consulting - Buy, Run, Invest - ©2011 Astrient Labs, LLC 
Buy, Run, Invest Consulting