| java.lang.Object com.sun.midp.lcdui.TextInfo
TextInfo | public class TextInfo (Code) | | Class that represents the line-wrapping and scroll position of
text in a TextBox (editable) or Label, StringItem, or ListItem(uneditable)
From this structure, Text.paintText() should be able to
quickly render wrapped text
|
Constructor Summary | |
public | TextInfo(int size) |
BACK | final public static int BACK(Code) | | scroll up
|
FORWARD | final public static int FORWARD(Code) | | scroll down
|
cursorLine | public int cursorLine(Code) | | the line where the cursor resides
|
height | public int height(Code) | | the height of the block of text described by this object
|
isModified | public boolean isModified(Code) | | set to true to indicate this has been modified
|
lineEnd | public int[] lineEnd(Code) | | offset of last character of each line
|
lineStart | public int[] lineStart(Code) | | starting offset of each line
|
numLines | public int numLines(Code) | | total number of lines
|
scrollX | public boolean scrollX(Code) | | set to true if this has been scrolled in the X direction
|
scrollY | public boolean scrollY(Code) | | set to true if this has been scrolled in the Y direction
|
topVis | public int topVis(Code) | | first visible line
|
visLines | public int visLines(Code) | | number of visible lines
|
TextInfo | public TextInfo(int size)(Code) | | Construct a new TextInfo object with size
lines initially
Parameters: size - maximum number of lines this TextInfostruct can store without expanding |
expand | public void expand()(Code) | | Expand the capacity of this TextInfo structure by doubling the
length of the lineStart and lineEnd arrays
|
getScrollPosition | public int getScrollPosition()(Code) | | Returns scroll position from 0-100
scroll position mapped to the range 0-100 |
getScrollProportion | public int getScrollProportion()(Code) | | Returns scroll proportion from 0-100
scroll proportion, as a percentage of the screen thatis viewable. |
scroll | public boolean scroll(int dir)(Code) | | Scroll Up or down by one line if possible
Parameters: dir - direction of scroll, FORWARD or BACK true if scrolling happened, false if not |
scroll | public boolean scroll(int dir, int length)(Code) | | Scroll Up or down by one line if possible
Parameters: dir - direction of scroll, FORWARD or BACK Parameters: length - how many lines to scroll true if scrolling happened, false if not |
scrollByPage | public int scrollByPage(int dir)(Code) | | Scroll Up or down by page if possible
Parameters: dir - direction of scroll, FORWARD or BACK number of scrolled lines |
|
|