@Override public DataView createDataView(final Data data) { return imageDisplayService().createDataView(data); }
/** * Links a new {@link Overlay} and {@link OverlayView}, created by the given * {@link JHotDrawAdapter}, to the specified JHotDraw {@link Figure} of a * particular {@link ImageDisplay}. */ public <F extends Figure> void linkOverlay(final F figure, final JHotDrawAdapter<F> adapter, final ImageDisplay display) { final Overlay overlay = adapter.createNewOverlay(); final DataView view = imageDisplayService.createDataView(overlay); if (!(view instanceof OverlayView)) { throw new IllegalStateException("Unexpected data view: " + view); } final OverlayView overlayView = (OverlayView) view; adapter.updateOverlay(figure, overlayView); eventService.publish(new FigureCreatedEvent(overlayView, figure, display)); }
"An ImageDisplayService is required to display Data objects"); dataView = imageDisplayService.createDataView(data);