org.eclipse.nebula.widgets.nattable.edit.event
Class InlineCellEditEvent

java.lang.Object
  extended by org.eclipse.nebula.widgets.nattable.edit.event.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 Summary
InlineCellEditEvent(ILayer layer, PositionCoordinate cellCoordinate, org.eclipse.swt.widgets.Composite parent, IConfigRegistry configRegistry, Object initialValue)
           
 
Method Summary
 InlineCellEditEvent cloneEvent()
           
 boolean convertToLocal(ILayer localLayer)
          Convert the column/row positions carried by the event to the layer about to handle the event.
 int getColumnPosition()
           
 IConfigRegistry getConfigRegistry()
           
 Object getInitialValue()
           
 org.eclipse.swt.widgets.Composite getParent()
           
 int getRowPosition()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InlineCellEditEvent

public InlineCellEditEvent(ILayer layer,
                           PositionCoordinate cellCoordinate,
                           org.eclipse.swt.widgets.Composite parent,
                           IConfigRegistry configRegistry,
                           Object initialValue)
Parameters:
layer - The layer the cellCoordinates rely on.
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.
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.

cloneEvent

public InlineCellEditEvent cloneEvent()
Specified by:
cloneEvent in interface ILayerEvent
Returns:
A cloned copy of the event. This cloned copy is provided to each listener.


Copyright © 2014. All rights reserved.