Interface ContentEditingController

    • Constructor Detail

    • Method Detail

      • getContentEditingManager

        @NonNull() abstract ContentEditingManager getContentEditingManager()

        Returns an content editing manager which you can use to register listeners from the controller.

        Returns:

        ContentEditingManager managing the content editing listeners.

      • isUndoEnabled

         boolean isUndoEnabled()

        Checks whether the undo button is enabled

        Returns:

        whether the undo button is enabled or not

      • getCurrentFormatter

        @Nullable() abstract ContentEditingFormatter getCurrentFormatter()

        Get the formatter that will be used to update the user selections on the UI

        Returns:

        the current formatter

      • isRedoEnabled

         boolean isRedoEnabled()

        Checks whether the redo button is enabled

        Returns:

        whether the redo button is enabled or not

      • isSaveEnabled

         abstract boolean isSaveEnabled()

        Checks whether the save button is enabled.

        Returns:

        true if the save button is enabled, otherwise false

      • hasUnsavedChanges

         abstract boolean hasUnsavedChanges()

        Checks whether there are unsaved content changes.

        Returns:

        true if there are unsaved changes, otherwise false

      • clearContentEditing

         abstract void clearContentEditing()

        Called when the user clicks the clear button on the content editing styling bar

      • isClearContentEditingEnabled

         abstract boolean isClearContentEditingEnabled()

        Check function for the ContentEditingStylingBar bar if it should enable or disable its "Clear" button.

        Returns:

        true if the button in the styling bar should be enabled.

      • displayFontNamesSheet

         abstract void displayFontNamesSheet(@Nullable() StyleInfo preselectStyle)

        Called when the user clicks the font name button on the content editing styling bar

      • displayFontSizesSheet

         abstract void displayFontSizesSheet(@Nullable() StyleInfo preselectStyle)

        Called when the user clicks the font size button on the content editing styling bar

      • displayColorPicker

         abstract void displayColorPicker(@Nullable() StyleInfo preselectStyle)

        Called when the user clicks the font color button on the content editing styling bar

      • displayLineSpacingSheet

         abstract void displayLineSpacingSheet(@Nullable() Float preselectLineSpacing)

        Called when the user clicks the line spacing button on the content editing styling bar

      • finishContentEditingSession

         abstract void finishContentEditingSession()

        Called to exit a current content editing session. If there are unsaved changes, a dialog is shown asking how to proceed.

      • finishContentEditingSession

         abstract void finishContentEditingSession(boolean saveContent)

        Called to exit a current content editing session

        Parameters:
        saveContent - pass true if any modified content should be saved back to the document.
      • getCurrentStyleInfo

        @Nullable() abstract StyleInfo getCurrentStyleInfo()

        Returns the current style of the currently edited textblock for the current cursor position/selection, or null if there's no such thing

      • getCurrentTextBlockStyleInfo

        @Nullable() abstract TextBlockStyleInfo getCurrentTextBlockStyleInfo()

        Returns the global style properties of the currently edited textblock, or null if there's no such thing

      • isBoldStyleButtonEnabled

         abstract boolean isBoldStyleButtonEnabled(@Nullable() StyleInfo styleInfo)

        Evaluates the enabled state for the "bold" button in the ContentEditingStylingBar

        Parameters:
        styleInfo - current styleInfo to be displayed in the styling bar
        Returns:

        true if the "bold" button should be enabled, false otherwise.

      • isItalicStyleButtonEnabled

         abstract boolean isItalicStyleButtonEnabled(@Nullable() StyleInfo styleInfo)

        Evaluates the enabled state for the "italic" button in the ContentEditingStylingBar

        Parameters:
        styleInfo - current styleInfo to be displayed in the styling bar
        Returns:

        true if the "italic" button should be enabled, false otherwise.