Using the MouseEvent in a JideTabbedPane.

This forum is used by users to request and discuss new product features. Please do not use this forum for technical support including bug reports.

Moderator: JIDE Support

Forum rules
Product suggestions only. Please do not use this forum for technical support including bug reports.

Using the MouseEvent in a JideTabbedPane.

Postby Andy Tipton » Wed Dec 05, 2007 2:48 pm

I have a popup menu in a JideTabbedPane that works off of a MouseEvent. The right-click popup menu only works in the pane itself, not on the tab. It looks like the right-click mouse event is intercepted and it would take major overriding to make it work.

Is this going to be in future releases? If not, can it be?

Thank you in advance,
artipton
Andy Tipton
 
Posts: 65
Joined: Wed Dec 05, 2007 2:41 pm

Postby JIDE Support » Wed Dec 05, 2007 2:50 pm

You would need to add MouseListener to (JideTabbedPaneUI) tabbedPane.getUI()).getTabPanel().

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37245
Joined: Sun Sep 14, 2003 10:49 am

Postby Andy Tipton » Wed Dec 05, 2007 2:58 pm

Wow, the speed of that response was outstanding. Kudos.

That worked... Thank you.
Andy Tipton
 
Posts: 65
Joined: Wed Dec 05, 2007 2:41 pm

Postby JIDE Support » Wed Dec 05, 2007 3:01 pm

You are welcome. Just so you know, if you were to use JTabbedPane in JDK5 in WRAP mode, you would need to do this too. But JTabbedPane fixed this in JDK6 so that adding mouse listener to tabbed pane will work. We haven't got a chance to fix it yet in JideTabbedPane as its code is based on JDK5's JTabbedPane. Will get to it.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37245
Joined: Sun Sep 14, 2003 10:49 am

Postby JIDE Support » Fri Dec 14, 2007 2:09 pm

Just so you know, 2.2.1.06 is released which fixed this. Now you just need to add mouse listener to JideTabbedPane directly to detect clicks on the tabs.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37245
Joined: Sun Sep 14, 2003 10:49 am

Re: Using the MouseEvent in a JideTabbedPane.

Postby jcoder » Tue Nov 24, 2009 6:20 pm

I use jide-oss 2.8, jdk1.6 on WinXP. When I write a class like this:
Code: Select all
class MyTabbedPane extends JideTabbedPane
{
   public MyTabbedPane()
   {
        super(JideTabbedPane.TOP );

       ((JideTabbedPaneUI) getUI()).getTabPanel().addMouseListener(new MouseAdapter()
        {

            public void mouseClicked(MouseEvent me)
            {
            }

            public void mouseReleased(MouseEvent e)
            {
                //if((e.getModifiers() & MouseEvent.BUTTON3_MASK) != 0)
            }
        });
    }
  }
}


If there is no addMouseListener, tab works fine. But after adding the addMouseListener line, tab selection fails to work. That is, I can't use mouse to select a different tab.

I believe it's a bug in jide-oss. Can you guys look into it? Thanks.
jcoder
 
Posts: 1
Joined: Tue Nov 24, 2009 6:13 pm

Re: Using the MouseEvent in a JideTabbedPane.

Postby JIDE Support » Tue Nov 24, 2009 11:15 pm

Please add the mouse listener to your JideTabbedPane itself instead of its tab panel. The reason is that, Swing will consume the mouse event of the child components so that the parent component will not get the mouse event any more.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37245
Joined: Sun Sep 14, 2003 10:49 am


Return to Product Suggestions

Who is online

Users browsing this forum: No registered users and 5 guests