Package com.smartgwt.client.widgets

Examples of com.smartgwt.client.widgets.Window


              UrlBuilder ub = new UrlBuilder();
              ub.setPath("d/csvDownload");
              ub.setParameter("id", resp.getDocumentId());
              String link = ub.buildString().replaceFirst("http:///", GWT.getHostPageBaseURL());

              Window window = new DockableWindow();
              window.setTitle(messages.exportToCsvWindowTitle());
              String content = CONTENT_PRE + messages.exportToCsvContentReady() + CONTENT_POST;
              String linktocsv = messages.exportToCsvDownloadLink(link) + LINK_POST;
              window.addItem(new HTMLFlow(content + linktocsv));
              window.centerInPage();
              window.setAutoSize(true);
              window.show();
              window.setKeepInParentRect(true);
            }
            if (onFinished != null) {
              onFinished.execute();
            }
          }
View Full Code Here


    }
    return t;
  }

  private void showFeatureDetailWindow(final Feature feature) {
    Window window = FeatureDetailWidgetFactory.createFeatureDetailWindow(feature, false);
    window.setPageTop(map.getAbsoluteTop() + 10);
    window.setPageLeft(map.getAbsoluteLeft() + 10);
    window.draw();
  }
View Full Code Here

  }
 
  public void onClick(ClickEvent event) {
    PrintPreferencesCanvas canvas = new PrintPreferencesCanvas(mapWidget);
    canvas.setMargin(10);
    Window window = new Window();
    window.setTitle(messages.printPrefsTitle());
    window.addItem(canvas);
    window.centerInPage();
    window.setAutoSize(true);
    window.show();
  }
View Full Code Here

  // @extract-start DefaultSelectAlternative, Default implementation for SelectAlternativeHandler
  public void onSelectAlternative(SelectAlternativeEvent event) {
    if (null == altWindow) {
      altGrid = new GeocoderAlternativesGrid(geocoderWidget, event.getAlternatives());

      altWindow = new Window();
      altWindow.setAutoSize(true);
      altWindow.setTitle(messages.alternativeSelectTitle());
      altWindow.setAutoSize(true);
      altWindow.setLeft(20);
      altWindow.setTop(20);
View Full Code Here

  // ----------------------------------------------------------

  public void onAddRequested(final FavouriteEvent event) {
    final SearchFavourite fav = event.getNewFavourite();
    final Window addWindow = new DockableWindow();
    addWindow.setTitle(messages.favouritesControllerAddTitle());
    addWindow.setWidth(310);
    addWindow.setHeight(145);
    addWindow.setAutoCenter(true);
    addWindow.setShowMinimizeButton(false);
    addWindow.setIsModal(true);
    addWindow.setKeepInParentRect(true);
    //addWindow.setShowModalMask(true);

    VLayout mainLayout = new VLayout(10);
    mainLayout.setMargin(10);

    // ----------------------------------------------------------

    final DynamicForm form = new DynamicForm();
    form.setGroupTitle(messages.favouritesControllerAddGroupTitle());
    form.setIsGroup(true);
    final TextItem nameItem = new TextItem();
    nameItem.setWidth(190);
    nameItem.setTitle(messages.favouritesControllerAddName());
    nameItem.setTooltip(messages.favouritesControllerAddNameTooltip());
    nameItem.setRequired(true);
    final CheckboxItem sharedItem = new CheckboxItem();
    sharedItem.setTitle(messages.favouritesControllerAddShared());
    sharedItem.setTooltip(messages.favouritesControllerAddSharedTooltip());
    form.setFields(nameItem, sharedItem);

    // ----------------------------------------------------------

    HLayout buttonLayout = new HLayout(10);
    buttonLayout.setHeight(20);
    buttonLayout.setWidth100();
    IButton addBtn = new IButton(messages.favouritesControllerAddAdd());
    addBtn.setIcon(BTN_ADD_IMG);
    addBtn.setAutoFit(true);
    addBtn.addClickHandler(new ClickHandler() {
      public void onClick(ClickEvent event) {
        if (form.validate()) {
          addWindow.hide();
          fav.setName(nameItem.getValueAsString());
          fav.setShared(sharedItem.getValueAsBoolean());
          FavouritesCommService.saveSearchFavourite(fav, new DataCallback<SearchFavourite>() {
            public void execute(SearchFavourite result) {
              fireAddEvent(new FavouriteEvent(null, result, FavouritesController.this));
              addWindow.destroy();
            }
          });
        }
      }
    });
    IButton cancelBtn = new IButton(messages.favouritesControllerAddCancel());
    cancelBtn.setIcon(BTN_CANCEL_IMG);
    cancelBtn.setAutoFit(true);
    cancelBtn.addClickHandler(new ClickHandler() {
      public void onClick(ClickEvent event) {
        addWindow.destroy();
      }
    });
    LayoutSpacer lsr = new LayoutSpacer();
    lsr.setWidth("*");

    // ----------------------------------------------------------

    buttonLayout.addMember(lsr);
    buttonLayout.addMember(addBtn);
    buttonLayout.addMember(cancelBtn);
    mainLayout.addMember(form);
    mainLayout.addMember(buttonLayout);
    addWindow.addItem(mainLayout);
    addWindow.show();
  }
View Full Code Here

      }
    });



    Window window = new Window();
    window.setHeaderIcon("[ISOMORPHIC]/geomajas/geomajas_desktopicon_small.png");
    window.setTitle(I18nProvider.getGlobal().aboutMenuTitle());
    window.setWidth(400);
    window.setHeight(300);
    window.setAutoCenter(true);
    window.setPadding(10);
    window.addItem(layout);
    window.draw();
  }
