How to prevent negative values in width, height portions of bounds [message #900274] |
Mon, 06 August 2012 05:55  |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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)
|
|
|
Powered by
FUDForum. Page generated in 0.03867 seconds