|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TextView
Interface for a scrolling text view.
Nested Class Summary | |
---|---|
static interface |
TextView.ActionHandler
Interface that happens when user clicks on things |
static interface |
TextView.MenuHandler
Interface used when user right-clicks |
Field Summary | |
---|---|
static int |
LINELIMIT_NONE
Constant indicating no line limit |
Method Summary | |
---|---|
void |
addLine(java.lang.String line)
Add a line of text. |
void |
addPara(java.lang.String block)
Add a paragraph of text. |
void |
addXML(java.lang.String xml)
Adds arbitrary text data. |
void |
clear()
Removes all text back to empty state. |
void |
copy()
Copies selection to clipboard |
void |
fadeMark(int opacity)
Fades out the position marker. |
boolean |
hasMark()
|
boolean |
hasSelection()
|
boolean |
isAtEnd()
|
void |
markPosition()
Marks the current position with a red line below it when new text appears. |
void |
removeMark()
Removes the position marker if present |
void |
scrollToEnd()
Scrolls to end of text |
void |
selectAll()
Selects everything |
void |
selectNone()
Sets selection to none |
void |
setAction(java.lang.String tag,
TextView.ActionHandler ah)
Sets handler for 'actions' (user clicking on things). |
void |
setDefaultHeight(int height)
Set the default height for the view. |
void |
setDefaultWidth(int width)
Set the default width for the view. |
void |
setLineLimit(int limit)
If set, the view will delete lines from the beginning after you add more than this many lines. |
void |
setMenuHandler(TextView.MenuHandler mh)
Sets handler for menu clicks (right-clicks) |
void |
setOnScroll(java.lang.String callback)
Sets callback that happens whenever scroll position changes. |
void |
setScrolledUpWarning(boolean enable)
Enables or disables the 'scrolled-up warning'; a graphical cue that appears when you're not looking at the bottom of the window. |
void |
setStyleSheet(java.io.InputStream is)
Sets the stylesheet for the textview. |
void |
setStyleSheet(java.lang.String styles)
Sets the stylesheet for the textview. |
void |
setThemeType(java.lang.String themeType)
Set type name used to select theme details. |
Methods inherited from interface com.leafdigital.ui.api.Widget |
---|
getID, getOwner, informClosed, isVisible, setOwner, setVisible |
Field Detail |
---|
static final int LINELIMIT_NONE
Method Detail |
---|
void setThemeType(java.lang.String themeType)
themeType
- Name used for items of this type within theme.void setDefaultWidth(int width)
width
- Desired width (default 200)void setDefaultHeight(int height)
height
- Desired width (default 200)void clear()
void setLineLimit(int limit)
limit
- Limit or LINELIMIT_NONEvoid selectAll()
boolean hasSelection()
void copy()
void selectNone()
void addPara(java.lang.String block) throws GeneralException
block
- XML data for new text (will be surrounded with para tag)
GeneralException
- If the text is not valid datavoid addLine(java.lang.String line) throws GeneralException
line
- XML data for new text (will be surrounded with line tag)
GeneralException
- If the text is not valid datavoid addXML(java.lang.String xml) throws GeneralException
xml
- XML data for new text (will be surrounded with void setStyleSheet(java.io.InputStream is) throws GeneralException
is
- Stylesheet to add
GeneralException
- If there's a problem with the sheet formatvoid setStyleSheet(java.lang.String styles) throws GeneralException
styles
- Stylesheet to add
GeneralException
- If there's a problem with the sheet formatvoid scrollToEnd()
boolean isAtEnd()
@UICallback void setOnScroll(java.lang.String callback)
callback
- Callback name
BugException
- If callback doesn't exist etc.void setAction(java.lang.String tag, TextView.ActionHandler ah)
tag
- Tag that is sensitive to clicks.ah
- Handlervoid setMenuHandler(TextView.MenuHandler mh)
mh
- New handlervoid markPosition()
void fadeMark(int opacity)
opacity
- New opacity (0=transparent, 255=full)void removeMark()
boolean hasMark()
void setScrolledUpWarning(boolean enable)
enable
- True to enable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |