Search in sources :

Example 1 with StunnerDiagramEditorPreferences

use of org.kie.workbench.common.stunner.core.preferences.StunnerDiagramEditorPreferences in project kie-wb-common by kiegroup.

the class AbstractDiagramViewer method open.

@Override
public void open(final D diagram, final int width, final int height, final DiagramViewerCallback<D> callback) {
    final StunnerDiagramEditorPreferences editorPreferences = getPreferences(diagram);
    final boolean isHiDPIEnabled = null != editorPreferences && editorPreferences.isHiDPIEnabled();
    final CanvasSettings settings = new CanvasSettings(width, height, isHiDPIEnabled);
    this.open(diagram, settings, callback);
}
Also used : StunnerDiagramEditorPreferences(org.kie.workbench.common.stunner.core.preferences.StunnerDiagramEditorPreferences) CanvasSettings(org.kie.workbench.common.stunner.core.client.canvas.CanvasSettings)

Example 2 with StunnerDiagramEditorPreferences

use of org.kie.workbench.common.stunner.core.preferences.StunnerDiagramEditorPreferences in project kie-wb-common by kiegroup.

the class AbstractDiagramViewer method open.

@Override
@SuppressWarnings("unchecked")
public void open(final D diagram, final DiagramViewer.DiagramViewerCallback<D> callback) {
    final StunnerDiagramEditorPreferences editorPreferences = getPreferences(diagram);
    final boolean isHiDPIEnabled = null != editorPreferences && editorPreferences.isHiDPIEnabled();
    final CanvasSettings settings = new CanvasSettings(isHiDPIEnabled);
    this.open(diagram, settings, callback);
}
Also used : StunnerDiagramEditorPreferences(org.kie.workbench.common.stunner.core.preferences.StunnerDiagramEditorPreferences) CanvasSettings(org.kie.workbench.common.stunner.core.client.canvas.CanvasSettings)

Aggregations

CanvasSettings (org.kie.workbench.common.stunner.core.client.canvas.CanvasSettings)2 StunnerDiagramEditorPreferences (org.kie.workbench.common.stunner.core.preferences.StunnerDiagramEditorPreferences)2