Package com.google.gwt.user.client.ui

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


  }

  Widget makePositioner(Widget reference) {
    // Use two widgets so that setPixelSize() consistently affects dimensions
    // excluding positioner border in quirks and strict modes
    SimplePanel outer = new SimplePanel();
    outer.addStyleName(CSS_DRAGDROP_POSITIONER);
    outer.getElement().getStyle().setProperty("margin", "0px");

    // place off screen for border calculation
    RootPanel.get().add(outer, -500, -500);

    // Ensure IE quirks mode returns valid outer.offsetHeight, and thus valid
    // DOMUtil.getVerticalBorders(outer)
    outer.setWidget(DUMMY_LABEL_IE_QUIRKS_MODE_OFFSET_HEIGHT);

    SimplePanel inner = new SimplePanel();
    inner.getElement().getStyle().setProperty("margin", "0px");
    inner.getElement().getStyle().setProperty("border", "none");
    int offsetWidth = reference.getOffsetWidth() - DOMUtil.getHorizontalBorders(outer);
    int offsetHeight = reference.getOffsetHeight() - DOMUtil.getVerticalBorders(outer);
    inner.setPixelSize(offsetWidth, offsetHeight);

    outer.setWidget(inner);

    return outer;
  }
View Full Code Here


  @Override
  protected Widget newPositioner(DragContext context) {
    // Use two widgets so that setPixelSize() consistently affects dimensions
    // excluding positioner border in quirks and strict modes
    SimplePanel outer = new SimplePanel();
    outer.addStyleName(CSS_DRAGDROP_POSITIONER);

    // place off screen for border calculation
    RootPanel.get().add(outer, -500, -500);

    // Ensure IE quirks mode returns valid outer.offsetHeight, and thus valid
    // DOMUtil.getVerticalBorders(outer)
    outer.setWidget(DUMMY_LABEL_IE_QUIRKS_MODE_OFFSET_HEIGHT);

    int width = 0;
    int height = 0;
    if (dropTarget instanceof HorizontalPanel) {
      for (Widget widget : context.selectedWidgets) {
        width += widget.getOffsetWidth();
        height = Math.max(height, widget.getOffsetHeight());
      }
    } else {
      for (Widget widget : context.selectedWidgets) {
        width = Math.max(width, widget.getOffsetWidth());
        height += widget.getOffsetHeight();
      }
    }

    SimplePanel inner = new SimplePanel();
    inner.setPixelSize(width - DOMUtil.getHorizontalBorders(outer), height
        - DOMUtil.getVerticalBorders(outer));

    outer.setWidget(inner);

    return outer;
View Full Code Here

        }

        // TODO encapsulate the editor in a DisplayerSettingsView, similar to the DisplayerView, for coherency ?
        displayerSettingsEditor.setDisplayerSettings( displayerSettings );

        SimplePanel editorPanel = new SimplePanel();
        editorPanel.setWidth("500px");
        editorPanel.add(displayerSettingsEditor);

        final SimplePanel viewerPanel = new SimplePanel();
        viewerPanel.add(new DisplayerView(displayerSettings).draw());

        displayerSettingsEditor.setListener(new DisplayerSettingsEditorListener() {
            public void onDisplayerSettingsChanged(DisplayerSettingsEditor editor) {
                viewerPanel.clear();
                viewerPanel.setWidget(new DisplayerView(displayerSettings).draw());
            }
        });

        HorizontalPanel panel = new HorizontalPanel();
        panel.add(editorPanel);
View Full Code Here

    container.getElement().getStyle().setProperty("overflow", "visible");

    WidgetArea draggableArea = new WidgetArea(context.draggable, null);
    for (Widget widget : context.selectedWidgets) {
      WidgetArea widgetArea = new WidgetArea(widget, null);
      Widget proxy = new SimplePanel();
      proxy.setPixelSize(widget.getOffsetWidth(), widget.getOffsetHeight());
      proxy.addStyleName(DragClientBundle.INSTANCE.css().proxy());
      container.add(proxy, widgetArea.getLeft() - draggableArea.getLeft(),
          widgetArea.getTop() - draggableArea.getTop());
    }

    return container;
