@Override
 public void delete() {
   getInnerView().delete();
   traitViewPanel.remove(innerViewPanel);
   traitViewPanel.remove(button.getComponent());
   traitViewPanel.revalidate();
 }
 public void addButtonSelectedListener(final IBooleanValueChangedListener listener) {
   button.addActionListener(
       new ActionListener() {
         @Override
         public void actionPerformed(ActionEvent e) {
           listener.valueChanged(!button.isSelected());
         }
       });
 }
 public AbstractToggleButtonTraitViewWrapper(
     K innerView, IIconToggleButtonProperties properties, boolean selected) {
   super(innerView);
   this.properties = properties;
   this.button =
       new IconToggleButton(properties.createStandardIcon(), properties.createUnselectedIcon());
   setButtonState(selected, true);
   button.setToolTipText(properties.getToolTipText());
 }
 public void setButtonState(boolean selected, boolean enabled) {
   button.setIconSet(properties.createStandardIcon(), properties.createUnselectedIcon());
   button.setEnabled(enabled);
   button.setSelected(selected);
 }