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

Examples of com.google.collide.client.ui.tooltip.Tooltip$Resources


    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() {
          @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();
View Full Code Here


    // 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
          public elemental.html.Element renderDom() {
            elemental.html.DivElement element = Elements.createDivElement();
View Full Code Here

     * Converts the <code>Application</code> XMLBean into a <code>UnitActionPackage</code> object.
     * @param application  the <code>Application</code> XMLBean to convert.
     * @return the converted <code>UnitActionPackage</code> object.
     */
    public static UnitActionPackage convertWADLtoUnitActionPackage(final Application application) {
        Resources resources = application.getResources();
        String baseURL = resources.getBase();
        if (!baseURL.endsWith("/")) {
            baseURL += "/";
        }
        List<Resource> resourceList = resources.getResourceList();

        List<UnitAction> unitActionList = new ArrayList<UnitAction>();
        for (Resource resource : resourceList) {
            unitActionList.addAll(convertResourceToUnitAction(resource));
        }
View Full Code Here

    public static String generateWADLForMashupRESTService(String myCocktailPath, int mashupId) throws DAOException, IOException {
        Mashup mashup = getMashup(mashupId);
       
        ApplicationDocument applicationDocument = ApplicationDocument.Factory.newInstance();
        Application application = applicationDocument.addNewApplication();
        Resources resources = application.addNewResources();
        resources.setBase(myCocktailPath);
       
        Resource resource = resources.addNewResource();
        resource.setPath("RESTService/mashupId="+mashupId);
       
        addResource(resource, "json""format=json",  mashup, "application/json");
        addResource(resource, "xml",   "format=xml",   mashup, "application/xml");
        addResource(resource, "jsonp", "format=jsonp", mashup, "application/javascript");
View Full Code Here

    public static String generateWADLForMashupRESTServiceJSON(String myCocktailPath, int mashupId) throws DAOException, IOException {
        Mashup mashup = getMashup(mashupId);
       
        ApplicationDocument applicationDocument = ApplicationDocument.Factory.newInstance();
        Application application = applicationDocument.addNewApplication();
        Resources resources = application.addNewResources();
        resources.setBase(myCocktailPath);
       
        Resource resource = resources.addNewResource();
        resource.setPath("RESTService/mashupId="+mashupId);
       
        addMethod(resource.addNewMethod(), "json", mashup, "application/json");
       
        return applicationDocument.xmlText(new XmlOptions().setSavePrettyPrint());
View Full Code Here

TOP

Related Classes of com.google.collide.client.ui.tooltip.Tooltip$Resources

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.