Search in sources :

Example 1 with WidgetListener

use of com.extjs.gxt.ui.client.event.WidgetListener in project geo-platform by geosdi.

the class GeoPlatformLayoutManager method createCenter.

/**
 * Create Center Panel in Main UI
 */
private void createCenter() {
    center = new ContentPanel();
    center.setHeaderVisible(false);
    BorderLayoutData data = new BorderLayoutData(LayoutRegion.CENTER);
    data.setMargins(new Margins(5, 5, 5, 5));
    center.setLayoutOnChange(true);
    center.addWidgetListener(new WidgetListener() {

        @Override
        public void widgetResized(ComponentEvent ce) {
            Dispatcher.forwardEvent(GeoPlatformEvents.UPDATE_CENTER);
            MapHandlerManager.fireEvent(new ScaleChangeEvent(XDOM.getViewportSize()));
        }
    });
    ToolBar toolBar = new ToolBar();
    statusMap = new Status();
    statusMap.setText(ApiModuleMessages.INSTANCE.GeoPlatformLayoutManager_wellcomeMessage(GWT.getModuleName()));
    statusMap.setWidth(150);
    toolBar.add(statusMap);
    toolBar.add(new FillToolItem());
    center.setBottomComponent(toolBar);
    viewport.add(center, data);
}
Also used : WidgetListener(com.extjs.gxt.ui.client.event.WidgetListener) Status(com.extjs.gxt.ui.client.widget.Status) BorderLayoutData(com.extjs.gxt.ui.client.widget.layout.BorderLayoutData) ToolBar(com.extjs.gxt.ui.client.widget.toolbar.ToolBar) Margins(com.extjs.gxt.ui.client.util.Margins) ScaleChangeEvent(org.geosdi.geoplatform.gui.configuration.map.puregwt.event.ScaleChangeEvent) ComponentEvent(com.extjs.gxt.ui.client.event.ComponentEvent) FillToolItem(com.extjs.gxt.ui.client.widget.toolbar.FillToolItem) ContentPanel(com.extjs.gxt.ui.client.widget.ContentPanel)

Example 2 with WidgetListener

use of com.extjs.gxt.ui.client.event.WidgetListener in project geo-platform by geosdi.

the class CatalogWMSCapabilitiesWidget method setWindowProperties.

@Override
public void setWindowProperties() {
    super.setLayout(new FitLayout());
    super.setResizable(Boolean.FALSE);
    super.setModal(Boolean.TRUE);
    super.setCollapsible(Boolean.FALSE);
    super.setPlain(Boolean.TRUE);
    super.addWidgetListener(new WidgetListener() {

        @Override
        public void widgetAttached(ComponentEvent ce) {
            catalogGridLayers.getGrid().setHeight(300);
        }
    });
}
Also used : WidgetListener(com.extjs.gxt.ui.client.event.WidgetListener) ComponentEvent(com.extjs.gxt.ui.client.event.ComponentEvent) FitLayout(com.extjs.gxt.ui.client.widget.layout.FitLayout)

Example 3 with WidgetListener

use of com.extjs.gxt.ui.client.event.WidgetListener in project geo-platform by geosdi.

the class LayerManagementWidget method setPanelProperties.

@Override
public void setPanelProperties() {
    setHeadingHtml(LayerModuleConstants.INSTANCE.LayerManagementWidget_headingText());
    setLayout(new BorderLayout());
    setLayoutOnChange(TRUE);
    addWidgetListener(new WidgetListener() {

        @Override
        public void widgetResized(ComponentEvent ce) {
            if (getHeight() > 0) {
                layerTreePanel.setHeight(getHeight() - 220);
                if (LayerBeanLayoutFactory.getLayerBeanLayout().getLayerTreePosition() != LayerBeanLayoutFactory.getLayerBeanLayout().getLegendPosition()) {
                    legendPanel.setHeight(getHeight());
                    layerTreePanel.setHeight(getHeight() - 40);
                }
            }
        }
    });
    setScrollMode(Scroll.NONE);
}
Also used : WidgetListener(com.extjs.gxt.ui.client.event.WidgetListener) BorderLayout(com.extjs.gxt.ui.client.widget.layout.BorderLayout) ComponentEvent(com.extjs.gxt.ui.client.event.ComponentEvent)

Example 4 with WidgetListener

use of com.extjs.gxt.ui.client.event.WidgetListener in project geo-platform by geosdi.

the class GPCapabilitiesWidget method setWindowProperties.

@Override
public void setWindowProperties() {
    super.setResizable(false);
    super.addWindowListener(new WindowListener() {

        @Override
        public void windowShow(WindowEvent we) {
            gridLayers.loadServers();
        }
    });
    super.addWidgetListener(new WidgetListener() {

        @Override
        public void widgetAttached(ComponentEvent ce) {
            gridLayers.getGrid().setHeight(400);
        }
    });
    super.setLayout(new FitLayout());
    super.setModal(false);
    super.setCollapsible(true);
    super.setPlain(true);
}
Also used : WidgetListener(com.extjs.gxt.ui.client.event.WidgetListener) WindowListener(com.extjs.gxt.ui.client.event.WindowListener) WindowEvent(com.extjs.gxt.ui.client.event.WindowEvent) ComponentEvent(com.extjs.gxt.ui.client.event.ComponentEvent) FitLayout(com.extjs.gxt.ui.client.widget.layout.FitLayout)

Example 5 with WidgetListener

use of com.extjs.gxt.ui.client.event.WidgetListener in project geo-platform by geosdi.

the class UserPropertiesWidget method setWidgetProperties.

@Override
protected void setWidgetProperties() {
    super.setWidgetProperties();
    super.setLayout(new FitLayout());
    this.addWidgetListener(new WidgetListener() {

        @Override
        public void widgetAttached(ComponentEvent ce) {
            super.widgetAttached(ce);
            if (user != null) {
                userPropertiesBinding.bindModel(user);
            }
        }
    });
}
Also used : WidgetListener(com.extjs.gxt.ui.client.event.WidgetListener) ComponentEvent(com.extjs.gxt.ui.client.event.ComponentEvent) FitLayout(com.extjs.gxt.ui.client.widget.layout.FitLayout)

Aggregations

ComponentEvent (com.extjs.gxt.ui.client.event.ComponentEvent)6 WidgetListener (com.extjs.gxt.ui.client.event.WidgetListener)6 FitLayout (com.extjs.gxt.ui.client.widget.layout.FitLayout)3 WindowEvent (com.extjs.gxt.ui.client.event.WindowEvent)1 WindowListener (com.extjs.gxt.ui.client.event.WindowListener)1 Margins (com.extjs.gxt.ui.client.util.Margins)1 ContentPanel (com.extjs.gxt.ui.client.widget.ContentPanel)1 Status (com.extjs.gxt.ui.client.widget.Status)1 BorderLayout (com.extjs.gxt.ui.client.widget.layout.BorderLayout)1 BorderLayoutData (com.extjs.gxt.ui.client.widget.layout.BorderLayoutData)1 FillToolItem (com.extjs.gxt.ui.client.widget.toolbar.FillToolItem)1 ToolBar (com.extjs.gxt.ui.client.widget.toolbar.ToolBar)1 UpdateGeocodingGridHeightEvent (org.geosdi.geoplatform.gui.client.puregwt.geocoding.event.UpdateGeocodingGridHeightEvent)1 ScaleChangeEvent (org.geosdi.geoplatform.gui.configuration.map.puregwt.event.ScaleChangeEvent)1