io.annot8.common.data.bounds.AbstractCellBounds Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of annot8-common-data Show documentation
Show all versions of annot8-common-data Show documentation
Common data (bounds and content) definitions
The newest version!
/* Annot8 (annot8.io) - Licensed under Apache-2.0. */
package io.annot8.common.data.bounds;
import io.annot8.api.bounds.Bounds;
import io.annot8.api.data.Content;
import io.annot8.common.data.content.Table;
import io.annot8.common.data.content.TableContent;
public abstract class AbstractCellBounds implements Bounds {
@Override
public > boolean isValid(C content) {
return content instanceof TableContent;
}
protected boolean isCellReferenceValid(TableContent content, int row, int column) {
Table table = content.getData();
if (row < 0 || table.getRowCount() <= row) {
return false;
}
return column >= 0 && column < table.getColumnCount();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy