| package org.eclipse.nebula.widgets.nattable.core.layer.axis.segment.impl |
| |
| import org.eclipse.nebula.widgets.nattable.core.layer.axis.Axis |
| import org.eclipse.nebula.widgets.nattable.core.layer.axis.segment.Segment |
| |
| /** |
| * Useful base class for implementing an Axis. |
| */ |
| abstract class AbstractSegment implements Segment { |
| |
| val Axis axis |
| val int position |
| val int span |
| |
| new(Axis axis, int position) { |
| this(axis, position, 1) |
| } |
| |
| new(Axis axis, int position, int span) { |
| this.axis = axis |
| this.position = position |
| this.span = span |
| } |
| |
| // Segment interface |
| |
| override getAxis() { axis } |
| override getPosition() { position } |
| override getSpan() { span } |
| |
| } |