use of org.kie.workbench.common.stunner.core.client.session.impl.AbstractClientSession in project kie-wb-common by kiegroup.
the class SessionDiagramPreviewScreen method doOpenDiagram.
@Override
protected void doOpenDiagram() {
final AbstractClientSession session = getSession();
if (null != session) {
newPreview(() -> sessionPreview.open(session, WIDTH, HEIGHT, new SessionViewer.SessionViewerCallback<AbstractClientSession, Diagram>() {
@Override
public void afterCanvasInitialized() {
}
@Override
public void onSuccess() {
LOGGER.log(FINE, "Session's preview completed for [" + session + "]");
view.showScreenView(sessionPreview.getView());
}
@Override
public void onError(final ClientRuntimeError error) {
LOGGER.log(SEVERE, "Error while showing session preview for [" + session + "]. " + "Error=[" + error + "]");
}
}));
} else {
LOGGER.log(WARNING, "Trying to open a null session!");
}
}
use of org.kie.workbench.common.stunner.core.client.session.impl.AbstractClientSession in project kie-wb-common by kiegroup.
the class BaseNavigateCommand method enableHandlers.
protected void enableHandlers(final boolean enabled) {
final CanvasHandler handler = getCanvasHandler();
if (handler == null) {
return;
}
final Layer layer = handler.getCanvas().getLayer();
if (enabled) {
layer.enableHandlers();
((AbstractClientSession) sessionManager.getCurrentSession()).resume();
} else {
layer.disableHandlers();
((AbstractClientSession) sessionManager.getCurrentSession()).pause();
}
}
Aggregations