Class AbstractInplaceEditor

    • Constructor Detail

      • AbstractInplaceEditor

        public AbstractInplaceEditor()
    • Method Detail

      • fireEditingStopped

        protected void fireEditingStopped​(EditingEvent event)
        Notify the interested listeners that the editing stopped.
        Parameters:
        event - Editing event.
      • fireEditingCanceled

        protected void fireEditingCanceled()
        Notify the interested listeners that the editing was canceled.
      • fireEditingOccured

        protected void fireEditingOccured()
        Notify the interested listeners that an edit occurred inside the editor.
      • fireNextEditLocationRequested

        protected void fireNextEditLocationRequested()
        Notify the interested listeners that the next edit position was requested.
      • firePreviousEditLocationRequested

        protected void firePreviousEditLocationRequested()
        Notify the interested listeners that the previous edit position was requested.
      • fireCommitValue

        protected void fireCommitValue​(EditingEvent event)
        Notify the interested listeners that the current value must be committed.
        Parameters:
        event - Editing event.
      • getBoolean

        protected java.lang.Boolean getBoolean​(AuthorInplaceContext context,
                                               java.lang.String key)
        Gets a boolean from the properties set on the form control.
        Parameters:
        context - The context.
        key - The property key.
        Returns:
        Boolean.TRUE, Boolean.FALSE, or null if the property is not set.
      • refresh

        public void refresh​(AuthorInplaceContext context)
        Description copied from interface: InplaceEditor
        While this editor is inside an editing session a document change was detected that didn't originated form this editor. In this situation it might be good for the editor to refresh the presented data.

        Currently this method is called if:
        • This editor edits an attribute and the same attribute was externally modified. In this situation is recommended for the editor to update the current value.
        Specified by:
        refresh in interface InplaceEditor
        Parameters:
        context - An updated editing context for this editor.
        See Also:
        InplaceEditor.refresh(ro.sync.ecss.extensions.api.editor.AuthorInplaceContext)
      • insertContent

        public boolean insertContent​(java.lang.String content)
        Description copied from interface: InplaceEditor
        An insert text event was received by the author page and redirected to this currently active form control. The form control should insert this text as it sees fit. For example a text field might insert it at the caret position. An example when this event comes is when the user uses the Character Map Dialog to insert characters directly into a form control.
        Specified by:
        insertContent in interface InplaceEditor
        Parameters:
        content - Content to be inserted.
        Returns:
        true if the event was handled or false if the form control can do nothing with the string. For example a text field can insert the text inside it but a check box form control can do nothing with it. If false is returned the form control editing session will be stopped and the author page will handle the event instead.
        See Also:
        InplaceEditor.insertContent(java.lang.String)
      • commitValue

        public void commitValue()
        Description copied from interface: InplaceEditor
        Commit the given value inside the document without stopping the editing. Will only commit if a new string value is provided and only if the value that must be committed is different from the current value.
        Specified by:
        commitValue in interface InplaceEditor
        See Also:
        InplaceEditor.commitValue()