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

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


  public void onModuleLoad2() {
    RootPanel.get().add(
        new HTML("<code>$doc.compatMode = <b>" + getCompatMode()
            + "</b></code>"));

    redAbsolutePanel = new AbsolutePanel();
    redAbsolutePanel.setPixelSize(130, 130);
    RootPanel.get().add(redAbsolutePanel, 500, 150);
    redAbsolutePanel.add(new HTML("This red GlassPanel was created<br>"
        + "with <code>autoHide</code> set to <code>false</code>."));
View Full Code Here


   * added to the {@link RootPanel}.
   * @param w The target widget
   * @return Newly created {@link AbsolutePanel} added to the {@link RootPanel}.
   */
  public static AbsolutePanel getAbsoluteOverlay(Widget w) {
    final AbsolutePanel ap = new AbsolutePanel();
    ap.setPixelSize(w.getOffsetWidth(), w.getOffsetHeight());
    RootPanel.get().add(ap, w.getAbsoluteLeft(), w.getAbsoluteTop());
    return ap;
  }
View Full Code Here

      context.boundaryPanel.add(movablePanel, currentDraggableLocation.getLeft(),
          currentDraggableLocation.getTop());
      checkGWTIssue1813(movablePanel, context.boundaryPanel);
    } else {
      saveSelectedWidgetsLocationAndStyle();
      AbsolutePanel container = new AbsolutePanel();
      container.getElement().getStyle().setProperty("overflow", "visible");

      container.setPixelSize(context.draggable.getOffsetWidth(),
          context.draggable.getOffsetHeight());
      context.boundaryPanel.add(container, currentDraggableLocation.getLeft(),
          currentDraggableLocation.getTop());
      checkGWTIssue1813(container, context.boundaryPanel);

      int draggableAbsoluteLeft = context.draggable.getAbsoluteLeft();
      int draggableAbsoluteTop = context.draggable.getAbsoluteTop();
      HashMap<Widget, CoordinateLocation> widgetLocation = new HashMap<Widget, CoordinateLocation>();
      for (Widget widget : context.selectedWidgets) {
        widgetLocation.put(widget, new CoordinateLocation(widget.getAbsoluteLeft(),
            widget.getAbsoluteTop()));
      }

      context.dropController = getIntersectDropController(context.mouseX, context.mouseY);
      if (context.dropController != null) {
        context.dropController.onEnter(context);
      }

      for (Widget widget : context.selectedWidgets) {
        Location location = widgetLocation.get(widget);
        int relativeX = location.getLeft() - draggableAbsoluteLeft;
        int relativeY = location.getTop() - draggableAbsoluteTop;
        container.add(widget, relativeX, relativeY);
      }
      movablePanel = container;
    }
    movablePanel.addStyleName(PRIVATE_CSS_MOVABLE_PANEL);
    calcBoundaryOffset();
View Full Code Here

   *
   * @param context the current drag context
   * @return a new drag proxy
   */
  protected Widget newDragProxy(DragContext context) {
    AbsolutePanel container = new AbsolutePanel();
    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(PRIVATE_CSS_PROXY);
      container.add(proxy, widgetArea.getLeft() - draggableArea.getLeft(), widgetArea.getTop()
          - draggableArea.getTop());
    }

    return container;
  }
