Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.
public interface TouchSelection.Host
What the chrome needs from the editor it decorates.
Methods
public abstract int[] edgeRect(boolean start) | Where an end of the selection is, in coordinates relative to the editor’s own origin. |
public abstract boolean canEdit() | Whether Cut and Paste are offered. |
public abstract void toolbarAction(int action) | Runs a toolbar action. |
public abstract Font chromeFont() | The font the toolbar labels are drawn in and the handles are sized from. |
Method details
edgeRect
public abstract int[] edgeRect(boolean start)Where an end of the selection is, in coordinates relative to the editor’s own
origin.
Parameters
startboolean- true for the start of the selection, false for its end
Returns
{x, top, height} of the caret at that endcanEdit
public abstract boolean canEdit()Whether Cut and Paste are offered.
Returns
true when the content can be changed
toolbarAction
public abstract void toolbarAction(int action)Runs a toolbar action.
Parameters
actionintCOPY,CUT,PASTEorSELECT_ALL
chromeFont
public abstract Font chromeFont()The font the toolbar labels are drawn in and the handles are sized from.
Returns
the font