I have a problem using non-visual components in WindowBuilder 7.6 (2010-07-21 update).
I have a class named TextFieldContainer which has a JTextField property plus an int field both with respective getter and setter:
- Code: Select all
public class TextFieldContainer {
private JTextField field;
private int fieldId;
public void setField(JTextField field) {
this.field = field;
}
public JTextField getField() {
return field;
}
public void setFieldId(int fieldId) {
this.fieldId = fieldId;
}
public int getFieldId() {
return fieldId;
}
}
I would like to use this non-visual component with WindowBuilder in order to set its property "field" to a visual JTextField from within the gui editor.
I was expecting to see TextFieldContainer.field property in WindowBuilder property view just like I see the int property fieldId, but actually this does not happens.
If the property would be visible maybe I could just select from a dropdown list the JTextField I want to assign to this property (from the ones present in current form), and this would dramatically increase my productivity..
My final intent is to extend visual components specifying an interface they implements and set a non-visual bean property to the visual components themselves, just because they implements that interface, e.g.:
- Code: Select all
public class InterfaceContainer {
private ISomeInterface field; // this was JTextField and not an interface..
public void setField(ISomeInterface field) {
this.field = field;
}
public ISomeInterface getField() {
return field;
}
}
and
- Code: Select all
public class MyTextField extends JTextField implements ISomeInterface { .. }
and
- Code: Select all
public class MyCheckBox extends JCheckBox implements ISomeInterface { .. }
Thank you for your excellent support
Luca