Feature request : On mouse up

Discuss all feature requests you have for a new Servoy versions here. Make sure to be clear about what you want, provide an example and indicate how important the feature is for you

Feature request : On mouse up

Postby Peter de Groot » Wed May 04, 2011 9:07 am

When a button that has an onAction method assigned, the onAction method is fired when the mouse button is released whilst the mouse pointer is over/on the button, some onMouseUp event I guess, but when a onAction is assigned to a label or image without the showClicked property checked the onAction method always get fired.

I would nice if an element on a window that has an onAction behaves the same as a button and only fires the method only when the mouse pointer is over/on the element and on a mouse up event.

Regards,

Peter
Peter de Groot
 
Posts: 215
Joined: Thu Jan 10, 2008 8:38 pm
Location: Not sure...

Re: Feature request : On mouse up

Postby jcompagner » Wed May 04, 2011 10:26 am

so if you have a label with an onaction then that is also done on mouse release, not on mouse press:

public void mouseReleased(MouseEvent e)
{
if (SwingUtilities.isLeftMouseButton(e) && isEnabled())
{
eventExecutor.fireActionCommand(true, AbstractScriptLabel.this, e.getModifiers(), e.getPoint());
}
}

So it should behave pretty much the same.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8212
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Feature request : On mouse up

Postby Peter de Groot » Wed May 04, 2011 11:04 am

jcompagner wrote:so if you have a label with an onaction then that is also done on mouse release, not on mouse press:
So it should behave pretty much the same.


You're right, but only when the property showClick is checked √ , when it's not the onAction always fires when clicked.

Regards,
Peter
Peter de Groot
 
Posts: 215
Joined: Thu Jan 10, 2008 8:38 pm
Location: Not sure...

Re: Feature request : On mouse up

Postby jcompagner » Wed May 04, 2011 11:22 am

no a label with an onaction == showclick == false
And that onaction is only called on mouse release
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8212
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Feature request : On mouse up

Postby maurice » Wed May 04, 2011 4:18 pm

Hi,

I tested it also, and found out that onAction is always fired (showClick == false) even if you navigate away from the label and then release the mouse.
I would expect that if you navigate away from the label and then release the mouse it would not fire the onAction event.
Maurice Meijer
Stb Zorg
SAN Partner

Stb Zorg - http://www.stb.nl
User avatar
maurice
 
Posts: 25
Joined: Fri Sep 12, 2008 8:29 am

Re: Feature request : On mouse up

Postby jcompagner » Wed May 04, 2011 4:37 pm

yes this is a difference between a label (with a onaction) and a button with an onaction
The mouseReleased is even triggered when the component is not again on that target
for a button this is the same thing but Swing (the java classes) has a special "armed" property and that is set to false when the mouse moves out of the component, and because of that it will not fire the action.

If you need this also for the label, place make a case , referring to this forum post.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8212
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Feature request : On mouse up

Postby Harjo » Wed May 04, 2011 9:00 pm

+1
I have created a case: 382174
Harjo Kompagnie
Direct ICT / Servoy Hosting / ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
User avatar
Harjo
 
Posts: 4296
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: Feature request : On mouse up

Postby Peter de Groot » Thu May 05, 2011 9:05 am

+1 Harjo
Peter de Groot
 
Posts: 215
Joined: Thu Jan 10, 2008 8:38 pm
Location: Not sure...

Re: Feature request : On mouse up

Postby ROCLASI » Thu May 05, 2011 10:42 am

+1
Robert Ivens
ROCLASI Software Solutions / JBS Group, Partner
SAN Developer / Servoy Valued Professional / Servoy Certified Developer
Twitter: @roclasi / @servoyforge
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5319
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: Feature request : On mouse up

Postby maurice » Thu May 05, 2011 11:20 am

+1 :)
Maurice Meijer
Stb Zorg
SAN Partner

Stb Zorg - http://www.stb.nl
User avatar
maurice
 
Posts: 25
Joined: Fri Sep 12, 2008 8:29 am


Return to Discuss Feature Requests

Who is online

Users browsing this forum: No registered users and 1 guest

cron