View Full Code Here

    mainPanel.setCellWidth(leftPanel, "250px");
    mainPanel.setCellWidth(contentPanel, "75%");
      
    XBRLDataTree dataTreeModel = new XBRLDataTree(new SingleSelectionModel<XBRLReportFile>());
    CellTree dataTree = new CellTree(dataTreeModel, null);
    SimplePanel dataTreePanel = new SimplePanel();
    dataTreePanel.setWidth("90%");
    dataTreePanel.getElement().getStyle().setMarginBottom(10, Unit.PX);
    dataTreePanel.add(dataTree);
    leftPanel.add(dataTreePanel);
   
    FetchDataWidget fetchDataWidget = new FetchDataWidget();
    DecoratorPanel decorPanel2 = new DecoratorPanel();
    decorPanel2.setWidth("90%");
View Full Code Here

    //
    TabLayoutPanel tabPanel = new TabLayoutPanel(2.5, Unit.EM);
    tabPanel.setAnimationDuration(1000);
    tabPanel.getElement().getStyle().setMarginBottom(10.0, Unit.PX);
   
    SimplePanel rawDataPanel = new SimplePanel();
    TextArea rawData = new TextArea();
    rawData.setText("The raw XML data will display here.");
    rawDataPanel.add(rawData);
    tabPanel.add(rawDataPanel, "Raw XML");
   
    tabPanel.add(new SimplePanel(), "Interactive data");
    //decorPanel.add(tabPanel);
    initWidget(tabPanel);
  }
View Full Code Here

  }

  Widget makePositioner(Widget reference) {
    // Use two widgets so that setPixelSize() consistently affects dimensions
    // excluding positioner border in quirks and strict modes
    SimplePanel outer = new SimplePanel();
    outer.addStyleName(DragClientBundle.INSTANCE.css().positioner());
    outer.getElement().getStyle().setProperty("margin", "0px");

    // place off screen for border calculation
    RootPanel.get().add(outer, -500, -500);

    // Ensure IE quirks mode returns valid outer.offsetHeight, and thus valid
    // DOMUtil.getVerticalBorders(outer)
    outer.setWidget(DUMMY_LABEL_IE_QUIRKS_MODE_OFFSET_HEIGHT);

    SimplePanel inner = new SimplePanel();
    inner.getElement().getStyle().setProperty("margin", "0px");
    inner.getElement().getStyle().setProperty("border", "none");
    int offsetWidth = reference.getOffsetWidth() - DOMUtil.getHorizontalBorders(outer);
    int offsetHeight = reference.getOffsetHeight() - DOMUtil.getVerticalBorders(outer);
    inner.setPixelSize(offsetWidth, offsetHeight);

    outer.setWidget(inner);

    return outer;
  }
View Full Code Here

  @Override
  protected Widget newPositioner(DragContext context) {
    // Use two widgets so that setPixelSize() consistently affects dimensions
    // excluding positioner border in quirks and strict modes
    SimplePanel outer = new SimplePanel();
    outer.addStyleName(DragClientBundle.INSTANCE.css().positioner());

    // place off screen for border calculation
    RootPanel.get().add(outer, -500, -500);

    // Ensure IE quirks mode returns valid outer.offsetHeight, and thus valid
    // DOMUtil.getVerticalBorders(outer)
    outer.setWidget(DUMMY_LABEL_IE_QUIRKS_MODE_OFFSET_HEIGHT);

    int width = 0;
    int height = 0;
    if (dropTarget instanceof HorizontalPanel) {
      for (Widget widget : context.selectedWidgets) {
        width += widget.getOffsetWidth();
        height = Math.max(height, widget.getOffsetHeight());
      }
    } else {
      for (Widget widget : context.selectedWidgets) {
        width = Math.max(width, widget.getOffsetWidth());
        height += widget.getOffsetHeight();
      }
    }

    SimplePanel inner = new SimplePanel();
    inner.setPixelSize(width - DOMUtil.getHorizontalBorders(outer), height
        - DOMUtil.getVerticalBorders(outer));

    outer.setWidget(inner);

    return outer;
View Full Code Here

        this.dmo = dmo;
        this.factType = factType;
        this.callback = callback;
        this.scenario = scenario;
        this.executionTrace = executionTrace;
        panel = new SimplePanel();
        refreshEditor();
        initWidget( panel );
    }
View Full Code Here

        if ( val.type.equals( DataType.TYPE_BOOLEAN ) ) {
            this.enums = DropDownData.create( new String[]{"true", "false"} );
        } else {
            this.enums = enums;
        }
        this.root = new SimplePanel();
        this.ex = ex;
        this.methodParameter = val;
        this.model = model;
        this.parameterType = parameterType;
        this.onValueChangeCommand = onValueChangeCommand;
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.ui.SimplePanel

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.