this.heightPanel.removeAll();
this.heightButtons.removeAllElements();
this.heightButtonGroup = new ButtonGroup();
for (String text : heights) {
JToggleButton button;
Image image = vegetationIS.getImage(text);
if (image == null) {
image = vegetationIS.getImage("DEFAULT");
}
if (image != null) {
button = new JToggleButton(new ImageIcon(image));
} else {
button = new JToggleButton(text);
}
button.addActionListener(this);
button.setToolTipText(text);
button.setActionCommand(text);
this.heightButtons.add(button);
this.heightButtonGroup.add(button);
this.heightPanel.add(button);
}
this.heightButtons.get(0).setSelected(true);