View Full Code Here

    masterGrid.clearValues();
  }

  public void init(AssociationAttributeInfo attributeInfo, AttributeProvider attributeProvider) {
    featureInfo = attributeInfo.getFeature();
    window = new Window();
    VLayout layout = new VLayout();
    layout.setWidth100();
    layout.setHeight100();
    layout.setMembersMargin(10);
    layout.setMargin(10);
View Full Code Here

          getJavaSource();
        }
      });
      rightLayout.addMember(sourceButton);

      Window descriptionWindow = new Window();
      descriptionWindow.setTitle(I18nProvider.getSampleMessages().generalDescription());
      descriptionWindow.setHeaderIcon("[ISOMORPHIC]/geomajas/geomajas_desktopicon_small.png", 16, 16);
      descriptionWindow.setShowEdges(true);
      descriptionWindow.setKeepInParentRect(true);
      descriptionWindow.setHeaderControls(HeaderControls.HEADER_ICON, HeaderControls.HEADER_LABEL);

      Canvas contents = new Canvas();
      contents.setCanSelectText(true);
      contents.setPadding(5);
      contents.setContents(description);
      contents.setDefaultWidth(200);

      descriptionWindow.setAutoSize(true);
      descriptionWindow.setAutoHeight();
      descriptionWindow.addItem(contents);

      rightLayout.addMember(descriptionWindow);
      hLayout.addMember(rightLayout);
    }
View Full Code Here

      }
    });
  }

  private void showFiles(Map<String, String> fileContents) {
    Window sourceWindow = new Window();
    sourceWindow.setTitle(I18nProvider.getSampleMessages().generalSourceTitle());
    sourceWindow.setHeaderIcon("[ISOMORPHIC]/geomajas/geomajas_desktopicon_small.png", 16, 16);
    sourceWindow.setKeepInParentRect(true);
    sourceWindow.setWidth(640);
    sourceWindow.setHeight(480);
    sourceWindow.setTop(100);
    sourceWindow.setLeft(100);
    sourceWindow.setMembersMargin(5);
    sourceWindow.setCanDragReposition(true);
    sourceWindow.setCanDragResize(true);

    TabSet tabs = new TabSet();
    tabs.setTabBarPosition(Side.TOP);
    tabs.setWidth100();
    tabs.setHeight100();

    addSourceTab(tabs, fileContents.get(getSourceFileName()));

    for (Entry<String, String> entry : fileContents.entrySet()) {
      if (!entry.getKey().equals(getSourceFileName())) {
        VLayout resourceLayout = new VLayout();
        HTMLPane tabPane = new HTMLPane();
        tabPane.setWidth100();
        tabPane.setHeight100();
        tabPane.setContents("<pre style='color:#000000;'>" + XmlParser.parseXML(entry.getValue()) + "</pre>");
        tabPane.setContentsType(ContentsType.PAGE);

        Label resourceLabel = new Label(I18nProvider.getSampleMessages().generalFile() + ": <b>"
            + entry.getKey() + "</b>");
        resourceLabel.setHeight(30);
        resourceLabel.setPadding(5);
        resourceLayout.addMember(resourceLabel);

        VLayout paneLayout = new VLayout();
        paneLayout.setBorder("1px solid #C0C0C0");
        paneLayout.addMember(tabPane);

        resourceLayout.addMember(paneLayout);

        String tabTitle = entry.getKey();
        int pos = tabTitle.lastIndexOf('/');
        tabTitle = tabTitle.substring(pos + 1);

        Tab tab = new Tab(tabTitle, "[ISOMORPHIC]/geomajas/example/images/silk/script_go.png");
        tab.setPane(resourceLayout);
        tabs.addTab(tab);
      }
    }

    sourceWindow.addItem(tabs);
    addChild(sourceWindow);
    sourceWindow.show();
  }
View Full Code Here

                }
            });

            form.setFields(logo, header, new RowSpacerItem(), user, password, loginButton);

            window = new Window();
            window.setWidth(400);
            window.setHeight(275);
            window.setTitle(MSG.common_title_welcome());

            // forced focused, static size, can't close / dismiss
View Full Code Here

TOP

Related Classes of com.smartgwt.client.widgets.Window

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.