public interface EditorHost

Known subtypesAbstractEditorComponent, CodeEditor, EditField, RichTextArea

The bridge a pure editor view uses to reach the owning editor component and, through it, the platform text input source. The owning com.codename1.ui.AbstractEditorComponent implements this so the low level implementation access (which is package private to com.codename1.ui) stays out of the editor engine package.

Methods

public abstract boolean isTextInputSupported()True when the platform can bind a low level text input client (see com.codename1.impl.CodenameOneImplementation#isTextInputSupported).
public abstract Object startTextInput(TextInputClient client, TextInputConfig config)Binds the client to the platform text input source and returns an opaque handle.
public abstract void updateTextInputState(Object handle, TextInputState state)Pushes the client’s editing state down to the bound input source.
public abstract void stopTextInput(Object handle)Unbinds a previously bound text input client.
public abstract void editorChanged()Notifies the owning editor that the document content changed so it can fire its change listeners.
public abstract void fireEditorEvent(String type, String value)Delivers a semantic editor event (e.g. a code completion request) back to the owning editor.

Method details

isTextInputSupported

public abstract boolean isTextInputSupported()
True when the platform can bind a low level text input client (see com.codename1.impl.CodenameOneImplementation#isTextInputSupported).

startTextInput

public abstract Object startTextInput(TextInputClient client, TextInputConfig config)
Binds the client to the platform text input source and returns an opaque handle.

updateTextInputState

public abstract void updateTextInputState(Object handle, TextInputState state)
Pushes the client’s editing state down to the bound input source.

stopTextInput

public abstract void stopTextInput(Object handle)
Unbinds a previously bound text input client.

editorChanged

public abstract void editorChanged()
Notifies the owning editor that the document content changed so it can fire its change listeners.

fireEditorEvent

public abstract void fireEditorEvent(String type, String value)
Delivers a semantic editor event (e.g. a code completion request) back to the owning editor.