net.yura.mobile.gui.components
Class TextPane

java.lang.Object
  extended by net.yura.mobile.gui.components.Component
      extended by net.yura.mobile.gui.components.TextPane

public class TextPane
extends Component

Author:
Yura Mamyrin
See Also:
TextPane

Nested Class Summary
static class TextPane.TextStyle
           
 
Field Summary
(package private)  int heightUsed
           
(package private)  TextArea ta
           
(package private)  int widthUsed
           
 
Fields inherited from class net.yura.mobile.gui.components.Component
background, empty, FOCUS_GAINED, FOCUS_LOST, focusable, foreground, height, parent, posX, posY, preferredHeight, preferredWidth, state, theme, width
 
Constructor Summary
TextPane()
           
 
Method Summary
 void append(String text1)
           
 void focusGained()
           
 void focusLost()
           
protected  String getDefaultName()
           
 String getText()
           
 void paintComponent(Graphics2D g)
           
 boolean processKeyEvent(KeyEvent event)
           
 void processMouseEvent(int type, int x, int y, KeyEvent keys)
           
 void setActionListener(ActionListener l)
           
 void setCharacterAttributes(int offset, int length, TextPane.TextStyle style)
           
 void setParagraphAttributes(int offset, int length, TextPane.TextStyle style)
           
 void setSize(int w, int h)
           
 void setText(String text1)
          like Swing this method IS thread safe
 void setValue(Object obj)
           
 void updateUI()
           
 void workoutMinimumSize()
          This sets the width and height of this component to the MINIMUM that is needed for this component
 
Methods inherited from class net.yura.mobile.gui.components.Component
add, add, add, addFocusListener, addImpl, animate, clip, consumesMotionEvents, getBackground, getBorder, getCurrentState, getDesktopPane, getFocusListeners, getForeground, getHeight, getHeightWithBorder, getInsets, getName, getParent, getPreferredHeight, getPreferredWidth, getState, getToolTipLocationX, getToolTipLocationY, getToolTipText, getValue, getWidth, getWidthWithBorder, getWindow, getX, getXOnScreen, getXWithBorder, getY, getYOnScreen, getYWithBorder, insert, insert, isComponentVisible, isFocusable, isFocusOwner, isOpaque, isRectVisible, isShowing, isVisible, makeVisible, paint, paintBorder, processMultitouchEvent, removeFocusListener, removeParent, repaint, requestFocusInWindow, revalidate, scrollRectToVisible, scrollUpDown, setBackground, setBorder, setBounds, setBoundsWithBorder, setFocusable, setForeground, setLocation, setName, setPreferredSize, setState, setToolTipText, setupState, setVisible, toString, transferFocus, validate, wait, workoutSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

heightUsed

int heightUsed

ta

TextArea ta

widthUsed

int widthUsed
Constructor Detail

TextPane

public TextPane()
Method Detail

append

public void append(String text1)

focusGained

public void focusGained()
Overrides:
focusGained in class Component
See Also:
FocusListener.focusGained

focusLost

public void focusLost()
Overrides:
focusLost in class Component
See Also:
FocusListener.focusLost

getDefaultName

protected String getDefaultName()
Specified by:
getDefaultName in class Component

getText

public String getText()

paintComponent

public void paintComponent(Graphics2D g)
Specified by:
paintComponent in class Component
See Also:
JComponent.paintComponent

processKeyEvent

public boolean processKeyEvent(KeyEvent event)
Overrides:
processKeyEvent in class Component
See Also:
JComponent.processKeyEvent

processMouseEvent

public void processMouseEvent(int type,
                              int x,
                              int y,
                              KeyEvent keys)
Overrides:
processMouseEvent in class Component
See Also:
Component.processMouseEvent

setActionListener

public void setActionListener(ActionListener l)

setCharacterAttributes

public void setCharacterAttributes(int offset,
                                   int length,
                                   TextPane.TextStyle style)

setParagraphAttributes

public void setParagraphAttributes(int offset,
                                   int length,
                                   TextPane.TextStyle style)

setSize

public void setSize(int w,
                    int h)
Overrides:
setSize in class Component
See Also:
Component.setSize

setText

public void setText(String text1)
like Swing this method IS thread safe

Parameters:
text1 - the text to set, if the text starts with <html> then it will be passed as html
See Also:
JEditorPane.setText

setValue

public void setValue(Object obj)
Overrides:
setValue in class Component

updateUI

public void updateUI()
Overrides:
updateUI in class Component
See Also:
JComponent.updateUI

workoutMinimumSize

public void workoutMinimumSize()
Description copied from class: Component
This sets the width and height of this component to the MINIMUM that is needed for this component

Specified by:
workoutMinimumSize in class Component
See Also:
JComponent.getMinimumSize