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.


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)

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: Mon Jun 25 04:47:57 GMT 2018

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

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

Back to the top