Package com.google.collide.client.ui.menu.PositionController

Examples of com.google.collide.client.ui.menu.PositionController.PositionerBuilder


      this.res = res;
      setElement(Elements.asJsElement(binder.createAndBindUi(this)));
      attachHandlers();

      // Make these tooltips right aligned since they're so close to the edge of the screen.
      PositionerBuilder positioner = new Tooltip.TooltipPositionerBuilder().setHorizontalAlign(
          HorizontalAlign.RIGHT).setPosition(Position.OVERLAP);
      Positioner historyTooltipPositioner =
          positioner.buildAnchorPositioner(Elements.asJsElement(historyIcon));
      new Tooltip.Builder(
          res, Elements.asJsElement(historyIcon), historyTooltipPositioner).setTooltipText(
          "Explore this file's changes over time.").build().setTitle("History");

      Positioner debugTooltipPositioner =
          positioner.buildAnchorPositioner(Elements.asJsElement(debugIcon));
      new Tooltip.Builder(
          res, Elements.asJsElement(debugIcon), debugTooltipPositioner).setTooltipText(
          "Opens the debug panel where you can set breakpoints and watch expressions.")
          .build().setTitle("Debugging Controls");
    }
View Full Code Here


  private EditorPopupController(Popup popup, Editor editor) {
    this.popup = popup;
    this.editor = editor;
    this.popupDummyElement = createPopupDummyElement(editor.getBuffer().getEditorLineHeight());
    this.positionerBuilder = new PositionerBuilder().setPosition(Position.NO_OVERLAP)
        .setHorizontalAlign(HorizontalAlign.MIDDLE);

    popup.setAutoHideHandler(new AutoHideComponent.AutoHideHandler() {
      @Override
      public void onHide() {
View Full Code Here

        generated.<JsElement>cast().appendChild(files.getView().getElement());
        files.getTree().renderTree(0);
        Popup popup = Popup.create(resources);
        popup.addPartner(generated.<JsElement>cast());
        popup.setContentElement(files.getView().getElement());
        popup.show(new PositionerBuilder()
          .setVerticalAlign(VerticalAlign.BOTTOM)
          .setPosition(Position.NO_OVERLAP)
          .buildAnchorPositioner(generated.<JsElement>cast()));
      }
    }, true);
View Full Code Here

TOP

Related Classes of com.google.collide.client.ui.menu.PositionController.PositionerBuilder

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.