View Full Code Here

   * @param widgets the list of widgets to display on the generated panel.
   * @param getDragTarget function for getting the 'dragable area' of any given widget. (Such as
   *                      a gripping area or header label.
   */
  public void setWidgets(List<T> widgets, Function<T, Widget> getDragTarget) {
    AbsolutePanel boundaryPanel = new AbsolutePanel();
    boundaryPanel.setSize("100%", "100%");
    boundaryPanel.clear();

    content.clear();
    content.add(boundaryPanel);

    // The VerticalPanel which actually holds the list of widgets.
    currentVerticalPanel = new VerticalPanel();

    // The VerticalPanelDropController handles DOM manipulation.
    final VerticalPanelDropController widgetDropController =
        new VerticalPanelDropController(currentVerticalPanel);

    boundaryPanel.add(currentVerticalPanel);
    DragHandler dragHandler = createDragHandler(currentVerticalPanel);

    PickupDragController widgetDragController = new PickupDragController(boundaryPanel, false);
    widgetDragController.setBehaviorMultipleSelection(false);
    widgetDragController.addDragHandler(dragHandler);
View Full Code Here

        //Each Action is a row in a vertical panel
        final VerticalPanel actionsPanel = new VerticalPanel();

        //Wire-up DnD for Actions. All DnD related widgets must be contained in the AbsolutePanel
        AbsolutePanel actionsBoundaryPanel = new AbsolutePanel();
        PickupDragController actionsDragController = new PickupDragController( actionsBoundaryPanel,
                                                                               false );
        actionsDragController.setBehaviorConstrainedToBoundaryPanel( false );
        VerticalPanelDropController actionsDropController = new VerticalPanelDropController( actionsPanel );
        actionsDragController.registerDropController( actionsDropController );

        //Add DnD container to main Conditions container
        actionsBoundaryPanel.add( actionsPanel );
        this.actionsConfigWidget.add( actionsBoundaryPanel );

        //Add a DragHandler to handle the actions resulting from the drag operation
        actionsDragController.addDragHandler( new ActionDragHandler( actionsPanel,
                                                                     model,
View Full Code Here

        //Each Pattern is a row in a vertical panel
        final VerticalPanel patternsPanel = new VerticalPanel();

        //Wire-up DnD for Patterns. All DnD related widgets must be contained in the AbsolutePanel
        AbsolutePanel patternsBoundaryPanel = new AbsolutePanel();
        PickupDragController patternsDragController = new PickupDragController( patternsBoundaryPanel,
                                                                                false );
        patternsDragController.setBehaviorConstrainedToBoundaryPanel( false );
        VerticalPanelDropController widgetDropController = new VerticalPanelDropController( patternsPanel );
        patternsDragController.registerDropController( widgetDropController );

        //Add DnD container to main Conditions container
        conditionsConfigWidget.add( patternsBoundaryPanel );
        patternsBoundaryPanel.add( patternsPanel );

        //Add a DragHandler to handle the actions resulting from the drag operation
        patternsDragController.addDragHandler( new PatternDragHandler( patternsPanel,
                                                                       model,
                                                                       dtable ) );

        List<CompositeColumn<? extends BaseColumn>> columns = model.getConditions();
        boolean arePatternsDraggable = columns.size() > 1 && !isReadOnly;
        for ( CompositeColumn<?> column : columns ) {
            if ( column instanceof Pattern52 ) {
                Pattern52 p = (Pattern52) column;
                VerticalPanel patternPanel = new VerticalPanel();
                VerticalPanel conditionsPanel = new VerticalPanel();
                HorizontalPanel patternHeaderPanel = new HorizontalPanel();
                patternHeaderPanel.setStylePrimaryName( GuidedDecisionTableResources.INSTANCE.css().patternSectionHeader() );
                Label patternLabel = makePatternLabel( p );
                patternHeaderPanel.add( patternLabel );
                patternPanel.add( patternHeaderPanel );
                patternsPanel.add( patternPanel );

                //Wire-up DnD for Conditions. All DnD related widgets must be contained in the AbsolutePanel
                AbsolutePanel conditionsBoundaryPanel = new AbsolutePanel();
                PickupDragController conditionsDragController = new PickupDragController( conditionsBoundaryPanel,
                                                                                          false );
                conditionsDragController.setBehaviorConstrainedToBoundaryPanel( false );
                VerticalPanelDropController conditionsDropController = new VerticalPanelDropController( conditionsPanel );
                conditionsDragController.registerDropController( conditionsDropController );

                //Add DnD container to main Conditions container
                conditionsBoundaryPanel.add( conditionsPanel );
                patternPanel.add( conditionsBoundaryPanel );

                //Add a DragHandler to handle the actions resulting from the drag operation
                conditionsDragController.addDragHandler( new ConditionDragHandler( conditionsPanel,
                                                                                   p,
View Full Code Here

    }
  }

  @Override
  public Widget createIssue() {
    AbsolutePanel p = new AbsolutePanel();
    p.setHeight("500px");
    p.setWidth("500px");
    final TestWidget dialog = showTestWidget();
    p.add(dialog, 100, 100);
    return p;
  }
View Full Code Here

    panelContent = new HorizontalPanel();
    panelContent.setStyleName("content");
    panelMain.add(panelContent);
    panelContent.setWidth("100%");
   
    panelMenuForumSpacing = new AbsolutePanel();
    panelContent.add(panelMenuForumSpacing);
    panelMenuForumSpacing.setWidth("50");
   
    panelForum = new VerticalPanel();
    panelForum.setStyleName("forum");
    panelContent.add(panelForum);
    panelForum.setWidth("100%");
   
    txtbxEcrireUnPost = new TextBox();
    txtbxEcrireUnPost.setText("�crire un post...");
    panelForum.add(txtbxEcrireUnPost);
    txtbxEcrireUnPost.setWidth("100%");
   
    panelPost1 = new VerticalPanel();
    panelForum.add(panelPost1);
   
    panelPost1Header = new HorizontalPanel();
    panelPost1.add(panelPost1Header);
   
    lblPost1Author = new Label("Pier-Luc Whissell");
    panelPost1Header.add(lblPost1Author);
   
    lblPost1Tag1 = new Label("tag1Ex");
    lblPost1Tag1.setStyleName("tag");
    panelPost1Header.add(lblPost1Tag1);
   
    lblPost1Text = new Label("post text");
    panelPost1.add(lblPost1Text);
   
    panelPost1Content = new HorizontalPanel();
    panelPost1.add(panelPost1Content);
   
    lblPost1Comment = new Label("Commenter");
    panelPost1Content.add(lblPost1Comment);
   
    imgPost1ThumbsUp = new Image("gwt/standard/images/splitPanelThumb.png");
    panelPost1Content.add(imgPost1ThumbsUp);
   
    imgPost1ThumbsDown = new Image("gwt/standard/images/splitPanelThumb.png");
    panelPost1Content.add(imgPost1ThumbsDown);
   
    lblPost1Flag = new Label("Signaler");
    panelPost1Content.add(lblPost1Flag);
   
    lblPost1Date = new Label("- 6 mars 2012");
    panelPost1Content.add(lblPost1Date);
   
    panelForumDocumentSpacing = new AbsolutePanel();
    panelContent.add(panelForumDocumentSpacing);
    panelForumDocumentSpacing.setWidth("50");
   
    panelDocument = new VerticalPanel();
    panelContent.add(panelDocument);
View Full Code Here

//    addIconButton(BTN_REMOVE_NODE, panel, layoutData);
    return panel;
  }
 
  private final LayoutContainer createTreePanel(int width) {
    AbsolutePanel treePanel = new AbsolutePanel();
    treePanel.setPixelSize(width, 230);
    LayoutContainer lc = new LayoutContainer();
    lc.setSize(width, 230);
    lc.setScrollMode(Scroll.AUTOY);
    lc.setStyleAttribute("backgroundColor", "white");
    treePanel.add(lc);
    return lc;
  }
View Full Code Here

TOP

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

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.