Class AbstractInplaceEditor
java.lang.Object
ro.sync.ecss.extensions.api.editor.AbstractInplaceEditor
- All Implemented Interfaces:
InplaceEditor,Extension
- Direct Known Subclasses:
ButtonEditor,ButtonGroupEditor,CheckBoxEditor,ComboBoxEditor,DatePickerEditor,HtmlContentEditor,InputURLEditor,PopupCheckBoxEditor,PopupListEditor,SimpleURLChooserEditor,TextFieldEditor,URLChooserEditorSWT
@API(type=EXTENDABLE,
src=PUBLIC)
public abstract class AbstractInplaceEditor
extends Object
implements InplaceEditor
An abstract implementation that handles listeners fire.
- Since:
- 14.1
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidaddEditingListener(InplaceEditingListener editingListener) Adds a listener to receive edit notifications: -InplaceEditingListener.editingCanceled()to remove the editor and cancel the edit operation.voidCommit the given value inside the document without stopping the editing.protected voidfireCommitValue(EditingEvent event) Notify the interested listeners that the current value must be committed.protected voidNotify the interested listeners that the editing was canceled.protected voidNotify the interested listeners that an edit occurred inside the editor.protected voidfireEditingStopped(EditingEvent event) Notify the interested listeners that the editing stopped.protected voidNotify the interested listeners that the next edit position was requested.protected voidNotify the interested listeners that the previous edit position was requested.protected BooleangetBoolean(AuthorInplaceContext context, String key) Gets a boolean from the properties set on the form control.booleaninsertContent(String content) An insert text event was received by the author page and redirected to this currently active form control.voidrefresh(AuthorInplaceContext context) While this editor is inside an editing session a document change was detected that didn't originated form this editor.final voidremoveEditingListener(InplaceEditingListener editingListener) Removes a listener that receives editing events.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ro.sync.ecss.extensions.api.Extension
getDescriptionMethods inherited from interface ro.sync.ecss.extensions.api.editor.InplaceEditor
allowsRepostingEvents, cancelEditing, getEditorComponent, getScrollRectangle, getValue, requestFocus, stopEditing
-
Constructor Details
-
AbstractInplaceEditor
public AbstractInplaceEditor()
-
-
Method Details
-
fireEditingStopped
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. -
addEditingListener
Description copied from interface:InplaceEditorAdds a listener to receive edit notifications: -InplaceEditingListener.editingCanceled()to remove the editor and cancel the edit operation. -InplaceEditingListener.editingOccured()to signal modification in the editor. This event marks the editor as dirty and it's value will be committed when aInplaceEditingListener.editingStopped(EditingEvent)is received. -InplaceEditingListener.editingStopped(EditingEvent)to end editing and commit it's value if needed. The value is usually committed ONLY if aInplaceEditingListener.editingOccured()was fired. SeeInplaceEditingListener.editingStopped(EditingEvent)for more information.- Specified by:
addEditingListenerin interfaceInplaceEditor- Parameters:
editingListener- Editing listener.- See Also:
-
removeEditingListener
Description copied from interface:InplaceEditorRemoves a listener that receives editing events.- Specified by:
removeEditingListenerin interfaceInplaceEditor- Parameters:
editingListener- Editing listener.- See Also:
-
fireCommitValue
Notify the interested listeners that the current value must be committed.- Parameters:
event- Editing event.
-
getBoolean
Gets a boolean from the properties set on the form control.- Parameters:
context- The context.key- The property key.- Returns:
Boolean.TRUE,Boolean.FALSE, ornullif the property is not set.
-
refresh
Description copied from interface:InplaceEditorWhile 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:
refreshin interfaceInplaceEditor- Parameters:
context- An updated editing context for this editor.- See Also:
-
insertContent
Description copied from interface:InplaceEditorAn 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:
insertContentin interfaceInplaceEditor- Parameters:
content- Content to be inserted.- Returns:
trueif the event was handled orfalseif 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. Iffalseis returned the form control editing session will be stopped and the author page will handle the event instead.- See Also:
-
commitValue
public void commitValue()Description copied from interface:InplaceEditorCommit 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:
commitValuein interfaceInplaceEditor- See Also:
-