| package org.eclipse.nebula.widgets.nattable.core.layer.axis.segment.impl |
| |
| import org.eclipse.nebula.widgets.nattable.core.layer.axis.Axis |
| |
| /** |
| * A simple Segment that supports reading but not writing its data value. |
| */ |
| class ReadOnlySegment extends AbstractSegment { |
| |
| val Object dataValue |
| |
| new(Axis axis, int segmentPosition, Object dataValue) { |
| this(axis, segmentPosition, 1, dataValue) |
| } |
| |
| new(Axis axis, int segmentPosition, int segmentSpan, Object dataValue) { |
| super(axis, segmentPosition, segmentSpan) |
| |
| this.dataValue = dataValue |
| } |
| |
| // Segment interface |
| |
| override getDataValue() { |
| dataValue |
| } |
| |
| override setDataValue(Object newValue) { |
| throw new UnsupportedOperationException("TODO: auto-generated method stub") |
| } |
| |
| } |