Class BaseRowReorderLayerFixture
- java.lang.Object
-
- org.eclipse.nebula.widgets.nattable.layer.AbstractLayer
-
- org.eclipse.nebula.widgets.nattable.layer.AbstractLayerTransform
-
- org.eclipse.nebula.widgets.nattable.reorder.RowReorderLayer
-
- org.eclipse.nebula.widgets.nattable.test.fixture.layer.BaseRowReorderLayerFixture
-
- All Implemented Interfaces:
ILayer
,ILayerListener
,IUniqueIndexLayer
,IPersistable
public class BaseRowReorderLayerFixture extends RowReorderLayer
This fixture provides a base vanilla RowReorderLayer. In order to keep a test's scope narrow, this class exposes the reorderRowPositions method, this way we can reorder during testing without having to use commands.
-
-
Field Summary
-
Fields inherited from class org.eclipse.nebula.widgets.nattable.reorder.RowReorderLayer
indexPositionMapping, PERSISTENCE_KEY_ROW_INDEX_ORDER, rowIndexOrder
-
Fields inherited from class org.eclipse.nebula.widgets.nattable.layer.AbstractLayerTransform
underlyingLayer
-
Fields inherited from class org.eclipse.nebula.widgets.nattable.layer.AbstractLayer
commandHandlers, eventHandlers, eventHelperLock, layerPainter
-
Fields inherited from interface org.eclipse.nebula.widgets.nattable.persistence.IPersistable
DOT, VALUE_SEPARATOR
-
-
Constructor Summary
Constructors Constructor Description BaseRowReorderLayerFixture(IUniqueIndexLayer underlyingLayer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
reorderRowPosition(int fromRowPosition, int toRowPosition)
Reorders the row at the given from position to the TOP of the of the given to position.-
Methods inherited from class org.eclipse.nebula.widgets.nattable.reorder.RowReorderLayer
doCommand, getColumnPositionByIndex, getReorderFromRowPosition, getRowIndexByPosition, getRowIndexOrder, getRowIndexOrderArray, getRowPositionByIndex, getRowPositionByY, getStartYOfRowPosition, handleLayerEvent, invalidateCache, isRestoredStateValid, loadState, localToUnderlyingRowPosition, populateIndexOrder, refreshIndexPositionMapping, registerCommandHandlers, reorderMultipleRowIndexes, reorderMultipleRowIndexes, reorderMultipleRowPositions, reorderMultipleRowPositions, reorderMultipleRowPositions, reorderMultipleRowPositions, reorderRowPosition, resetReorder, saveState, setReorderFromRowPosition, underlyingToLocalRowPosition, underlyingToLocalRowPositions
-
Methods inherited from class org.eclipse.nebula.widgets.nattable.layer.AbstractLayerTransform
configure, dispose, getCellByPosition, getCellPainter, getColumnCount, getColumnIndexByPosition, getColumnPositionByX, getColumnWidthByPosition, getConfigLabelsByPosition, getDataValueByPosition, getDisplayModeByPosition, getHeight, getLayerPainter, getPreferredColumnCount, getPreferredHeight, getPreferredRowCount, getPreferredWidth, getRegionLabelsByXY, getRowCount, getRowHeightByPosition, getStartXOfColumnPosition, getUnderlyingLayer, getUnderlyingLayerByPosition, getUnderlyingLayersByColumnPosition, getUnderlyingLayersByRowPosition, getWidth, isColumnPositionResizable, isDynamicSizeLayer, isRowPositionResizable, localToUnderlyingColumnPosition, setClientAreaProvider, setUnderlyingLayer, underlyingToLocalColumnPosition, underlyingToLocalColumnPositions
-
Methods inherited from class org.eclipse.nebula.widgets.nattable.layer.AbstractLayer
addConfiguration, addLayerListener, clearConfiguration, fireLayerEvent, getBoundsByPosition, getClientAreaProvider, getConfigLabelAccumulator, getProvidedLabels, getRegionName, hasLayerListener, registerCommandHandler, registerEventHandler, registerPersistable, removeLayerListener, setConfigLabelAccumulator, setLayerPainter, setRegionName, toString, unregisterCommandHandler, unregisterEventHandler, unregisterPersistable
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.nebula.widgets.nattable.layer.ILayer
addLayerListener, configure, dispose, fireLayerEvent, getBoundsByPosition, getCellByPosition, getCellPainter, getClientAreaProvider, getColumnCount, getColumnIndexByPosition, getColumnPositionByX, getColumnWidthByPosition, getConfigLabelsByPosition, getDataValueByPosition, getDisplayModeByPosition, getHeight, getLayerPainter, getPreferredColumnCount, getPreferredHeight, getPreferredRowCount, getPreferredWidth, getProvidedLabels, getRegionLabelsByXY, getRowCount, getRowHeightByPosition, getStartXOfColumnPosition, getUnderlyingLayerByPosition, getUnderlyingLayersByColumnPosition, getUnderlyingLayersByRowPosition, getWidth, hasLayerListener, isColumnPositionResizable, isDynamicSizeLayer, isRowPositionResizable, localToUnderlyingColumnPosition, registerCommandHandler, registerPersistable, removeLayerListener, setClientAreaProvider, underlyingToLocalColumnPosition, underlyingToLocalColumnPositions, unregisterCommandHandler, unregisterPersistable
-
-
-
-
Constructor Detail
-
BaseRowReorderLayerFixture
public BaseRowReorderLayerFixture(IUniqueIndexLayer underlyingLayer)
-
-
Method Detail
-
reorderRowPosition
public void reorderRowPosition(int fromRowPosition, int toRowPosition)
Description copied from class:RowReorderLayer
Reorders the row at the given from position to the TOP of the of the given to position. Will calculate whether the move is done above the to position or not regarding the position in the NatTable.- Overrides:
reorderRowPosition
in classRowReorderLayer
- Parameters:
fromRowPosition
- row position to movetoRowPosition
- position to move the row to
-
-