JideSplitButton appears selected invalidly

This is the forum for JIDE Common Layer which is open sourced at https://github.com/jidesoft/jide-oss. Please note, JIDE technical support doesn't monitor this forum as often as other forums. Please consider subscribe for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

Moderator: JIDE Support

Forum rules
Community driven forum for open source JIDE Common Layer. JIDE technical support doesn't monitor this forum as often as other forums. If you only use JIDE Common Layer, please consider subscribing for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

JideSplitButton appears selected invalidly

Postby ricky_clarkson » Tue Mar 24, 2009 6:14 am

Hi,

Drag the mouse from the button part of a JideSplitButton into the down-arrow part (where you click to make the drop-down menu appear) and release it. Do not allow the mouse to leave the JideSplitButton's area. The button part stays depressed, as if the mouse was still being dragged.

Here is some code to run to test this with:
Code: Select all
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import com.jidesoft.swing.*;

class Main
{
    public static void main(String[] args)
    {
        JFrame frame = new JFrame();
        frame.setLayout(new GridLayout());
        final ButtonGroup group = new SplitButtonGroup();

        for (int a = 0; a < 5; a++)
        {
            final JideSplitButton button = new JideSplitButton(""+a);
            button.add("Item");
            button.setButtonStyle( JideSplitButton.TOOLBOX_STYLE );
            group.add(button);
            frame.add(button);
        }

        frame.pack();
        frame.setVisible(true);
    }
}


If you have any suggestions, fixes or workarounds, or can't reproduce it, please let me know. I plan to look at the source to find the cause, but I'd guess it's a mouseDragged storing some state that doesn't get cleaned up. It doesn't help that the source does not build as-is. I guess someone doesn't realise there are other OSs besides OS X: "/home/ricky/jide/jide-oss/src/com/jidesoft/plaf/aqua/AquaJidePopupMenuUI.java:[9,16] package apple.laf does not exist".

This is my first post; if I don't respond to an answer it could be that I've misconfigured something here; feel free to send me email at ricky.clarkson@gmail.com if I'm slow.
ricky_clarkson
 
Posts: 5
Joined: Tue Mar 24, 2009 6:03 am

Re: JideSplitButton appears selected invalidly

Postby JIDE Support » Tue Mar 24, 2009 9:39 am

I don't think this is a bug. You didn't add any menu items to the split button. Once you add some, you will see the menu items are shown in a drop down menu while the button is pressed. It should remain pressed unless you click in other place or press ESCAPE key. In the other word, just like a JMenu.

To compile the source code, you just need to include laf.jar which is included in the svn of JIDE Common Layer under libs folder.
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Re: JideSplitButton appears selected invalidly

Postby ricky_clarkson » Tue Mar 24, 2009 10:19 am

If I didn't add any items, then what does this line of code from my original message do?
Code: Select all
button.add("Item");


"Once you add some, you will see the menu items are shown in a drop down menu while the button is pressed."

While the drop-down arrow button is pressed, but not the main button part.

It certainly should not behave in the way I described, where the appearance differs if you release the mouse over the menu drop-down arrow than if you release it over the button portion. Do you fail to reproduce the problem?
ricky_clarkson
 
Posts: 5
Joined: Tue Mar 24, 2009 6:03 am

Re: JideSplitButton appears selected invalidly

Postby JIDE Support » Tue Mar 24, 2009 10:26 am

I really don't think it is a bug if we are talking about the same thing. When you press the down arrow, the whole split button will appear as sunken and remain sunken as long as the drop down menu is visible. You can try a split button in MS Office2003 which behaves the same way.

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

Re: JideSplitButton appears selected invalidly

Postby ricky_clarkson » Tue Mar 24, 2009 10:28 am

I forgot to mention, the build error I mentioned was from running mvn clean install. If there's a required jar, perhaps the pom.xml should mention that in its dependencies section. I deleted plaf/aqua (before you replied) and the rest built fine.
ricky_clarkson
 
Posts: 5
Joined: Tue Mar 24, 2009 6:03 am

Re: JideSplitButton appears selected invalidly

Postby ricky_clarkson » Tue Mar 24, 2009 10:36 am

In no part of my description of the problem did I mention pressing the down arrow. Start dragging from the normal button part, and drag the mouse to the down arrow, and release the mouse. Do not start the drag on the down arrow or otherwise press it.
ricky_clarkson
 
Posts: 5
Joined: Tue Mar 24, 2009 6:03 am

Re: JideSplitButton appears selected invalidly

Postby JIDE Support » Tue Mar 24, 2009 10:42 am

Never mind. I think I reproduced the problem. Yes, you are correct. The behavior is not correct. We will take a look and fix it. Sorry for the confusion.
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Re: JideSplitButton appears selected invalidly

Postby ricky_clarkson » Tue Mar 24, 2009 3:07 pm

I see from svn that this has been fixed, and I've verified the fix. After a false start I'm impressed!

When should I expect to see this in something usable via the central maven repos?
ricky_clarkson
 
Posts: 5
Joined: Tue Mar 24, 2009 6:03 am

Re: JideSplitButton appears selected invalidly

Postby JIDE Support » Tue Mar 24, 2009 3:30 pm

Yes, we indeed fixed it. We will have a stable release in a week or so.
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Re: JideSplitButton appears selected invalidly

Postby JIDE Support » Thu Mar 26, 2009 4:02 pm

Just so you know, this bug is fixed in 2.5.8 which was just released.

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


Return to JIDE Common Layer Open Source Project Discussion (Community Driven)

Who is online

Users browsing this forum: No registered users and 5 guests