Search in sources :

Example 11 with ResizeEvent

use of com.google.gwt.event.logical.shared.ResizeEvent in project activityinfo by bedatadriven.

the class FullScreenOverlay method show.

public void show(IsWidget widget) {
    this.widget = widget.asWidget();
    container = new AbsolutePanel();
    container.addStyleName(BaseStylesheet.CONTAINER_STYLE);
    container.addStyleName(BUNDLE.style().container());
    container.add(widget);
    sizeContainer();
    popupPanel = new PopupPanel(false);
    popupPanel.setPopupPosition(LEFT_MARGIN, 0);
    popupPanel.setWidget(container);
    popupPanel.show();
    Roles.getDialogRole().set(popupPanel.getElement());
    Window.addResizeHandler(new ResizeHandler() {

        Timer resizeTimer = new Timer() {

            @Override
            public void run() {
                sizeContainer();
            }
        };

        @Override
        public void onResize(ResizeEvent event) {
            resizeTimer.cancel();
            resizeTimer.schedule(250);
        }
    });
}
Also used : Timer(com.google.gwt.user.client.Timer) ResizeHandler(com.google.gwt.event.logical.shared.ResizeHandler) PopupPanel(com.google.gwt.user.client.ui.PopupPanel) AbsolutePanel(com.google.gwt.user.client.ui.AbsolutePanel) ResizeEvent(com.google.gwt.event.logical.shared.ResizeEvent)

Example 12 with ResizeEvent

use of com.google.gwt.event.logical.shared.ResizeEvent in project mvp4g2-examples by mvp4g.

the class TextField method createWidget.

private void createWidget() {
    widgetPanel = new ResizeLayoutPanel();
    widgetPanel.addStyleName(style.widgetPanel());
    widgetPanel.addResizeHandler(new ResizeHandler() {

        @Override
        public void onResize(ResizeEvent event) {
            forceLayout();
        }
    });
    panel = new FlowPanel();
    panel.addStyleName(style.panel());
    widgetPanel.add(panel);
    label = new Label();
    label.addStyleName(style.label());
    panel.add(label);
    textBox = new TextBox();
    textBox.addStyleName(style.textBox());
    panel.add(textBox);
    initWidget(widgetPanel);
}
Also used : ResizeHandler(com.google.gwt.event.logical.shared.ResizeHandler) ResizeEvent(com.google.gwt.event.logical.shared.ResizeEvent)

Example 13 with ResizeEvent

use of com.google.gwt.event.logical.shared.ResizeEvent in project pentaho-platform by pentaho.

the class SolutionBrowserPanel method buildUI.

private void buildUI() {
    FlowPanel topPanel = new FlowPanel();
    SimplePanel toolbarWrapper = new SimplePanel();
    toolbarWrapper.setWidget(new BrowserToolbar());
    // $NON-NLS-1$
    toolbarWrapper.setStyleName("files-toolbar");
    topPanel.add(toolbarWrapper);
    topPanel.add(new SolutionTreeWrapper(solutionTree));
    solutionNavigatorPanel.setStyleName("puc-vertical-split-panel");
    solutionNavigatorPanel.setWidth("100%");
    solutionNavigatorPanel.addNorth(topPanel, 500);
    solutionNavigatorPanel.add(filesListPanel);
    navigatorAndContentSplit.setStyleName("puc-horizontal-split-panel");
    navigatorAndContentSplit.addWest(solutionNavigatorPanel, 300);
    navigatorAndContentSplit.add(contentTabPanel);
    navigatorAndContentSplit.getElement().setAttribute("id", "solutionNavigatorAndContentPanel");
    Window.addResizeHandler(new ResizeHandler() {

        @Override
        public void onResize(ResizeEvent event) {
            adjustContentPanelSize();
        }
    });
    solutionNavigatorPanel.getElement().getParentElement().addClassName("puc-navigator-panel");
    solutionNavigatorPanel.getElement().getParentElement().removeAttribute("style");
    // $NON-NLS-1$
    setStyleName("panelWithTitledToolbar");
    // $NON-NLS-1$
    setHeight("100%");
    // $NON-NLS-1$
    setWidth("100%");
    add(navigatorAndContentSplit);
    sinkEvents(Event.MOUSEEVENTS);
    navigatorAndContentSplit.getWidget(1).setWidth("100%");
    navigatorAndContentSplit.getElement().getStyle().setHeight(1, Unit.PX);
    contentTabPanel.getElement().getStyle().setHeight(1, Unit.PX);
}
Also used : BrowserToolbar(org.pentaho.mantle.client.solutionbrowser.toolbars.BrowserToolbar) ResizeHandler(com.google.gwt.event.logical.shared.ResizeHandler) FlowPanel(com.google.gwt.user.client.ui.FlowPanel) SimplePanel(com.google.gwt.user.client.ui.SimplePanel) SolutionTreeWrapper(org.pentaho.mantle.client.solutionbrowser.tree.SolutionTreeWrapper) ResizeEvent(com.google.gwt.event.logical.shared.ResizeEvent)

Aggregations

ResizeEvent (com.google.gwt.event.logical.shared.ResizeEvent)13 ResizeHandler (com.google.gwt.event.logical.shared.ResizeHandler)13 Timer (com.google.gwt.user.client.Timer)2 FlowPanel (com.google.gwt.user.client.ui.FlowPanel)2 ColumnResizeEvent (org.kie.workbench.common.widgets.decoratedgrid.client.widget.events.ColumnResizeEvent)2 Element (com.google.gwt.dom.client.Element)1 LargeMapControl (com.google.gwt.maps.client.control.LargeMapControl)1 ClosingEvent (com.google.gwt.user.client.Window.ClosingEvent)1 ClosingHandler (com.google.gwt.user.client.Window.ClosingHandler)1 AbsolutePanel (com.google.gwt.user.client.ui.AbsolutePanel)1 PopupPanel (com.google.gwt.user.client.ui.PopupPanel)1 SimplePanel (com.google.gwt.user.client.ui.SimplePanel)1 SuggestBox (com.google.gwt.user.client.ui.SuggestBox)1 TextBox (com.google.gwt.user.client.ui.TextBox)1 TextBoxBase (com.google.gwt.user.client.ui.TextBoxBase)1 VerticalPanel (com.google.gwt.user.client.ui.VerticalPanel)1 DblClickEvent (com.googlecode.gwtmapquest.transaction.event.DblClickEvent)1 DblClickHandler (com.googlecode.gwtmapquest.transaction.event.DblClickHandler)1 MoveEndEvent (com.googlecode.gwtmapquest.transaction.event.MoveEndEvent)1 MoveEndHandler (com.googlecode.gwtmapquest.transaction.event.MoveEndHandler)1