Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » WindowBuilder » How to prevent negative values in width, height portions of bounds(minimumSize is not guaranteed)
How to prevent negative values in width, height portions of bounds [message #900274] Mon, 06 August 2012 09:55 Go to next message
Ben Wilson is currently offline Ben WilsonFriend
Messages: 15
Registered: July 2012
Junior Member
Hi, I have a bean that inherits from JTextField and I need to prevent the WindowBuilder visual editor from allowing the developer to accidentally switch left and right sides thereby creating a component with a negative width. Is this something I can code in my component or an option I can configure in Eclipse?

I tried even by hard-coding a set of minimumSize in the constructor of my component to positive values, but to no avail.

Thanks,



Ben
Re: How to prevent negative values in width, height portions of bounds [message #900337 is a reply to message #900274] Mon, 06 August 2012 14:38 Go to previous message
Konstantin Scheglov is currently offline Konstantin ScheglovFriend
Messages: 555
Registered: July 2009
Senior Member
No, there are no such feature.
Moreover, it would need to be done for each layout.
Do to this, you will need to integrate this check at model level, for example:

org.eclipse.wb.internal.swing.model.layout.absolute.AbsoluteLayoutInfo.setBoundsWidth(ComponentInfo, int)
org.eclipse.wb.internal.swing.model.layout.absolute.AbsoluteLayoutInfo.command_BOUNDS(ComponentInfo, Point, Dimension)

or at GEF level

org.eclipse.wb.internal.swing.model.layout.absolute.AbsoluteLayoutInfo.command_BOUNDS(ComponentInfo, Point, Dimension)
org.eclipse.wb.internal.core.gef.policy.layout.absolute.AbsoluteBasedSelectionEditPolicy.createResizeHandle(int)


Konstantin Scheglov,
Google, Inc.
Previous Topic:Custom editor dialogs do not respond to enter and escape keys for OK and Cancel
Next Topic:problem with SWTResourceManager import
Goto Forum:
  


Current Time: Thu Apr 25 22:34:48 GMT 2024

Powered by FUDForum. Page generated in 0.02499 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top