use of net.imagej.display.DatasetView in project imagej-ui-swing by imagej.
the class JHotDrawImageCanvas method rebuild.
// -- Internal methods --
void rebuild() {
for (final DataView dataView : getDisplay()) {
FigureView figureView = getFigureView(dataView);
if (figureView == null) {
if (dataView instanceof DatasetView) {
figureView = new DatasetFigureView(this.displayViewer, (DatasetView) dataView);
} else if (dataView instanceof OverlayView) {
figureView = new OverlayFigureView(this.displayViewer, (OverlayView) dataView);
} else {
log.error("Don't know how to make a figure view for " + dataView.getClass().getName());
continue;
}
figureViews.add(figureView);
}
}
int idx = 0;
while (idx < figureViews.size()) {
final FigureView figureView = figureViews.get(idx);
if (!getDisplay().contains(figureView.getDataView())) {
figureViews.remove(idx);
figureView.dispose();
} else {
idx++;
}
}
}
Aggregations