Package com.google.collide.client.ui.tooltip.Tooltip

Examples of com.google.collide.client.ui.tooltip.Tooltip.TooltipRenderer


    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() {
          @Override
          public elemental.html.Element renderDom() {
            DivElement container = Elements.createDivElement();

            DivElement header = Elements.createDivElement();
            header.setTextContent("No File Selected");
            header.getStyle().setFontWeight(CSSStyleDeclaration.FontWeight.BOLDER);
            header.getStyle().setMarginBottom(5, CSSStyleDeclaration.Unit.PX);
            container.appendChild(header);

            DivElement text = Elements.createDivElement();
            text.setTextContent(
                "Choose a file from the tree to preview it, or select a custom run target.");
            container.appendChild(text);

            return container;
          }
        }).build();

    Tooltip yamlAddedTooltip = new Tooltip.Builder(
        context.getResources(), target, positioner).setShouldListenToHover(false)
        .setTooltipRenderer(new TooltipRenderer() {
          @Override
          public elemental.html.Element renderDom() {
            DivElement container = Elements.createDivElement();

            SpanElement text = Elements.createSpanElement();
            text.setTextContent(
                "The run target has been set to your newly created app.yaml file. ");
            container.appendChild(text);

            // TODO: We'd like to offer an option to undo the
            // automatic setting of the run target, but I don't have time
            // to write a coach tips class right now and tool tips can't be
            // clicked.
            return container;
          }
        }).build();

    Tooltip targetResetTooltip = new Tooltip.Builder(
        context.getResources(), target, positioner).setShouldListenToHover(false)
        .setTooltipRenderer(new TooltipRenderer() {
          @Override
          public elemental.html.Element renderDom() {
            DivElement container = Elements.createDivElement();

            SpanElement text = Elements.createSpanElement();
View Full Code Here

TOP

Related Classes of com.google.collide.client.ui.tooltip.Tooltip.TooltipRenderer

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.