Class ColumnVisualChangeEvent
- java.lang.Object
-
- org.eclipse.nebula.widgets.nattable.layer.event.ColumnVisualChangeEvent
-
- All Implemented Interfaces:
ILayerEvent
,IVisualChangeEvent
- Direct Known Subclasses:
ColumnHeaderSelectionEvent
,ColumnSelectionEvent
,ColumnStructuralChangeEvent
,ColumnVisualUpdateEvent
,RenameColumnHeaderEvent
,SortColumnEvent
public abstract class ColumnVisualChangeEvent extends Object implements IVisualChangeEvent
An event that indicates a visible change to one ore more columns in the layer.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ColumnVisualChangeEvent(ColumnVisualChangeEvent event)
Creates a new ColumnVisualChangeEvent based on the given instance.ColumnVisualChangeEvent(ILayer layer, int columnPosition)
Creates a new ColumnVisualChangeEvent based on the given information.ColumnVisualChangeEvent(ILayer layer, Collection<Range> columnPositionRanges)
Creates a new ColumnVisualChangeEvent based on the given information.ColumnVisualChangeEvent(ILayer layer, Collection<Range> columnPositionRanges, int... columnIndexes)
Creates a new ColumnVisualChangeEvent based on the given information.ColumnVisualChangeEvent(ILayer layer, Collection<Range> columnPositionRanges, Collection<Integer> columnIndexes)
Creates a new ColumnVisualChangeEvent based on the given information.ColumnVisualChangeEvent(ILayer layer, Range... columnPositionRanges)
Creates a new ColumnVisualChangeEvent based on the given information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
convertToLocal(ILayer localLayer)
Convert the column/row positions carried by the event to the layer about to handle the event.Collection<org.eclipse.swt.graphics.Rectangle>
getChangedPositionRectangles()
int[]
getColumnIndexes()
Collection<Range>
getColumnPositionRanges()
ILayer
getLayer()
protected void
setColumnPositionRanges(Collection<Range> columnPositionRanges)
Sets the column position ranges for the columns that have changed.String
toString()
-
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.event.ILayerEvent
cloneEvent
-
-
-
-
Constructor Detail
-
ColumnVisualChangeEvent
public ColumnVisualChangeEvent(ILayer layer, int columnPosition)
Creates a new ColumnVisualChangeEvent based on the given information.- Parameters:
layer
- The ILayer to which the given column position matches.columnPosition
- The column position of the column that has changed.
-
ColumnVisualChangeEvent
public ColumnVisualChangeEvent(ILayer layer, Range... columnPositionRanges)
Creates a new ColumnVisualChangeEvent based on the given information.- Parameters:
layer
- The ILayer to which the given column positions match.columnPositionRanges
- The column position ranges for the columns that have changed.
-
ColumnVisualChangeEvent
public ColumnVisualChangeEvent(ILayer layer, Collection<Range> columnPositionRanges)
Creates a new ColumnVisualChangeEvent based on the given information.- Parameters:
layer
- The ILayer to which the given column positions match.columnPositionRanges
- The column position ranges for the columns that have changed.
-
ColumnVisualChangeEvent
public ColumnVisualChangeEvent(ILayer layer, Collection<Range> columnPositionRanges, Collection<Integer> columnIndexes)
Creates a new ColumnVisualChangeEvent based on the given information.- Parameters:
layer
- The ILayer to which the given column positions match.columnPositionRanges
- The column position ranges for the columns that have changed.columnIndexes
- The indexes of the columns that have changed.- Since:
- 1.6
-
ColumnVisualChangeEvent
public ColumnVisualChangeEvent(ILayer layer, Collection<Range> columnPositionRanges, int... columnIndexes)
Creates a new ColumnVisualChangeEvent based on the given information.- Parameters:
layer
- The ILayer to which the given column positions match.columnPositionRanges
- The column position ranges for the columns that have changed.columnIndexes
- The indexes of the columns that have changed.- Since:
- 2.0
-
ColumnVisualChangeEvent
protected ColumnVisualChangeEvent(ColumnVisualChangeEvent event)
Creates a new ColumnVisualChangeEvent based on the given instance. Mainly needed for cloning.- Parameters:
event
- The ColumnVisualChangeEvent out of which the new instance should be created.
-
-
Method Detail
-
getLayer
public ILayer getLayer()
- Specified by:
getLayer
in interfaceIVisualChangeEvent
- Returns:
- the layer that the visible change event is originating from.
-
getColumnPositionRanges
public Collection<Range> getColumnPositionRanges()
- Returns:
- The column position ranges for the columns that have changed.
-
setColumnPositionRanges
protected void setColumnPositionRanges(Collection<Range> columnPositionRanges)
Sets the column position ranges for the columns that have changed. Only for internal use in cases where the constructor needs to calculate the column position ranges within the child constructor.- Parameters:
columnPositionRanges
- The column position ranges for the columns that have changed.
-
getColumnIndexes
public int[] getColumnIndexes()
- Returns:
- The indexes of the columns that have changed.
- Since:
- 2.0
-
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 interfaceILayerEvent
- Parameters:
localLayer
- layer about to receive the event- Returns:
- TRUE if successfully converted, FALSE otherwise
-
getChangedPositionRectangles
public Collection<org.eclipse.swt.graphics.Rectangle> getChangedPositionRectangles()
- Specified by:
getChangedPositionRectangles
in interfaceIVisualChangeEvent
- Returns:
- the position rectangles that have changed and need to be redrawn. If no rectangles are returned, then the receiver should assume that the entire layer is changed and will need to be redrawn.
-
-