elevationChangeListener);
}
});
// Create movable check box bound to MOVABLE controller property
this.movableCheckBox = new NullableCheckBox(SwingTools.getLocalizedLabelText(preferences,
FurniturePanel.class, "movableCheckBox.text"));
this.movableCheckBox.setNullable(controller.getMovable() == null);
this.movableCheckBox.setValue(controller.getMovable());
final PropertyChangeListener movableChangeListener = new PropertyChangeListener() {
public void propertyChange(PropertyChangeEvent ev) {
movableCheckBox.setNullable(ev.getNewValue() == null);
movableCheckBox.setValue((Boolean)ev.getNewValue());
}
};
controller.addPropertyChangeListener(FurnitureController.Property.MOVABLE, movableChangeListener);
this.movableCheckBox.addChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent ev) {
controller.removePropertyChangeListener(FurnitureController.Property.MOVABLE, movableChangeListener);
controller.setMovable(movableCheckBox.getValue());
controller.addPropertyChangeListener(FurnitureController.Property.MOVABLE, movableChangeListener);
}
});
// Create doorOrWindow check box bound to DOOR_OR_WINDOW controller property
this.doorOrWindowCheckBox = new NullableCheckBox(SwingTools.getLocalizedLabelText(preferences,
FurniturePanel.class, "doorOrWindowCheckBox.text"));
this.doorOrWindowCheckBox.setNullable(controller.getDoorOrWindow() == null);
this.doorOrWindowCheckBox.setValue(controller.getDoorOrWindow());
final PropertyChangeListener doorOrWindowChangeListener = new PropertyChangeListener() {
public void propertyChange(PropertyChangeEvent ev) {
doorOrWindowCheckBox.setNullable(ev.getNewValue() == null);
doorOrWindowCheckBox.setValue((Boolean)ev.getNewValue());
}
};
controller.addPropertyChangeListener(FurnitureController.Property.DOOR_OR_WINDOW, doorOrWindowChangeListener);
this.doorOrWindowCheckBox.addChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent ev) {
controller.removePropertyChangeListener(FurnitureController.Property.DOOR_OR_WINDOW, doorOrWindowChangeListener);
controller.setDoorOrWindow(doorOrWindowCheckBox.getValue());
controller.addPropertyChangeListener(FurnitureController.Property.DOOR_OR_WINDOW, doorOrWindowChangeListener);
}
});
// Create back face shown check box bound to BACK_FACE_SHOWN controller property
this.backFaceShownCheckBox = new NullableCheckBox(SwingTools.getLocalizedLabelText(preferences,
FurniturePanel.class, "backFaceShownCheckBox.text"));
this.backFaceShownCheckBox.setNullable(controller.getBackFaceShown() == null);
this.backFaceShownCheckBox.setValue(controller.getBackFaceShown());
final PropertyChangeListener backFaceShownChangeListener = new PropertyChangeListener() {
public void propertyChange(PropertyChangeEvent ev) {
backFaceShownCheckBox.setNullable(ev.getNewValue() == null);
backFaceShownCheckBox.setValue((Boolean)ev.getNewValue());
}
};
controller.addPropertyChangeListener(FurnitureController.Property.BACK_FACE_SHOWN, backFaceShownChangeListener);
this.backFaceShownCheckBox.addChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent ev) {
controller.removePropertyChangeListener(FurnitureController.Property.BACK_FACE_SHOWN, backFaceShownChangeListener);
controller.setBackFaceShown(backFaceShownCheckBox.getValue());
resetIcon(false);
controller.addPropertyChangeListener(FurnitureController.Property.BACK_FACE_SHOWN, backFaceShownChangeListener);
}
});
// Create resizable check box bound to RESIZABLE controller property
this.resizableCheckBox = new NullableCheckBox(SwingTools.getLocalizedLabelText(preferences,
FurniturePanel.class, "resizableCheckBox.text"));
this.resizableCheckBox.setNullable(controller.getResizable() == null);
this.resizableCheckBox.setValue(controller.getResizable());
final PropertyChangeListener resizableChangeListener = new PropertyChangeListener() {
public void propertyChange(PropertyChangeEvent ev) {
resizableCheckBox.setNullable(ev.getNewValue() == null);
resizableCheckBox.setValue((Boolean)ev.getNewValue());
}
};
controller.addPropertyChangeListener(FurnitureController.Property.RESIZABLE, resizableChangeListener);
this.resizableCheckBox.addChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent ev) {
controller.removePropertyChangeListener(FurnitureController.Property.RESIZABLE, resizableChangeListener);
controller.setResizable(resizableCheckBox.getValue());
controller.addPropertyChangeListener(FurnitureController.Property.RESIZABLE, resizableChangeListener);
}
});
// Create deformable check box bound to DEFORMABLE controller property
this.deformableCheckBox = new NullableCheckBox(SwingTools.getLocalizedLabelText(preferences,
FurniturePanel.class, "deformableCheckBox.text"));
this.deformableCheckBox.setNullable(controller.getDeformable() == null);
this.deformableCheckBox.setValue(controller.getDeformable());
final PropertyChangeListener deformableChangeListener = new PropertyChangeListener() {
public void propertyChange(PropertyChangeEvent ev) {