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

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

Introduction

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

Prototype

public static int getClientWidth() 

Source Link

Usage

From source file:com.webgocommerce.client.model.UIMantenimiento.java

private void reCalcularWindows() {
    int ancho = Window.getClientWidth() - 30;
    btnOperacion.setWidth(ancho + "px");
}

From source file:com.webgocommerce.client.uiutil.UIGridDetalleVenta.java

private void initStyle() {
    int ancho = Window.getClientWidth() - 5;
    int alto = (Window.getClientHeight()) / 3;
    pnlContenedor.setWidth(ancho + "px");
    pnlContenedor.setHeight(alto + "px");
    grid.setWidth("99%");
    grid.getElement().getStyle().setBorderStyle(Style.BorderStyle.SOLID);
    grid.getElement().getStyle().setBorderWidth(0.2, Style.Unit.PX);
    grid.getElement().getStyle().setFloat(Style.Float.LEFT);
    grid.getElement().getStyle().setMargin(3, Style.Unit.PX);
}

From source file:com.webgocommerce.client.uiutil.UIItem.java

private void initStyle() {
    int ancho = Window.getClientWidth() - 5;
    int alto = (Window.getClientHeight()) / 3;
    pnlContenedor.setWidth(ancho + "px");
    pnlContenedor.setHeight(alto + "px");
    gridItem.setHeight("97%");
    gridItem.setWidth("99%");
    gridItem.setColumnWidth(gridItem.descripcion, 85, Style.Unit.PCT);
    gridItem.getElement().getStyle().setBorderStyle(Style.BorderStyle.SOLID);
    gridItem.getElement().getStyle().setBorderWidth(0.2, Style.Unit.PX);
    gridItem.getElement().getStyle().setFloat(Style.Float.LEFT);
    gridItem.getElement().getStyle().setMargin(3, Style.Unit.PX);
}

From source file:com.webgocommerce.client.uiutil.UIStockItemAlmacen.java

private void initStyle() {
    int ancho = Window.getClientWidth() - 5;
    int alto = (Window.getClientHeight()) / 3;
    pnlContenedor.setWidth(ancho + "px");
    pnlContenedor.setHeight(alto + "px");
    gridItem.setHeight("97%");
    gridItem.setWidth("69%");
    gridAlmacen.setHeight("97%");
    gridAlmacen.setWidth("29%");
    gridItem.getElement().getStyle().setBorderStyle(Style.BorderStyle.SOLID);
    gridItem.getElement().getStyle().setBorderWidth(0.2, Style.Unit.PX);
    gridItem.getElement().getStyle().setFloat(Style.Float.LEFT);
    gridItem.getElement().getStyle().setMargin(3, Style.Unit.PX);
    gridAlmacen.getElement().getStyle().setBorderStyle(Style.BorderStyle.SOLID);
    gridAlmacen.getElement().getStyle().setBorderWidth(0.2, Style.Unit.PX);
    gridAlmacen.getElement().getStyle().setFloat(Style.Float.LEFT);
    gridAlmacen.getElement().getStyle().setMargin(3, Style.Unit.PX);
}

From source file:com.webgocommerce.client.view.uiselectuser.UISelectUser.java

private void reCalcularWindows() {
    int alto = Window.getClientHeight() - 220;
    this.scrollPanel.setHeight(alto + "px");
    txtBuscar.setWidth(Window.getClientWidth() + "px");
    pnlTable.setHeight(alto - 30 + "px");
}

From source file:com.webgocommerce.client.view.uisesion.UISesion.java

private void reCalcularWindows() {
    int alto = Window.getClientHeight() - 125;
    int ancho = Window.getClientWidth() - 5;
    tabPanel.setWidth(ancho + "px");
    tabPanel.setHeight(alto + "px");
}

From source file:com.xclinical.mdr.client.ui.AbstractPerspective.java

License:Apache License

public void showPopup(final PopupPanel panel) {
    panel.setPopupPositionAndShow(new PositionCallback() {
        public void setPosition(int offsetWidth, int offsetHeight) {
            panel.setPopupPosition((Window.getClientWidth() - offsetWidth) / 2, 0);
        }/*from ww  w.  j  av a2  s.c  o  m*/
    });
}

From source file:cyclerouteplanner.client.MapRenderer.java

License:Open Source License

public void onModuleLoad(ClickHandler clickHandler) {
    LatLng home = LatLng.create(51.0747504771771, -1.3252487182617188);

    final MapOptions options = MapOptions.create();
    options.setZoom(14);/*w  w w .j av  a 2 s  . co m*/
    options.setCenter(home);
    options.setMapTypeId(MapTypeId.ROADMAP);
    options.setDraggable(true);
    //options.setNavigationControl(true);
    options.setMapTypeControl(true);

    mapCanvas = RootPanel.get("map_canvas");
    mapCanvas.addStyleName("Map");

    mapWidget = GoogleMap.create(mapCanvas.getElement(), options);

    Window.addResizeHandler(new ResizeHandler() {
        @Override
        public void onResize(ResizeEvent event) {
            fillTheScreen(event.getWidth(), event.getHeight());
        }
    });

    GWT.log("Adding click handler.");
    mapWidget.addClickListener(clickHandler);
    fillTheScreen(Window.getClientWidth(), Window.getClientHeight());
}

From source file:de.eckhartarnold.client.Debugger.java

License:Apache License

/**
 * Sets the size of the debugger//from w  w  w  .j  a  v a2  s .  c o m
 * @param width  the width of the debugger in pixel
 * @param height the height of the debugger in pixel
 */
public static void setSize(int width, int height) {
    Debugger.width = width + 18;
    Debugger.height = height + 40;
    if (singleton != null) {
        scrollPanel.setPixelSize(width, height);
        singleton.resize(Window.getClientWidth(), Window.getClientHeight());
    }
}

From source file:de.eckhartarnold.client.Debugger.java

License:Apache License

/**
 * The constructor of the debugger. As class <code>Debugger</code> is 
 * instantiated by the first call to its static print method, this
 * constructor is a <code>protected</code> constructor.
 *//*w w  w.  java  2 s .c o m*/
protected Debugger() {
    dialog = new DialogBox(false, false);
    dialog.addStyleName("debugger");
    dialog.setText("Debug");
    panel = new VerticalPanel();
    messagePanel = new VerticalPanel();
    scrollPanel = new ScrollPanel(messagePanel);
    panel.add(scrollPanel);
    closeButton = new Button("close", new ClickHandler() {
        public void onClick(ClickEvent event) {
            Debugger.hide();
            closedManually = true;
        }
    });
    panel.add(closeButton);
    dialog.setWidget(panel);
    snapRight = true;
    snapBottom = true;
    if (width <= 0)
        width = 400;
    if (height <= 0)
        height = 300;
    // dialog.getElement().getStyle().setProperty("z-index", "100");    
    dialog.show();
    scrollPanel.setPixelSize(width - 18, height - 40);
    resize(Window.getClientWidth(), Window.getClientHeight());
    Window.addResizeHandler(this);
}