Class GenericEditingSupport<T,V>

java.lang.Object
org.eclipse.jface.viewers.EditingSupport
com.amalgamasimulation.desktop.binding.editingsupports.GenericEditingSupport<T,V>
Type Parameters:
T - type of row value
V - type of column value (cell value)
Direct Known Subclasses:
ButtonEditingSupport, CheckBoxEditingSupport, ColorEditingSupport, ComboBoxEditingSupport, EMFTextIdEditingSupport, TextEditingSupport

public abstract class GenericEditingSupport<T,V> extends org.eclipse.jface.viewers.EditingSupport
Class adapter for generic
Author:
Ionov Ivan
  • Field Details

    • viewer

      protected org.eclipse.jface.viewers.ColumnViewer viewer
    • parent

      protected org.eclipse.swt.widgets.Composite parent
    • canEditCell

      protected Predicate<T> canEditCell
      A function that returns a value that indicates whether the cell can be edited.
  • Constructor Details

    • GenericEditingSupport

      protected GenericEditingSupport(org.eclipse.jface.viewers.ColumnViewer viewer, org.eclipse.swt.widgets.Composite parent)
  • Method Details

    • getCellEditorInternal

      protected abstract org.eclipse.jface.viewers.CellEditor getCellEditorInternal(T element)
    • getValueInternal

      protected abstract Object getValueInternal(T element)
    • setValueInternal

      protected abstract void setValueInternal(T element, V value)
    • getCellEditor

      protected org.eclipse.jface.viewers.CellEditor getCellEditor(Object element)
      Specified by:
      getCellEditor in class org.eclipse.jface.viewers.EditingSupport
    • canEdit

      protected boolean canEdit(Object element)
      Specified by:
      canEdit in class org.eclipse.jface.viewers.EditingSupport
    • canEditInternal

      protected boolean canEditInternal(T element)
    • getValue

      protected Object getValue(Object element)
      Specified by:
      getValue in class org.eclipse.jface.viewers.EditingSupport
    • setValue

      protected void setValue(Object element, Object value)
      Specified by:
      setValue in class org.eclipse.jface.viewers.EditingSupport
    • initializeCellEditorValueInternal

      protected void initializeCellEditorValueInternal(org.eclipse.jface.viewers.CellEditor cellEditor, org.eclipse.jface.viewers.ViewerCell cell, T element)
    • initializeCellEditorValue

      protected void initializeCellEditorValue(org.eclipse.jface.viewers.CellEditor cellEditor, org.eclipse.jface.viewers.ViewerCell cell)
      Overrides:
      initializeCellEditorValue in class org.eclipse.jface.viewers.EditingSupport
    • setCanEditCell

      public GenericEditingSupport<T,V> setCanEditCell(Predicate<T> canEditCell)
      Set function canEditCell
      Parameters:
      canEditCell - function that returns a value that indicates whether the cell can be edited.
      Returns:
      this object