|
Replies:
10
-
Last Post:
Aug 8, 2007 7:18 AM
by: codebrain
|
|
|
|
|
|
|
JXDropButton Demo now available
Posted:
Dec 7, 2006 2:30 PM
|
|
|
I have put together a small demo of the JXDropButton for some feedback.
The JXDropButton is a button with a popup menu that when clicked will show the popup allowing the developer to reduce screen realty or increase functionality by combining similar actions into a single button.
We've all seen this component in our browser's Back button for instance. If you click the button, you go back once. If you click the arrow, you get a popup menu of the locations you have visited.
A screen shot of the demo along with component states: http://www.jroller.com/resources/s/syhaas/jxdropbuttondemo.png
The running demo: http://www.jroller.com/resources/s/syhaas/JXDropButtonDemo.jnlp
Comments? Questions? Thanks -Sy
|
|
|
|
|
|
|
Re: JXDropButton Demo now available
Posted:
Dec 7, 2006 3:12 PM
in response to: syhaas
|
|
|
Cool! I've been watching the commits in the incubator, waiting for the demo . Now I guess I'll go take a look at that API.
Richard
|
|
|
|
|
|
|
|
Re: JXDropButton Demo now available
Posted:
Dec 8, 2006 6:56 AM
in response to: mattnathan
|
|
|
Very nice! This component has been misisng for quite some time. One of my favorite features of Powerbuilder.  Does the JXDropButton have its own UI delegate?
Erik
|
|
|
|
|
|
|
|
Re: JXDropButton Demo now available
Posted:
Dec 11, 2006 1:30 PM
in response to: evickroy
|
|
|
Yes, DropButtonUI which extends MetalButtonUI and has specific delegates for Basic/Metal and for Windows. I use the LookAndFeelAddons for the delegation.
|
|
|
|
|
|
|
|
Re: JXDropButton Demo now available
Posted:
Dec 8, 2006 10:39 AM
in response to: syhaas
|
|
|
it looks great, but it seems that the drop downs do not conform to the look and feel. They all seem to look the same despite different LnFs
|
|
|
|
|
|
|
|
Re: JXDropButton Demo now available
Posted:
Dec 11, 2006 1:37 PM
in response to: gmoniey
|
|
|
Which LNFs are you looking to see? I've supplied the basics of the 2 most common and it certainly would not be much trouble to write delegates for other LNFs.
I am personally looking to utilize the OfficeLNFs for one of the apps I'm working on and will be writing my own UI delegate for that LNF.
The image I provided in the original post shows that there is a difference in the look but the feel should be the same (drop button popup a menu). What should be different?
|
|
|
|
|
|
|
|
Re: JXDropButton Demo now available
Posted:
Dec 8, 2006 1:26 PM
in response to: syhaas
|
|
|
Good stuff, definitely a useful component. However, if you want some feedback:
First it is a bit odd that when you switch to Win L&F that the popup is still Metal, not sure what's going on there.
There needs to me more spacing around the right edge, the arrow is right against the edge.
When there's an action, the vertical bar looks a bit ugly. Instead of a solid black line, If you look at Windows, it has a light grey line with a white line alongside it to give it a 3d indented effect.
Also, to be accurate on Windows, when there's an action and you push the main part of the button, the entire button should appear pressed. However, if you click the arrow side, only the arrow side should appear pressed. Your version appears to have the opposite behaviour (I think, kinda hard to tell with the annoying focus rect in 6, grr Josh!).
Otherwise its a good idea. I'd recommend it for inclusion in the core, though perhaps not as an additional component. Maybe extra methods on JButton, setDropDownMenu(), and add/removeDropDownListener(PopupMenuLister) would be sufficient.
|
|
|
|
|
|
|
|
Re: JXDropButton Demo now available
Posted:
Dec 11, 2006 1:48 PM
in response to: benloud
|
|
|
> First it is a bit odd that when you switch to Win L&F > that the popup is still Metal, not sure what's going > on there.
Yeah, I'm not sure what's going on here either. In the JXDropButton.updateUI method, I have a statement to update the popup menu as well. Not sure how else to do this. > There needs to me more spacing around the right edge, > the arrow is right against the edge.
In which LNF? This might happen due to the lack of button insets (or margin). But the arrow should be centered between the line (or where the line might be) and the edge of the button.
> When there's an action, the vertical bar looks a bit > ugly. Instead of a solid black line, If you look at > Windows, it has a light grey line with a white line > alongside it to give it a 3d indented effect.
Cool. Like it. Thanks!
> Also, to be accurate on Windows, when there's an > action and you push the main part of the button, the > entire button should appear pressed. However, if you > click the arrow side, only the arrow side should > appear pressed. Your version appears to have the > opposite behaviour (I think, kinda hard to tell with > the annoying focus rect in 6, grr Josh!).
For the example that when the arrow side is clicked, I have made the whole button appear "pressed" and if the action side is clicked, only the action side appears "pressed".
> Otherwise its a good idea. I'd recommend it for > inclusion in the core, though perhaps not as an > additional component. Maybe extra methods on JButton, > setDropDownMenu(), and > add/removeDropDownListener(PopupMenuLister) would be > sufficient.
Possible. I thought about this as well. I think (cause I havent written win app in a while) windows has a bit type that could be set to indicate the use of a drop button. The eclipse platform has this component, although I dont know what they call it, but it is constructed by a bit type.
|
|
|
|
|
|
|
|
Re: JXDropButton Demo now available
Posted:
Dec 11, 2006 4:45 PM
in response to: syhaas
|
|
|
> > Otherwise its a good idea. I'd recommend it for > > inclusion in the core, though perhaps not as an > > additional component. Maybe extra methods on > JButton, > > setDropDownMenu(), and > > add/removeDropDownListener(PopupMenuLister) would > be > > sufficient. > > Possible. I thought about this as well. I think > (cause I havent written win app in a while) windows > has a bit type that could be set to indicate the use > of a drop button. The eclipse platform has this > component, although I dont know what they call it, > but it is constructed by a bit type.
FWIW, I'm pretty sure in Visual Studio 2005 it is a separate component on the palette.
|
|
|
|
|
|
|
|
Re: JXDropButton Demo now available
Posted:
Aug 8, 2007 7:18 AM
in response to: syhaas
|
|
|
I just found this thread about this cool button implementation.
Are there any news about JXDropButton? I can not find information or source code regarding JXDropButton. Does it belong to the swinglabs project?
|
|
|
|
|