blob: 7696c0acb881b42bca024ea1e05fefab6eb1630e [file] [log] [blame]
package org.eclipse.nebula.widgets.nattable.core.layer.cell.impl
import org.eclipse.nebula.widgets.nattable.core.geometry.PositionRectangle
import org.eclipse.nebula.widgets.nattable.core.layer.Layer
import org.eclipse.nebula.widgets.nattable.core.layer.cell.Cell
/**
* Useful base class for implementing a Cell.
*/
abstract class AbstractCell implements Cell {
val Layer layer
val PositionRectangle positionBounds
new(Layer layer, long columnPosition, long rowPosition) {
this(layer, columnPosition, rowPosition, 1, 1)
}
new(Layer layer, long columnPosition, long rowPosition, long columnSpan, long rowSpan) {
this.layer = layer
this.positionBounds = new PositionRectangle(columnPosition, rowPosition, columnSpan, rowSpan)
}
// Cell interface
override getLayer() { layer }
override getPositionBounds() { positionBounds }
}