Package com.github.gwtbootstrap.client.ui

Examples of com.github.gwtbootstrap.client.ui.Tooltip


      tabLink.show();
   }

   @Test
   public void testTooltip() {
      Tooltip tooltip = new Tooltip("test");
      tooltip.setWidget(new Button("button"));
      tooltip.show();
      tooltip.hide();

      // for configure()
      tooltip.asWidget();
      this.getBrowserSimulator().fireLoopEnd();

      // TODO: TooltipCellDecorator test.
   }
View Full Code Here


            @Override
            public void onClick(ClickEvent event) {
                gotoPage(currentPage - 1);
            }
        }, ClickEvent.getType());
        Tooltip leftPageTooltip = new Tooltip( GoogleDisplayerConstants.INSTANCE.googleTableDisplayer_gotoPreviousPage() );
        leftPageTooltip.add(leftPageIcon);

        Icon rightPageIcon = new Icon(IconType.ANGLE_RIGHT);
        rightPageIcon.setIconSize(IconSize.LARGE);
        rightPageIcon.getElement().getStyle().setCursor(Style.Cursor.POINTER);
        rightPageIcon.sinkEvents(Event.ONCLICK);
        rightPageIcon.addHandler(new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                gotoPage(currentPage + 1);
            }
        }, ClickEvent.getType());
        Tooltip rightPageTooltip = new Tooltip( GoogleDisplayerConstants.INSTANCE.googleTableDisplayer_gotoNextPage() );
        rightPageTooltip.add(rightPageIcon);

        Icon firstPageIcon = new Icon(IconType.DOUBLE_ANGLE_LEFT);
        firstPageIcon.setIconSize(IconSize.LARGE);
        firstPageIcon.getElement().getStyle().setCursor(Style.Cursor.POINTER);
        firstPageIcon.sinkEvents(Event.ONCLICK);
        firstPageIcon.addHandler(new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                gotoPage(1);
            }
        }, ClickEvent.getType());
        Tooltip firstPageTooltip = new Tooltip( GoogleDisplayerConstants.INSTANCE.googleTableDisplayer_gotoFirstPage() );
        firstPageTooltip.add(firstPageIcon);

        Icon lastPageIcon = new Icon(IconType.DOUBLE_ANGLE_RIGHT);
        lastPageIcon.setIconSize(IconSize.LARGE);
        lastPageIcon.getElement().getStyle().setCursor(Style.Cursor.POINTER);
        lastPageIcon.sinkEvents(Event.ONCLICK);
        lastPageIcon.addHandler(new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                gotoPage(numberOfPages);
            }
        }, ClickEvent.getType());
        Tooltip lastPageTooltip = new Tooltip( GoogleDisplayerConstants.INSTANCE.googleTableDisplayer_gotoLastPage() );
        lastPageTooltip.add(lastPageIcon);

        Label totalPages = null;
        if ( showTotalPagesHint ) {
            totalPages = new Label(
                                    GoogleDisplayerConstants.INSTANCE.googleTableDisplayer_pages(
View Full Code Here

        if ( toolBarItemsMap.size() == 0 ) {
            bgroup.getElement().getStyle().setPaddingLeft( 19, Style.Unit.PX );
        }

        for ( final ToolBarItem item : _toolBar.getItems() ) {
            bgroup.add( new Tooltip( item.getTooltip() ) {{
                setPlacement( Placement.BOTTOM );
                add( new Button() {{
                    setIcon( IconType.valueOf( ( (ToolBarTypeIcon) item.getIcon() ).getType().toString() ) );
                    setEnabled( item.isEnabled() );
                    addClickHandler( new ClickHandler() {
View Full Code Here

TOP

Related Classes of com.github.gwtbootstrap.client.ui.Tooltip

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.