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

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


      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


    RunButtonTargetPopup targetPopup =
        RunButtonTargetPopup.create(context, buttonElem, dropdownElem, fileNameSearch);

    elemental.html.Element target = Elements.asJsElement(buttonElem);
    Positioner positioner = new Tooltip.TooltipPositionerBuilder().setVerticalAlign(
        VerticalAlign.BOTTOM)
        .setHorizontalAlign(HorizontalAlign.MIDDLE).buildAnchorPositioner(target);
    Tooltip noFileSelectedTooltip = new Tooltip.Builder(
        context.getResources(), target, positioner).setShouldListenToHover(false)
        .setTooltipRenderer(new TooltipRenderer() {
View Full Code Here

    setLabelText();
    setNodeOffset();
    setNodeType();

    Positioner positioner = new Tooltip.TooltipPositionerBuilder().setVerticalAlign(
        VerticalAlign.TOP).setHorizontalAlign(HorizontalAlign.MIDDLE).setPosition(Position.OVERLAP)
        .buildAnchorPositioner(getView().nodeWrapper);
    tooltip = new Tooltip.Builder(getView().res, getView().nodeWrapper, positioner).setTooltipText(
        "").build();
    tooltip.setTitle(getTooltipTitle());
View Full Code Here

              return;
            }
            item.onClicked(null);
          }
        };
    Positioner positioner = new DropdownPositionerBuilder().setHorizontalAlign(
        HorizontalAlign.RIGHT).buildAnchorPositioner(anchorElement);
    buttonDropdownController = new DropdownController.Builder<FileTreeMenuItem>(positioner,
        anchorElement, appContext.getResources(), listener, renderer).setShouldAutoFocusOnOpen(true)
        .build();
    buttonDropdownController.setItems(rootMenuItems);
View Full Code Here

            }
            item.onClicked(selectedNode);
          }
        };

    Positioner positioner = new DropdownPositionerBuilder().setHorizontalAlign(
        HorizontalAlign.RIGHT).buildMousePositioner();
    contextDropdownController = new DropdownController.Builder<FileTreeMenuItem>(
        positioner, null, res, listener, renderer).setShouldAutoFocusOnOpen(true).build();
    contextDropdownController.setItems(rootMenuItems);
  }
View Full Code Here

    // lives outside of the component host, need to resolve this when I get a
    // chance should be easy to make tooltip and autohide crud its own thing.
    // TODO: This should never be shown (its a fallback just in
    // case we hit a case where it could in the future).
    final String defaultText = "Access the AwesomeBox for more options";
    Positioner tooltipPositioner = new Tooltip.TooltipPositionerBuilder().buildAnchorPositioner(
        view.awesomeBoxComponentHostView.getElement());
    Tooltip tooltip = new Tooltip.Builder(appContext.getResources(),
        view.awesomeBoxComponentHostView.getElement(), tooltipPositioner).setTooltipRenderer(
        new Tooltip.TooltipRenderer() {
          @Override
View Full Code Here

          folderNameElement.setTextContent(" - " + itemData.getPathComponent(size - 2));
        }
      }
    };

    Positioner positioner = new DropdownPositionerBuilder().buildAnchorPositioner(
        getView().runAlwaysDropdown.getInput());
    DropdownController<PathUtil> autocompleteDropdown = new DropdownController.Builder<PathUtil>(
        positioner, null, getView().res, clickListener, itemRenderer).setInputTargetElement(
        getView().runAlwaysDropdown.getInput())
        .setShouldAutoFocusOnOpen(false).setKeyboardSelectionEnabled(true).build();
View Full Code Here

          public void onItemClicked(TreeNodeMenuItem item) {
            item.onClicked(selectedNode);
          }
        };

    Positioner mousePositioner = new DropdownPositionerBuilder().setHorizontalAlign(
        HorizontalAlign.RIGHT).buildMousePositioner();
    contextDropdownController = new DropdownController.Builder<TreeNodeMenuItem>(
        mousePositioner, null, res, listener, renderer).setShouldAutoFocusOnOpen(true).build();
  }
View Full Code Here

              return;
            }
            item.onClicked(null);
          }
        };
    Positioner positioner = new DropdownPositionerBuilder().setHorizontalAlign(
        HorizontalAlign.RIGHT).buildAnchorPositioner(anchorElement);
    buttonDropdownController = new DropdownController.Builder<FileTreeMenuItem>(positioner,
        anchorElement, controller.getResources(), listener, renderer).setShouldAutoFocusOnOpen(true)
        .build();
    buttonDropdownController.setItems(rootMenuItems);
View Full Code Here

            }
            item.onClicked(selectedNode);
          }
        };

    Positioner positioner = new DropdownPositionerBuilder().setHorizontalAlign(
        HorizontalAlign.RIGHT).buildMousePositioner();
    contextDropdownController = new DropdownController.Builder<FileTreeMenuItem>(
        positioner, null, res, listener, renderer).setShouldAutoFocusOnOpen(true).build();
    contextDropdownController.setItems(rootMenuItems);
  }
View Full Code Here

TOP

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

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.