Package com.codename1.wordprocessing


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.

  • Class
    Description
    One top-level unit of a Document's body: a Paragraph, a Table or a Picture.
    The .cn1doc XML of a list of blocks, for formats that hold document text inside their own files.
    A 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.
    An immutable word-processing document: a list of Blocks (paragraphs, tables and pictures), the page they are laid out on and a title.
    The file formats read and write understand.
    A 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.
    A document broken into pages: every line, table, picture and footnote placed, in points.
    Notified when a DocumentModel's document is replaced, by an edit, an undo or a redo.
    The editable state behind a document view: the current immutable Document, its listeners and its undo history.
    Shows a document as pages and edits it, the way DataGrid shows and edits a Sheet.
    A live Codename One component placed in a document's text, such as a chart, a map, a button or a form.
    The registry that turns an EmbeddedComponent -- a type name and a state string in a document -- into a live Codename One component, and back.
    Creates the components of one type and reads their state back.
    A field: an instruction such as PAGE, DATE \@ "d MMMM yyyy" or =SUM(ABOVE) with the result it last produced.
    Content 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.
    One 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.
    One page of a DocumentLayout: its size and everything drawn on it, in painting order.
    Paints laid out items on a Graphics, the way DocumentView paints its pages.
    Measures text for DocumentLayout, in points.
    A footnote or endnote, placed in the text where its reference mark goes.
    Immutable page geometry in points: paper size and the four margins.
    An immutable paragraph: styled text plus the paragraph's own layout.
    Writes a laid out document as PDF, page for page as DocumentView shows it.
    Measures with the fonts a PDF is drawn in, so a document paginates identically on screen and on paper.
    An 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.
    A tracked change on a run of text: who inserted or deleted it and when.
    Immutable 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.
    Accumulates runs into a RichText.
    Computes a new style from an old one, for restyle.
    Receives the runs of a text in order.
    Moves content between a RichTextArea and a Document, so the light editor and the paged one can work on the same text.
    Measures text with the platform fonts DocumentView draws it in.
    Starts 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.
    An immutable table: a rectangular grid of cells, each holding its own blocks (paragraphs, pictures and nested tables), with optional merged ranges.
    A rectangular range of cells shown as one, anchored at its top-left cell.
    Keeps 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.
    Moves tables between documents and spreadsheets, so a table's numbers and formulas are calculated by the same engine as a Workbook's.
    A tab stop: where the text after a tab character lines up.
    A place between two characters of a paragraph: the caret position a point on a page maps to.
    Immutable character formatting for a run of text.