Examples of RootPanel


Examples of com.google.gwt.user.client.ui.RootPanel

public class EditEntryPoint extends CommonEntryPoint {
    public void onModuleLoad() {
        @SuppressWarnings("unused")
        Layout junk = new AnchorLayout();
        checkSession();
        final RootPanel panel = RootPanel.get("editmode");
        if (panel != null) {
            final String path = DOM.getElementAttribute(panel.getElement(), "path");
            final String config = DOM.getElementAttribute(panel.getElement(), "config");
            JahiaContentManagementService.App.getInstance().getEditConfiguration(path, config, new BaseAsyncCallback<GWTEditConfiguration>() {
                public void onSuccess(GWTEditConfiguration gwtEditConfiguration) {
                    PermissionsUtils.loadPermissions(gwtEditConfiguration.getPermissions());
                    final String s = DOM.getInnerHTML(panel.getElement());
                    DOM.setInnerHTML(panel.getElement(), "");
                    panel.add(new EditPanelViewport(s,
                            path,
                            DOM.getElementAttribute(panel.getElement(), "template"),
                            DOM.getElementAttribute(panel.getElement(), "nodetypes"),
                            DOM.getElementAttribute(panel.getElement(), "locale"), gwtEditConfiguration));
                }

                public void onApplicationFailure(Throwable throwable) {
                    Log.error("Error when loading EditConfiguration", throwable);
                }
View Full Code Here

Examples of com.google.gwt.user.client.ui.RootPanel

           problem is fixed.
         */
        @SuppressWarnings("unused")
        Layout junk = new AnchorLayout();
        checkSession();
        final RootPanel panel = RootPanel.get("contentmanager");
        if (panel != null) {
            final boolean embedded = Boolean.valueOf(DOM.getElementAttribute(panel.getElement(), "embedded"));
            final String filtersString = DOM.getElementAttribute(panel.getElement(), "filters");
            final List<String> filters = filtersString.length() > 0 ? Arrays.asList(filtersString.split(",")) : null;
            final String mimeTypesString = DOM.getElementAttribute(panel.getElement(), "mimeTypes");
            final List<String> mimeTypes = mimeTypesString.length() > 0 ? Arrays.asList(mimeTypesString.split(",")) : null;
            final String config = DOM.getElementAttribute(panel.getElement(), "config");
            final String paths = DOM.getElementAttribute(panel.getElement(), "selectedPaths");
            final List<String> selectedPaths = new ArrayList<String>();
            if (paths != null && paths.length() > 0) {
                for (String path : paths.split(",")) {
                    selectedPaths.add(path.trim());
                }
            }

            JahiaContentManagementService.App.getInstance().getManagerConfiguration(config, new BaseAsyncCallback<GWTManagerConfiguration>() {
                public void onSuccess(GWTManagerConfiguration config) {
                    PermissionsUtils.loadPermissions(config.getPermissions());
                    if (embedded) {
                        panel.add(new ContentManager(filters, mimeTypes, selectedPaths, config, 250));
                    } else {
                        panel.add(new ContentManagerViewPort(filters, mimeTypes, selectedPaths, config));
                    }
                }

                public void onApplicationFailure(Throwable throwable) {
                    Log.error("Error while loading user permission", throwable);
View Full Code Here

Examples of com.google.gwt.user.client.ui.RootPanel

        /* todo The following two lines are a hack to get development mode to work on Mac OS X, should be removed once this
           problem is fixed.
         */
        @SuppressWarnings("unused")
        Layout junk = new AnchorLayout();
        final RootPanel panel = RootPanel.get("contentpicker");
        if (panel != null) {
            final String jahiaContextPath = DOM.getElementAttribute(panel.getElement(), "jahiaContextPath");
            final String jahiaServletPath = DOM.getElementAttribute(panel.getElement(), "jahiaServletPath");
            final String filesServletPath = DOM.getElementAttribute(panel.getElement(), "filesServletPath");
            final String selectionLabel = DOM.getElementAttribute(panel.getElement(), "selectionLabel");
            final Map<String, String> selectorOptions = new HashMap<String, String>();
            final List<GWTJahiaNode> selectedNodes = ContentHelper.getSelectedContentNodesFromHTML();
            final String filtersString = DOM.getElementAttribute(panel.getElement(), "filters");
            final List<String> filters = filtersString.length() > 0 ? Arrays.asList(filtersString.split(",")) : null;
            final String mimeTypesString = DOM.getElementAttribute(panel.getElement(), "mimeTypes");
            final List<String> mimeTypes = mimeTypesString.length() > 0 ? Arrays.asList(mimeTypesString.split(",")) : null;
            final String conf = DOM.getElementAttribute(panel.getElement(), "config");
            final boolean multiple = Boolean.parseBoolean(DOM.getElementAttribute(panel.getElement(), "multiple"));
            final String callback = DOM.getElementAttribute(panel.getElement(), "callback");


            JahiaContentManagementService.App.getInstance().getManagerConfiguration(conf, new BaseAsyncCallback<GWTManagerConfiguration>() {
                public void onSuccess(GWTManagerConfiguration config) {
                    PermissionsUtils.loadPermissions(config.getPermissions());
                    panel.add(new ContentPickerViewport(jahiaContextPath, jahiaServletPath, filesServletPath,
                            selectionLabel,
                            selectorOptions, selectedNodes, filters, mimeTypes, config, multiple, callback));
                }

                public void onApplicationFailure(Throwable throwable) {
View Full Code Here

Examples of com.google.gwt.user.client.ui.RootPanel

    public static final String DATE_FIELD_TYPE = "DateField";

    public DatePickerManager() {
        try {
            for (int i = 0; i < Integer.MAX_VALUE; i++) {
                RootPanel root = RootPanel.get(DATE_FIELD_TYPE + i);
                if (root == null) break;

                String datePattern = DOM.getElementAttribute(root.getElement(), "datepattern");
                boolean displayTime = Boolean.parseBoolean(DOM.getElementAttribute(root.getElement(), "displaytime"));
                boolean readOnly = Boolean.parseBoolean(DOM.getElementAttribute(root.getElement(), "readonly"));
                boolean shadow = Boolean.parseBoolean(DOM.getElementAttribute(root.getElement(), "shadow"));
                String fieldName = DOM.getElementAttribute(root.getElement(), "fieldname");
                String valueString = DOM.getElementAttribute(root.getElement(), "value");
                Date value = null;
                if (valueString != null && valueString.length() > 0) {
                    value = new Date(Long.parseLong(valueString));
                }

                root.add(new CalendarField(datePattern, displayTime, readOnly, fieldName, shadow, value));
            }
        } catch (Exception e) {
            Log.error("Error in DatePickerManager: " + e.getMessage(), e);
        }
    }
View Full Code Here

Examples of com.google.gwt.user.client.ui.RootPanel

    /**
     * This is the entry point method.
     */
    @Override
    public void onModuleLoad() {
        RootPanel root = RootPanel.get("tree");
        if (root != null) {
            tree = new Tree();
            root.add(tree);
        }
        errorLabel = new Label();
        RootPanel.get("error").add(errorLabel);
        thumbnails = RootPanel.get("thumbnails");

View Full Code Here

Examples of com.google.gwt.user.client.ui.RootPanel

  /**
   * Module entry point.
   * Used to make graphic initialization
   */
  public void onModuleLoad() {
    RootPanel rootPanel = RootPanel.get();

    final VerticalPanel verticalPanel = new VerticalPanel();
    rootPanel.add(verticalPanel, 0, 0);
    verticalPanel.setSize("100%", "100%");

    final Label gileadSampleApplicationLabel = new Label("Gilead sample application");
    gileadSampleApplicationLabel.setStyleName("title");
    verticalPanel.add(gileadSampleApplicationLabel);
View Full Code Here

Examples of com.google.gwt.user.client.ui.RootPanel

/**
* Entry point classes define <code>onModuleLoad()</code>.
*/
public class CurrencyWidgetDemo implements EntryPoint {
  public void onModuleLoad() {
    RootPanel rootPanel = RootPanel.get();

    final Label currencyInputWidgetLabel = new Label("Currency Input Widget:");
    rootPanel.add(currencyInputWidgetLabel, 50, 32);

    final CurrencyWidget currencyWidget = new CurrencyWidget("EUR");
    rootPanel.add(currencyWidget, 50, 56);
   
    final Button clickMeButton = new Button();
    rootPanel.add(clickMeButton, 250, 56);
    clickMeButton.setText("See what you got!");
    clickMeButton.addClickListener(new ClickListener() {
      public void onClick(Widget sender) {
        Window.alert("You entered: " + Double.toString(currencyWidget.getAmount()));
      }
    });


    final Label currencyWidgetWithPreviewLabel = new Label("Currency Widget With Preview");
    rootPanel.add(currencyWidgetWithPreviewLabel, 50, 108);

    final CurrencyWidgetWithPreview currencyWidgetWithPreview = new CurrencyWidgetWithPreview("EUR");
    rootPanel.add(currencyWidgetWithPreview, 50, 132);
    currencyWidgetWithPreview.setSize("156px", "18px");

    final Button seeWhatYouButton = new Button();
    rootPanel.add(seeWhatYouButton, 250, 132);
    seeWhatYouButton.setSize("157px", "24px");
    seeWhatYouButton.setText("See what you got!");
    seeWhatYouButton.addClickListener(new ClickListener() {
      public void onClick(Widget sender) {
        Window.alert("You entered: " + Double.toString(currencyWidgetWithPreview.getAmount()));
      }
    });

    final Label jpCurrencyWidgetLabel = new Label("Japanese Currency");
    rootPanel.add(jpCurrencyWidgetLabel, 50, 184);

    final CurrencyWidgetWithPreview jpCurrencyWidgetWithPreview = new CurrencyWidgetWithPreview("JPY");
    rootPanel.add(jpCurrencyWidgetWithPreview, 50, 208);
    jpCurrencyWidgetWithPreview.setSize("156px", "18px");

   
    final Label aNaiveTextLabel = new Label("A Naive Text Widget:");
    rootPanel.add(aNaiveTextLabel, 50, 250);
    final TextBox textBox = new TextBox();
    rootPanel.add(textBox, 50, 280);
  }
View Full Code Here

Examples of com.google.gwt.user.client.ui.RootPanel

  public void onModuleLoad() {
    KtrWjrServiceAsync rpcService = new KtrWjrJsonServiceAsync();
    WjrPresenter presenter =
      new WjrPresenter(rpcService, new WjrLoadingView(), new WjrView());

    RootPanel initialPanel = RootPanel.get(INITIAL_PANEL_ID);
    if (initialPanel != null) {
      initialPanel.getElement().removeFromParent();
    }

    presenter.go(RootLayoutPanel.get());
  }
View Full Code Here

Examples of com.google.gwt.user.client.ui.RootPanel

  /**
   * This is the entry point method.
   */
  public void onModuleLoad() {
    RootPanel rootPanel = RootPanel.get();

    HorizontalPanel horizontalPanel = new HorizontalPanel();
    rootPanel.add(horizontalPanel);

    Label lblWelcomToGwt = new Label("Welcom to GWT StockTrade login page");
    lblWelcomToGwt.setStyleName("gwt-Label-Login");
    horizontalPanel.add(lblWelcomToGwt);

View Full Code Here

Examples of com.google.gwt.user.client.ui.RootPanel

    p2.add(ANSWER_HTML);
    editPanel.add(p2);
    editPanel.add(ANSWER_HTML);
    editPanel.add(PREVIEW_HTML);

    RootPanel slot = RootPanel.get("editor");
    if (slot != null) {
      slot.add(editPanel);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.