jMobileCore toolkit

com.jmobilecore.ui.core
Class TextPane

java.lang.Object
  extended by com.jmobilecore.ui.core.Component
      extended by com.jmobilecore.ui.core.TextPane

public class TextPane
extends Component

Author:
Greg Gridin

Field Summary
protected  com.jmobilecore.ui.core.TextPaneText textPane
          The TextPaneText represents content of this TextPane.
 
Fields inherited from class com.jmobilecore.ui.core.Component
alignment, background, CENTER, focusable, focusedBackground, focusedForeground, font, foreground, height, isCompletelyVisible, isFocused, isVisible, LEFT, parentScreen, RIGHT, screenY, valid, width
 
Constructor Summary
TextPane(java.lang.String text)
          Constructs a new TextPane with the specified string of text, left justified.
TextPane(java.lang.String text, javax.microedition.lcdui.Font font)
          Constructs a new TextPane with the specified string of text, left justified.
 
Method Summary
 java.lang.String getText()
          Gets the text of this text pane.
 void paint(javax.microedition.lcdui.Graphics g)
          Paints the TextPane to the screen.
 void setFont(javax.microedition.lcdui.Font _font)
          Sets the font of this component.
protected  void setHeight()
          Calculates the text pane height
 void setText(java.lang.String text)
          Sets the text for this text pane to the specified value.
 
Methods inherited from class com.jmobilecore.ui.core.Component
destructor, getBackground, getFont, getForeground, getHeight, getWidth, invalidate, isFocusOwner, keyPressed, keyReleased, keyRepeated, paintBackground, pointerDragged, pointerPressed, pointerReleased, prepareForeground, releaseFocus, requestFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

textPane

protected com.jmobilecore.ui.core.TextPaneText textPane
The TextPaneText represents content of this TextPane.

See Also:
getText(), setText(String)
Constructor Detail

TextPane

public TextPane(java.lang.String text)
Constructs a new TextPane with the specified string of text, left justified.

Parameters:
text - the string that the textpane presents. A null value will be accepted without causing a NullPointerException to be thrown. Unlike text for labels this text can be multiline.

TextPane

public TextPane(java.lang.String text,
                javax.microedition.lcdui.Font font)
Constructs a new TextPane with the specified string of text, left justified.

Parameters:
text - the string that the textpane presents. A null value will be accepted without causing a NullPointerException to be thrown. Unlike text for labels this text can be multiline.
font - the TextPane font
Method Detail

getText

public java.lang.String getText()
Gets the text of this text pane.

Returns:
the text of this text pane, or null if the text has been set to null.
See Also:
setText(String)

paint

public void paint(javax.microedition.lcdui.Graphics g)
Paints the TextPane to the screen.

Overrides:
paint in class Component
Parameters:
g - The Graphics object to render to.

setFont

public void setFont(javax.microedition.lcdui.Font _font)
Sets the font of this component.

Overrides:
setFont in class Component
Parameters:
_font - the font to become this component's font; if this parameter is null then this component font won't be changed

setHeight

protected void setHeight()
Calculates the text pane height

Overrides:
setHeight in class Component

setText

public void setText(java.lang.String text)
Sets the text for this text pane to the specified value.

Parameters:
text - the text that this text pane displays.
See Also:
getText()

jMobileCore toolkit