Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    TabSelectedHandler: Missing Methods in 5.1

    Hi,

    in latest 5.1 from 10.12 the TabSelectedHandler is missing 2 methods which were present in 5.0 (event.isLeftButtonDown() || event.isRightButtonDown()). Those methods are useful if you want to know if the user clicked the tab or if you chosed the tab via Java Code.

    Thanks
    Andy


    Code:
    tabSet.addTabSelectedHandler( new TabSelectedHandler()
            {
    
                @Override
                public void onTabSelected( TabSelectedEvent event )
                {
                    if ( event.isLeftButtonDown() || event.isRightButtonDown() )
                    {
                      
                    }
                }
            } );
    Last edited by andyx1975; 10 Dec 2015, 23:36.

    #2
    We'll check on whether these methods were in fact present and got removed. In the meantime, these are actually just shortcuts for equivalent static APIs on EventHandler, so no functionality has been lost.

    Comment


      #3
      So I can use this one without any problems in the future?

      Code:
       tabSet.addTabSelectedHandler( new TabSelectedHandler()
              {
      
                  @Override
                  public void onTabSelected( TabSelectedEvent event )
                  {
                      if ( event.getName().equals(EventHandler.leftButtonDown() )|| event.getName().equals(EventHandler.rightButtonDown() )
                      {
      
                      }
                  }
              } );
      Last edited by andyx1975; 14 Dec 2015, 13:09.

      Comment


        #4
        Ok this seems to work fine... thanks!!!

        Code:
        tabSet.addTabSelectedHandler( new TabSelectedHandler()
                {
        
                    @Override
                    public void onTabSelected( TabSelectedEvent event )
                    {
                        if ( EventHandler.leftButtonDown() ||  EventHandler.rightButtonDown())
                        {
                           
                            
                        }
                    }
                } );

        Comment

        Working...
        X