Details
-
Type:
New Feature
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.6.3, 1.7-beta-1
-
Fix Version/s: 1.6.4, 1.7-beta-1
-
Component/s: Swing
-
Labels:None
-
Patch Submitted:Yes
-
Number of attachments :
Description
It would be great to have JComponent.size be bindable via synthetic properties, gfxbuilder's nodes will benefit a lot if they are able to bind to its container's dimensions.
Including patch for review.
Sample usage:
swing.edt {
frame(size: [300, 100], visible: true) {
panel(id: "p") {
textField(text: bind{p.size.width}, columns: 20)
}
}
}
Figured that the following properties could be implemented with ComponentListener as well: [width, height, bounds, x, y, visible]
As a reference those properties are already observable on JFrame by default.