Class FormattedTextCellEditor

java.lang.Object
org.eclipse.jface.viewers.CellEditor
org.eclipse.jface.viewers.TextCellEditor
org.eclipse.nebula.widgets.formattedtext.FormattedTextCellEditor

public class FormattedTextCellEditor
extends org.eclipse.jface.viewers.TextCellEditor
A CellEditor based on a FormattedText. It extends the TextCellEditor, adding formatting capabilities based on an IFormatter. A formatter can be associated with the editor with the setFormatter method. If not, a formatter is automatically created at the first call of the setValue method, based on the type of the value.
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.eclipse.jface.viewers.CellEditor

    org.eclipse.jface.viewers.CellEditor.LayoutData
  • Field Summary

    Fields 
    Modifier and Type Field Description
    protected FormattedText formattedText  

    Fields inherited from class org.eclipse.jface.viewers.TextCellEditor

    text

    Fields inherited from class org.eclipse.jface.viewers.CellEditor

    COPY, CUT, DELETE, FIND, PASTE, REDO, SELECT_ALL, UNDO
  • Constructor Summary

    Constructors 
    Constructor Description
    FormattedTextCellEditor​(org.eclipse.swt.widgets.Composite parent)
    Creates a new formatted text cell editor parented under the given control.
    FormattedTextCellEditor​(org.eclipse.swt.widgets.Composite parent, int style)
    Creates a new formatted text cell editor parented under the given control.
  • Method Summary

    Modifier and Type Method Description
    protected org.eclipse.swt.widgets.Control createControl​(org.eclipse.swt.widgets.Composite parent)  
    protected java.lang.Object doGetValue()  
    protected void doSetValue​(java.lang.Object value)  
    FormattedText getFormattedText()
    Returns the FormattedText object used by this cell editor.
    void setFormatter​(ITextFormatter formatter)
    Sets the formatter that this cell editor must use to edit the value.

    Methods inherited from class org.eclipse.jface.viewers.TextCellEditor

    dependsOnExternalFocusListener, doSetFocus, editOccured, getLayoutData, handleDefaultSelection, isCopyEnabled, isCutEnabled, isDeleteEnabled, isPasteEnabled, isSaveAllEnabled, isSelectAllEnabled, keyReleaseOccured, performCopy, performCut, performDelete, performPaste, performSelectAll

    Methods inherited from class org.eclipse.jface.viewers.CellEditor

    activate, activate, addListener, addPropertyChangeListener, create, deactivate, deactivate, dispose, fireApplyEditorValue, fireCancelEditor, fireEditorValueChanged, fireEnablementChanged, focusLost, getControl, getDoubleClickTimeout, getErrorMessage, getStyle, getValidator, getValue, isActivated, isCorrect, isDirty, isFindEnabled, isRedoEnabled, isUndoEnabled, isValueValid, markDirty, performFind, performRedo, performUndo, removeListener, removePropertyChangeListener, setErrorMessage, setFocus, setStyle, setValidator, setValue, setValueValid, valueChanged

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • FormattedTextCellEditor

      public FormattedTextCellEditor​(org.eclipse.swt.widgets.Composite parent)
      Creates a new formatted text cell editor parented under the given control.
      Parameters:
      parent - the parent control
    • FormattedTextCellEditor

      public FormattedTextCellEditor​(org.eclipse.swt.widgets.Composite parent, int style)
      Creates a new formatted text cell editor parented under the given control.
      Parameters:
      parent - the parent control
      style - the style bits
  • Method Details

    • createControl

      protected org.eclipse.swt.widgets.Control createControl​(org.eclipse.swt.widgets.Composite parent)
      Overrides:
      createControl in class org.eclipse.jface.viewers.TextCellEditor
      See Also:
      TextCellEditor.createControl(org.eclipse.swt.widgets.Composite)
    • doGetValue

      protected java.lang.Object doGetValue()
      Overrides:
      doGetValue in class org.eclipse.jface.viewers.TextCellEditor
      See Also:
      TextCellEditor.doGetValue()
    • doSetValue

      protected void doSetValue​(java.lang.Object value)
      Overrides:
      doSetValue in class org.eclipse.jface.viewers.TextCellEditor
      See Also:
      TextCellEditor.doSetValue(java.lang.Object)
    • getFormattedText

      public FormattedText getFormattedText()
      Returns the FormattedText object used by this cell editor.
      Returns:
      FormattedText object
    • setFormatter

      public void setFormatter​(ITextFormatter formatter)
      Sets the formatter that this cell editor must use to edit the value.
      Parameters:
      formatter - the formatter