private Feature currentFeature = null;
private OrderedLayout layout;
-
+
private Button propertiesSelect;
private OrderedLayout right;
right = new OrderedLayout(OrderedLayout.ORIENTATION_VERTICAL);
layout.addComponent(right);
- propertiesSelect = new Button("Show properties",this);
+ propertiesSelect = new Button("Show properties", this);
propertiesSelect.setSwitchMode(true);
right.addComponent(propertiesSelect);
properties = currentFeature.getPropertyPanel();
if (feature != null) {
layout.replaceComponent(currentFeature, feature);
currentFeature = feature;
- right.replaceComponent(properties, feature
- .getPropertyPanel());
properties = feature.getPropertyPanel();
- properties.setVisible(((Boolean)propertiesSelect.getValue()).booleanValue());
-
+ if (properties != null) {
+ right.replaceComponent(properties, feature
+ .getPropertyPanel());
+ properties.setVisible(((Boolean) propertiesSelect
+ .getValue()).booleanValue());
+ }
getWindow()
.setCaption(
"IT Mill Toolkit Features / "
}
public void buttonClick(ClickEvent event) {
- properties.setVisible(((Boolean)propertiesSelect.getValue()).booleanValue());
+ properties.setVisible(((Boolean) propertiesSelect.getValue())
+ .booleanValue());
}
}