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

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


        + "difference with screen space.";
  }

  public Widget getContentWidget() {
    // Define the left layout:
    VerticalPanel leftLayout = new VerticalPanel();
    leftLayout.setSize("220px", "100%");

    leftLayout.add(new HTML("<h3>Drawing options:</h3>"));

    Button circleBtn = new Button("Draw circle");
    circleBtn.setWidth("200");
    circleBtn.addClickHandler(new ClickHandler() {

      public void onClick(ClickEvent event) {
        Circle circle = new Circle(0, 0, 3000000);
        circle.setFillColor("#66CC66");
        circle.setFillOpacity(0.4);
        container.add(circle);
      }
    });
    leftLayout.add(circleBtn);

    Button deleteBtn = new Button("Delete all drawings");
    deleteBtn.setWidth("200");
    deleteBtn.addClickHandler(new ClickHandler() {

      public void onClick(ClickEvent arg0) {
        container.clear();
      }
    });
    leftLayout.add(deleteBtn);

    // Create the MapPresenter and add an InitializationHandler:
    mapPresenter = getInjector().getMapPresenter();
    mapPresenter.setSize(640, 480);
    mapPresenter.getEventBus().addHandler(MapInitializationEvent.TYPE, new MyMapInitializationHandler());
View Full Code Here


        + "world space, visit the javadocs (TODO make this a link).";
  }

  public Widget getContentWidget() {
    // Define the left layout:
    VerticalPanel leftLayout = new VerticalPanel();
    leftLayout.setSize("220px", "100%");

    leftLayout.add(new HTML("<h3>Drawing options:</h3>"));

    Button rectangleBtn = new Button("Draw rectangle");
    rectangleBtn.setWidth("200");
    rectangleBtn.addClickHandler(new ClickHandler() {

      public void onClick(ClickEvent event) {
        Rectangle rectangle = new Rectangle(60, 40, 200, 80);
        rectangle.setFillColor("#CC9900");
        rectangle.setFillOpacity(0.4);
        container.add(rectangle);
      }
    });
    leftLayout.add(rectangleBtn);

    Button textBtn = new Button("Draw text");
    textBtn.setWidth("200");
    textBtn.addClickHandler(new ClickHandler() {

      public void onClick(ClickEvent event) {
        Text text = new Text(70, 60, "Hello World");
        text.setFontFamily("Arial");
        text.setFontSize(16);
        text.setStrokeOpacity(0);
        text.setFillColor("#000000");
        container.add(text);
      }
    });
    leftLayout.add(textBtn);

    Button circleBtn = new Button("Draw circle");
    circleBtn.setWidth("200");
    circleBtn.addClickHandler(new ClickHandler() {

      public void onClick(ClickEvent event) {
        Circle circle = new Circle(300, 140, 30);
        circle.setFillColor("#0099CC");
        circle.setFillOpacity(0.4);
        container.add(circle);
      }
    });
    leftLayout.add(circleBtn);

    Button pathBtn = new Button("Draw path");
    pathBtn.setWidth("200");
    pathBtn.addClickHandler(new ClickHandler() {

      public void onClick(ClickEvent event) {
        Path path = new Path(120, 160);
        path.setFillColor("#0066AA");
        path.setFillOpacity(0.4);
        path.setStrokeColor("#004499");
        path.lineRelativelyTo(100, 0);
        path.lineRelativelyTo(0, 100);
        path.lineRelativelyTo(-100, 0);
        path.lineRelativelyTo(0, -100);
        path.moveTo(140, 180);
        path.lineRelativelyTo(50, 0);
        path.lineRelativelyTo(0, 50);
        path.lineRelativelyTo(-50, 0);
        path.lineRelativelyTo(0, -50);
        container.add(path);
      }
    });
    leftLayout.add(pathBtn);

    Button deleteBtn = new Button("Delete all drawings");
    deleteBtn.setWidth("200");
    deleteBtn.addClickHandler(new ClickHandler() {

      public void onClick(ClickEvent arg0) {
        container.clear();
      }
    });
    leftLayout.add(deleteBtn);

    // Create the MapPresenter and add an InitializationHandler:
    mapPresenter = getInjector().getMapPresenter();
    mapPresenter.setSize(640, 480);
    mapPresenter.getEventBus().addHandler(MapInitializationEvent.TYPE, new MyMapInitializationHandler());
View Full Code Here

        " far in or out, the countries layer will never be visible.";
  }

  public Widget getContentWidget() {
    // Define the left layout:
    VerticalPanel leftLayout = new VerticalPanel();
    leftLayout.setSize("220px", "100%");

    leftLayout.add(new HTML("<h3>Layers:</h3>"));
    layerCheckBoxLayout = new VerticalPanel();
    leftLayout.add(layerCheckBoxLayout);

    leftLayout.add(new HTML("<h3>Events:</h3>"));
    layerEventLayout = new VerticalPanel();
    leftLayout.add(layerEventLayout);

    // Create the MapPresenter and add an InitializationHandler:
    mapPresenter = getInjector().getMapPresenter();
    mapPresenter.setSize(640, 480);
    mapPresenter.getEventBus().addHandler(MapInitializationEvent.TYPE, new MyMapInitializationHandler());
View Full Code Here

    return "Example that demonstrates the ability to change layer order. Try dragging the labels up and down.";
  }

  public Widget getContentWidget() {
    // Define the left layout:
    VerticalPanel leftLayout = new VerticalPanel();
    leftLayout.setSize("200px", "100%");
    leftLayout.add(new HTML("<h3>Layers:</h3>"));
    AbsolutePanel dndBoundary = new AbsolutePanel();
    dndBoundary.setSize("200px", "100%");
    leftLayout.add(dndBoundary);
    layerPanel = new VerticalPanel();
    dndBoundary.add(layerPanel);

    layerDragController = new PickupDragController(dndBoundary, false);
    layerDragController.setBehaviorMultipleSelection(false);
    layerDragController.registerDropController(new VerticalPanelDropController(layerPanel));
View Full Code Here

    return "This example shows map resizing capabilities.";
  }

  public Widget getContentWidget() {
    // Define the left layout:
    VerticalPanel leftLayout = new VerticalPanel();
    leftLayout.setSize("220px", "100%");

    leftLayout.add(new HTML("<h3>Resize the map:</h3>"));

    Button resizeBtn = new Button("Enlarge map");
    resizeBtn.setWidth("200");
    resizeBtn.addClickHandler(new ClickHandler() {

      public void onClick(ClickEvent arg0) {
        int width = mapPresenter.getViewPort().getMapWidth() + 20;
        int height = mapPresenter.getViewPort().getMapHeight() + 15;
        mapPresenter.setSize(width, height);
      }
    });
    leftLayout.add(resizeBtn);

    Button shrinkBtn = new Button("Shrink map");
    shrinkBtn.setWidth("200");
    shrinkBtn.addClickHandler(new ClickHandler() {

      public void onClick(ClickEvent arg0) {
        int width = mapPresenter.getViewPort().getMapWidth() - 20;
        int height = mapPresenter.getViewPort().getMapHeight() - 15;
        mapPresenter.setSize(width, height);
      }
    });
    leftLayout.add(shrinkBtn);

    // Create the MapPresenter and add an InitializationHandler:
    mapPresenter = getInjector().getMapPresenter();
    mapPresenter.setSize(640, 480);
    mapPresenter.getEventBus().addHandler(MapInitializationEvent.TYPE, new MyMapInitializationHandler());
View Full Code Here

  /**
   * Creates an empty tab panel.
   */
  public TabPanel() {
    VerticalPanel panel = new VerticalPanel();
    panel.add(tabBar);
    panel.add(deck);

    panel.setCellHeight(deck, "100%");
    tabBar.setWidth("100%");

    tabBar.addTabListener(this);
    tabBar.setRemoveTabListener(this);
    initWidget(panel);
View Full Code Here

            properties = new PropertiesHolder();
        } else {
            properties = (PropertiesHolder) asset.getContent();
        }

        VerticalPanel panel = new VerticalPanel();
        propertiesEditor = new PropertiesEditorSimpleTable( properties.list );
        panel.add( propertiesEditor );

        layout.addRow( panel );
    }
