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
Modifier and TypeFieldDescriptionfinal PartAction
The common actions.final PartAction
The common actions.final PartAction
The common actions.final PartAction
The common actions.final PartAction
The common actions.final PartAction
The common actions.final PartAction
The common actions.final PartAction
The common actions.final PartAction
The common actions.Constructor Summary
ConstructorDescriptionCommonTextActions
(org.eclipse.swt.widgets.Shell shell, ModuleModel model, TextTableEditor editor, IVSAccessor vsAccessor, EditorTextTable defaultTextTable, IPropUndoRedo undoRedo, Boolean useTags) Constructor.Method Summary
Modifier and TypeMethodDescriptionvoid
assignTextControl
(KStringStyledText styledText) Assigns the StyledText instance for form editing.void
assignTextControl
(org.eclipse.swt.widgets.Text text, org.eclipse.jface.viewers.ViewerCell cell) Assigns the Text instance for direct editing in tables.void
caretMoved
(org.eclipse.swt.custom.CaretEvent event) This method is called after the caret offset is changed.void
dispose()
Disposes of the instance.Gets the current KString from current cell.void
Shows the rich text dialog box.void
updateStates
(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:
caretMoved
in interfaceorg.eclipse.swt.custom.CaretListener
- Parameters:
event
- the given event- See Also:
CaretEvent