Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.

package com.codename1.wordprocessing

Word-processing documents.

A Document is an immutable list of Blocks – Paragraphs of styled RichText, Tables whose cells hold blocks of their own, and Pictures – laid out on a PageSpec. A DocumentModel holds the current document of an editor, tells its DocumentListeners when it is replaced and keeps the undo history, the way a com.codename1.ui.table.TableModel backs a table.

Documents are read and written as Codename One .cn1doc files, plain text, HTML and Markdown; see Document.Format.

Types

interface BlockOne top-level unit of a Document’s body: a Paragraph, a Table or a Picture.
class CommentA review comment anchored to a range of the document: from an offset in one paragraph to an offset in the same or a later one.
class DocumentAn immutable word-processing document: a list of Blocks (paragraphs, tables and pictures), the page they are laid out on and a title.
class DocumentEditorA DocumentView with its embedded components alive: each component box on screen holds a real Codename One component, made by the factory EmbeddedComponents has for its type, that the user can tap, drag and type into.
class DocumentLayoutA document broken into pages: every line, table, picture and footnote placed, in points.
interface DocumentListenerNotified when a DocumentModel’s document is replaced, by an edit, an undo or a redo.
class DocumentModelThe editable state behind a document view: the current immutable Document, its listeners and its undo history.
class DocumentViewShows a document as pages and edits it, the way DataGrid shows and edits a Sheet.
class EmbeddedComponentA live Codename One component placed in a document’s text, such as a chart, a map, a button or a form.
class EmbeddedComponentsThe registry that turns an EmbeddedComponent – a type name and a state string in a document – into a live Codename One component, and back.
class FieldA field: an instruction such as PAGE, DATE \@ "d MMMM yyyy" or =SUM(ABOVE) with the result it last produced.
interface InlineContent that sits inside a paragraph’s text and takes one character there, RichText.OBJECT: a Field, a Note reference, a Picture placed in the line, or an EmbeddedComponent.
class LayoutItemOne thing drawn on a laid out page: a piece of text, a filled or stroked rectangle, a line, a picture or the box of an embedded component.
class LayoutPageOne page of a DocumentLayout: its size and everything drawn on it, in painting order.
interface MeasurerMeasures text for DocumentLayout, in points.
class NoteA footnote or endnote, placed in the text where its reference mark goes.
class PageSpecImmutable page geometry in points: paper size and the four margins.
class ParagraphAn immutable paragraph: styled text plus the paragraph’s own layout.
class PdfExportWrites a laid out document as PDF, page for page as DocumentView shows it.
class PdfMeasurerMeasures with the fonts a PDF is drawn in, so a document paginates identically on screen and on paper.
class PictureAn immutable picture block: the original encoded image bytes, kept as they were read so a document written back carries the same image, plus its displayed size in points.
class RevisionA tracked change on a run of text: who inserted or deleted it and when.
class RichTextImmutable styled text: a sequence of runs, each a string with one TextStyle, and inline objects – fields, note references, pictures and embedded components – each of which takes exactly one character, OBJECT.
class RichTextDocumentsMoves content between a RichTextArea and a Document, so the light editor and the paged one can work on the same text.
class ScreenMeasurerMeasures text with the platform fonts DocumentView draws it in.
class SectionBreakStarts a new section: the blocks after it, up to the next break, are laid out on the page this break gives, with its margins, orientation and columns.
class TabStopA tab stop: where the text after a tab character lines up.
class TableAn immutable table: a rectangular grid of cells, each holding its own blocks (paragraphs, pictures and nested tables), with optional merged ranges.
class TableBindingKeeps a table of a document and a live Sheet in step, so the table can be edited in a DataGrid with Excel formulas, sorting and a formula bar, and the document follows.
class TableSheetsMoves tables between documents and spreadsheets, so a table’s numbers and formulas are calculated by the same engine as a Workbook’s.
class TextPositionA place between two characters of a paragraph: the caret position a point on a page maps to.
class TextStyleImmutable character formatting for a run of text.