Package com.iizigo.text
Class CommonTextActions
java.lang.Object
com.iizigo.text.CommonTextActions
- All Implemented Interfaces:
EventListener,org.eclipse.swt.custom.CaretListener,org.eclipse.swt.internal.SWTEventListener
Common text actions in the KString editors.
- Author:
- Christopher Mindus
Field Summary
FieldsModifier and TypeFieldDescriptionfinal PartActionThe common actions.final PartActionThe common actions.final PartActionThe common actions.final PartActionThe common actions.final PartActionThe common actions.final PartActionThe common actions.final PartActionThe common actions.final PartActionThe common actions.final PartActionThe common actions.Constructor Summary
ConstructorsConstructorDescriptionCommonTextActions(org.eclipse.swt.widgets.Shell shell, ModuleModel model, TextTableEditor editor, IVSAccessor vsAccessor, EditorTextTable defaultTextTable, IPropUndoRedo undoRedo, Boolean useTags) Constructor.Method Summary
Modifier and TypeMethodDescriptionvoidassignTextControl(KStringStyledText styledText) Assigns the StyledText instance for form editing.voidassignTextControl(org.eclipse.swt.widgets.Text text, org.eclipse.jface.viewers.ViewerCell cell) Assigns the Text instance for direct editing in tables.voidcaretMoved(org.eclipse.swt.custom.CaretEvent event) This method is called after the caret offset is changed.voiddispose()Disposes of the instance.Gets the current KString from current cell.voidShows the rich text dialog box.voidupdateStates(KStringProp prop, boolean doUpdateTagsFromProp) Updates the states for the specified KString.
Field Details
showRichText
The common actions.insertImage
The common actions.insertHyperlink
The common actions.insertTextIDTag
The common actions.insertTextVSTag
The common actions.entryText
The common actions.entryTextTag
The common actions.entryHTML
The common actions.entryHTMLTag
The common actions.
Constructor Details
CommonTextActions
public CommonTextActions(org.eclipse.swt.widgets.Shell shell, ModuleModel model, TextTableEditor editor, IVSAccessor vsAccessor, EditorTextTable defaultTextTable, IPropUndoRedo undoRedo, Boolean useTags) Constructor.- Parameters:
shell- The shell.model- The Module model.editor- The editor for table direct editing, can be null.vsAccessor- The VirtualSpace participant, null for none.defaultTextTable- The default text table to expand for new items, null for none.undoRedo- The undo/redo instance.
Method Details
dispose
public void dispose()Disposes of the instance.assignTextControl
Assigns the StyledText instance for form editing.assignTextControl
public void assignTextControl(org.eclipse.swt.widgets.Text text, org.eclipse.jface.viewers.ViewerCell cell) Assigns the Text instance for direct editing in tables.getCurrentNonErroredKString
Gets the current KString from current cell.- Returns:
- The KString, null for none (or KStringProp entry in error).
updateStates
Updates the states for the specified KString.- Parameters:
prop- The current KStringProp, can be null for none.
openRichTextDialog
public void openRichTextDialog()Shows the rich text dialog box.caretMoved
public void caretMoved(org.eclipse.swt.custom.CaretEvent event) This method is called after the caret offset is changed. The following event fields are used:- event.caretOffset the new caret offset (input)
- Specified by:
caretMovedin interfaceorg.eclipse.swt.custom.CaretListener- Parameters:
event- the given event- See Also:
CaretEvent