use of org.uberfire.client.workbench.widgets.listbar.ResizeFlowPanel in project kie-wb-common by kiegroup.
the class BaseNavigateCommand method addExpressionEditorToCanvasWidget.
protected void addExpressionEditorToCanvasWidget() {
final ResizeFlowPanel container = wrapElementForErrai1090();
presenter.getView().setCanvasWidget(container);
presenter.getView().setContentScrollType(SessionPresenter.View.ScrollType.CUSTOM);
Scheduler.get().scheduleDeferred(container::onResize);
}
use of org.uberfire.client.workbench.widgets.listbar.ResizeFlowPanel in project kie-wb-common by kiegroup.
the class BaseNavigateCommand method wrapElementForErrai1090.
// See https://issues.jboss.org/browse/ERRAI-1090
// The Widget returned from ElementWrapperWidget does not implement interfaces
// defined on the editor.getElement() and hence RequiresResize is lost.
// Wrap the editor in a ResizeFlowPanel to support RequiresResize.
protected ResizeFlowPanel wrapElementForErrai1090() {
final Widget w = ElementWrapperWidget.getWidget(editor.getElement());
final ResizeFlowPanel container = new ResizeFlowPanel() {
@Override
public void onResize() {
super.onResize();
editor.getView().onResize();
}
};
container.getElement().setId("dmn-expression-editor-container");
container.getElement().getStyle().setDisplay(Style.Display.FLEX);
container.getElement().getStyle().setWidth(100.0, Style.Unit.PCT);
container.getElement().getStyle().setHeight(100.0, Style.Unit.PCT);
container.add(w);
return container;
}
Aggregations