コード例 #1
0
 @Override
 public void delete() {
   getInnerView().delete();
   traitViewPanel.remove(innerViewPanel);
   traitViewPanel.remove(button.getComponent());
   traitViewPanel.revalidate();
 }
コード例 #2
0
 public void addButtonSelectedListener(final IBooleanValueChangedListener listener) {
   button.addActionListener(
       new ActionListener() {
         @Override
         public void actionPerformed(ActionEvent e) {
           listener.valueChanged(!button.isSelected());
         }
       });
 }
コード例 #3
0
 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());
 }
コード例 #4
0
 public void setButtonState(boolean selected, boolean enabled) {
   button.setIconSet(properties.createStandardIcon(), properties.createUnselectedIcon());
   button.setEnabled(enabled);
   button.setSelected(selected);
 }