com.leafdigital.ui.api
Interface EditArea

All Superinterfaces:
SupportsBaseGroup, Widget

public interface EditArea
extends Widget, SupportsBaseGroup

Interface for multi-line edit boxes.

See Also:
EditBox

Method Summary
 void focus()
          Focuses this edit
 java.lang.String getValue()
           
 void highlightErrorLines(int[] lines)
          Highlights specified lines.
 boolean isEnabled()
           
 void selectAll()
          Selects everything
 void setAutoStretch(boolean autoStretch)
          Turns on the autostretch feature.
 void setEnabled(boolean enabled)
           
 void setHeight(int height)
          Sets preferred height
 void setOnChange(java.lang.String callback)
          Sets the action method called when user types or does anything else that changes the value.
 void setOnFocus(java.lang.String callback)
          Sets the action method called when the control is focused.
 void setValue(java.lang.String s)
           
 void setWidth(int width)
          Sets preferred width
 
Methods inherited from interface com.leafdigital.ui.api.Widget
getID, getOwner, informClosed, isVisible, setOwner, setVisible
 
Methods inherited from interface com.leafdigital.ui.api.SupportsBaseGroup
setBaseGroup
 

Method Detail

getValue

java.lang.String getValue()
Returns:
Entered value as string with line breaks

setValue

void setValue(java.lang.String s)
Parameters:
s - New text including possible \n

setOnChange

@UICallback
void setOnChange(java.lang.String callback)
Sets the action method called when user types or does anything else that changes the value.

Parameters:
callback - Name of method
Throws:
BugException - If method doesn't exist etc.

setOnFocus

@UICallback
void setOnFocus(java.lang.String callback)
Sets the action method called when the control is focused.

Parameters:
callback - Name of method
Throws:
BugException - If method doesn't exist etc.

setEnabled

void setEnabled(boolean enabled)
Parameters:
enabled - True to enable, false to disable

isEnabled

boolean isEnabled()
Returns:
True if enabled

focus

void focus()
Focuses this edit


setWidth

void setWidth(int width)
Sets preferred width

Parameters:
width - Width in pixels.

setHeight

void setHeight(int height)
Sets preferred height

Parameters:
height - Height in pixels

setAutoStretch

void setAutoStretch(boolean autoStretch)
Turns on the autostretch feature. If this is set, the edit area automatically changes its size based on the content, instead of offering scrollbars.

Parameters:
autoStretch -

highlightErrorLines

void highlightErrorLines(int[] lines)
Highlights specified lines. The lines remain highlighted only until the user edits something.

Parameters:
lines - Array of 0-based line numbers (so first line is 0, not 1) to highlight, or null for none

selectAll

void selectAll()
Selects everything



Copyright © 2011 Samuel Marshall. All rights reserved.