View Full Code Here

        initWidget( layout );
    }

    private void doActions() {
        VerticalPanel actions = new VerticalPanel();
        Image add = new ImageButton( images.newItem() );
        add.setTitle( constants.AddANewCategory() );

        add.addClickHandler( new ClickHandler() {
            public void onClick(ClickEvent event) {
                doOKClick();
            }
        } );

        actions.add( add );
        layout.setWidget( 0,
                          1,
                          actions );

    }
View Full Code Here

        if ( afterShowEvent != null ) {
            afterShowEvent.execute();
        }

        VerticalPanel verticalPanel = new VerticalPanel();
        verticalPanel.setHorizontalAlignment( VerticalPanel.ALIGN_RIGHT );

        final PopupTitleBar titleBar = new PopupTitleBar( getTitle() );

        titleBar.closeButton.addClickHandler( new ClickHandler() {
            public void onClick(ClickEvent event) {
                hide();
            }
        } );
        titleBar.addMouseDownHandler( new MouseDownHandler() {

            public void onMouseDown(MouseDownEvent event) {
                dragged = true;
                dragStartX = event.getRelativeX( getElement() );
                dragStartY = event.getRelativeY( getElement() );
                DOM.setCapture( titleBar.getElement() );
            }
        } );
        titleBar.addMouseMoveHandler( new MouseMoveHandler() {

            public void onMouseMove(MouseMoveEvent event) {
                if ( dragged ) {
                    setPopupPosition( event.getClientX() - dragStartX,
                                      event.getClientY() - dragStartY );
                }
            }
        } );
        titleBar.addMouseUpHandler( new MouseUpHandler() {

            public void onMouseUp(MouseUpEvent event) {
                dragged = false;
                DOM.releaseCapture( titleBar.getElement() );
            }
        } );

        verticalPanel.add( titleBar );

        Widget content = getContent();

        content.setWidth( "100%" );
        verticalPanel.add( content );
        add( verticalPanel );

        super.show();

        focusFirstWidget( content );
View Full Code Here

        RuleFlowUploadWidget uploadWidget = new RuleFlowUploadWidget(
                asset,
                viewer,
                clientFactory );

        VerticalPanel panel = new VerticalPanel();
        panel.add( uploadWidget );

        if ( ApplicationPreferences.showVisualRuleFlow() ) {
            initRuleflowViewer();

            if ( ruleFlowViewer != null && parameterPanel != null ) {
                Button viewSource = new Button();
                viewSource.setText( constants.OpenEditorInNewWindow() );
                viewSource.addClickHandler( new ClickHandler() {
                    public void onClick( ClickEvent arg0 ) {
                        doViewDiagram();

                        ruleFlowViewer.update();
                    }
                } );

                panel.add( viewSource );
            }
        }

        initWidget( panel );
View Full Code Here

TOP

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

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.