Line Wrap Example v-
Share   astrient - Thursday January 12, 2006 11:41 EST - 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: 22,947
Total Applications: 5,045
Total Files: 121,205
Total Downloads: 1,734,011
Total Stored: 21.25GB
BachMedicines
by jm_chinea
camCient
by spiretos
IndiDictionary(Eng-Eng)
by ashishi
IndiDictionary(Eng-Mar)
by ashishi
IndiDictionary(Eng-Hindi)
by ashishi
aalboge
sanjoy
bintang
hlayyem
hlayyemcoif
Advertising  /  Build  /  Terms  /  Comments  /  Libraries  /  Devices  /  Clients  /  Forum  /  blog  /  xhtml

HostJ2ME.com was developed by Astrient Labs, LLC after recognizing the need for mobile application developers to quickly upload and test OTA installations.
In 2008 Astrient Labs released WorldDeveloper.org. WorldDeveloper.org extends the mission of HostJ2ME.com by adding features important to non-profits.

Consulting - Buy, Run, Invest - ©2010 Astrient Labs, LLC 
Buy, Run, Invest Consulting