Skip to main content



      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 05:55 Go to next message
Eclipse UserFriend
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 10:38 Go to previous message
Eclipse UserFriend
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)
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: Sun Jul 13 01:41:49 EDT 2025

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

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

Back to the top