Class InlineCellEditEvent

  • All Implemented Interfaces:
    ILayerEvent

    public class InlineCellEditEvent
    extends Object
    implements ILayerEvent
    This event is used to activate an editor inline. It is used internally if a single cell should be edited by selection, e.g. on pressing the F2 key on the current selected cell.

    This event is needed to do the translation of the coordinates and bounds needed for inline editing. On activating an editor via selection these informations are not known and need to be evaluated through the layer event handlers.

    • Constructor Detail

      • InlineCellEditEvent

        public InlineCellEditEvent​(PositionCoordinate cellCoordinate,
                                   org.eclipse.swt.widgets.Composite parent,
                                   IConfigRegistry configRegistry,
                                   Object initialValue)
        Parameters:
        cellCoordinate - The coordinates of the cell to edit for the set layer.
        parent - The parent Composite, needed for the creation of the editor control.
        configRegistry - The IConfigRegistry containing the configuration of the current NatTable instance the command should be executed for. This is necessary because the edit controllers in the current architecture are not aware of the instance they are running in.
        initialValue - The value that should be put to the activated editor control.
        Since:
        1.6
    • Method Detail

      • convertToLocal

        public boolean convertToLocal​(ILayer localLayer)
        Description copied from interface: ILayerEvent
        Convert the column/row positions carried by the event to the layer about to handle the event.
        Specified by:
        convertToLocal in interface ILayerEvent
        Parameters:
        localLayer - layer about to receive the event
        Returns:
        TRUE if successfully converted, FALSE otherwise
      • getColumnPosition

        public int getColumnPosition()
        Returns:
        The column position of the cell to edit.
      • getRowPosition

        public int getRowPosition()
        Returns:
        The row position of the cell to edit.
      • getParent

        public org.eclipse.swt.widgets.Composite getParent()
        Returns:
        The parent Composite, needed for the creation of the editor control.
      • getConfigRegistry

        public IConfigRegistry getConfigRegistry()
        Returns:
        The IConfigRegistry containing the configuration of the current NatTable instance the command should be executed for. This is necessary because the edit controllers in the current architecture are not aware of the instance they are running in.
      • getInitialValue

        public Object getInitialValue()
        Returns:
        The value that should be put to the activated editor control.