Example usage for com.google.gwt.user.client Window setMargin

List of usage examples for com.google.gwt.user.client Window setMargin

Introduction

In this page you can find the example usage for com.google.gwt.user.client Window setMargin.

Prototype

public static void setMargin(String size) 

Source Link

Usage

From source file:org.rstudio.studio.client.common.satellite.SatelliteWindow.java

License:Open Source License

public SatelliteWindow(Provider<EventBus> pEventBus, Provider<FontSizeManager> pFontSizeManager) {
    // save references
    pEventBus_ = pEventBus;//w w  w.  j a  va 2s .  c o  m
    pFontSizeManager_ = pFontSizeManager;

    // occupy full client area of the window
    if (!allowScrolling())
        Window.enableScrolling(false);
    Window.setMargin("0px");

    // create application panel
    mainPanel_ = new LayoutPanel();

    // init widget
    initWidget(mainPanel_);
}

From source file:py.edu.uca.intercajas.client.menumail.Mail.java

License:Apache License

/**
 * This method constructs the application user interface by instantiating
 * controls and hooking up event handler.
 *///from  ww w.jav a  2  s. c o  m
public void init() {
    // Inject global styles.
    GWT.<GlobalResources>create(GlobalResources.class).css().ensureInjected();

    // Create the UI defined in Mail.ui.xml.
    //    DockLayoutPanel outer = binder.createAndBindUi(this);

    // Get rid of scrollbars, and clear out the window's built-in margin,
    // because we want to take advantage of the entire client area.
    Window.enableScrolling(false);
    Window.setMargin("0px");

    // Special-case stuff to make topPanel overhang a bit.
    //    Element topElem = outer.getWidgetContainerElement(topPanel);
    //    topElem.getStyle().setZIndex(2);
    //    topElem.getStyle().setOverflow(Overflow.VISIBLE);

    // Listen for item selection, displaying the currently-selected item in
    // the detail area.
    mailList.setListener(new MailList.Listener() {
        @Override
        public void onItemSelected(Destino item) {
            mailDetail.setItem(item);
        }

        @Override
        public void clear() {
            mailDetail.clear();
        }
    });

    // Add the outer panel to the RootLayoutPanel, so that it will be
    // displayed.

    //    RootLayoutPanel root = RootLayoutPanel.get();
    //    root.add(outer);

}

From source file:py.edu.uca.intercajas.client.menumail.MenuMail.java

License:Apache License

/**
 * This method constructs the application user interface by instantiating
 * controls and hooking up event handler.
 *//*from w w w  .j a  v a 2  s.com*/
public void init() {
    // Inject global styles.
    GWT.<GlobalResources>create(GlobalResources.class).css().ensureInjected();

    // Create the UI defined in Mail.ui.xml.
    DockLayoutPanel outer = binder.createAndBindUi(this);

    // Get rid of scrollbars, and clear out the window's built-in margin,
    // because we want to take advantage of the entire client area.
    Window.enableScrolling(false);
    Window.setMargin("0px");

    // Special-case stuff to make topPanel overhang a bit.
    Element topElem = outer.getWidgetContainerElement(topPanel);
    topElem.getStyle().setZIndex(2);
    topElem.getStyle().setOverflow(Overflow.VISIBLE);

    // Listen for item selection, displaying the currently-selected item in
    // the detail area.
    //    mailList.setListener(new MailList.Listener() {
    //      public void onItemSelected(MailItem item) {
    //        mailDetail.setItem(item);
    //      }
    //    });

    // Add the outer panel to the RootLayoutPanel, so that it will be
    // displayed.

    //MenuMain PRINCIPAL
    RootLayoutPanel.get().add(outer);

}