Dimension imageSize = PaletteList.this.getImageSize(elements);
for (Iterator<ListElement> it = elements.iterator(); it.hasNext();) {
ListElement le = it.next();
if (le.getImageValue() != null && !le.getImageValue().isNull()) {
ImageData id = le.getImageValue();
ImageIcon thisImage = new ImageIcon(id.getValue());
JToggleButton thisButton = new JToggleButton(PaletteList.this.makeTransparentIcon(thisImage));
thisButton.setPreferredSize(imageSize);
thisButton.setMinimumSize(imageSize);
thisButton.setMaximumSize(imageSize);
thisButton.addActionListener(new ActionListener() {