Package javax.swing

Examples of javax.swing.DefaultButtonModel


  public void setToggleMode(final boolean value) {
    if (getToggleMode() != value) {
      if (value) {
        setModel(new JToggleButton.ToggleButtonModel());
      } else {
        setModel(new DefaultButtonModel());
      }
      updateUI();
    }
  }
View Full Code Here


  }

 
  public IAdapter getParent() {
    JMenu jb = (JMenu) getWidget();
    DefaultButtonModel dbm = (DefaultButtonModel) jb.getModel();
    ButtonGroup bg = dbm.getGroup();
    if (bg != null) {
      for (InvisibleAdapter invisible : getRootAdapter().getInvisibles()) {
        if (invisible instanceof ButtonGroupAdapter) {
          if (bg == ((ButtonGroupAdapter) invisible).getButtonGroup())
            return invisible;
View Full Code Here

  }

 
  public void deleteNotify() {
    JMenu jb = (JMenu) getWidget();
    DefaultButtonModel dbm = (DefaultButtonModel) jb.getModel();
    ButtonGroup bg = dbm.getGroup();
    if (bg != null) {
      bg.remove(jb);
    }
  }
View Full Code Here

  }

  @Override
  public IAdapter getParent() {
    JButton jb = (JButton) getWidget();
    DefaultButtonModel dbm = (DefaultButtonModel) jb.getModel();
    ButtonGroup bg = dbm.getGroup();
   
    if (bg != null) {
      for (InvisibleAdapter invisible : getRootAdapter().getInvisibles()) {
        if (invisible instanceof ButtonGroupAdapter) {
          if (bg == ((ButtonGroupAdapter) invisible).getButtonGroup())
View Full Code Here

  }

  @Override
  public void deleteNotify() {
    JButton jb = (JButton) getWidget();
    DefaultButtonModel dbm = (DefaultButtonModel) jb.getModel();
    ButtonGroup bg = dbm.getGroup();
    if (bg != null) {
      bg.remove(jb);
    }
  }
View Full Code Here

    return super.getParent();
  }
  @Override
  public void deleteNotify() {
    JRadioButton jb = (JRadioButton) getWidget();
    DefaultButtonModel dbm = (DefaultButtonModel) jb.getModel();
    ButtonGroup bg = dbm.getGroup();
    if(bg!=null){
      bg.remove(jb);
    }
  }
View Full Code Here

    return super.getParent();
  }
  @Override
  public void deleteNotify() {
    JToggleButton jb = (JToggleButton) getWidget();
    DefaultButtonModel dbm = (DefaultButtonModel) jb.getModel();
    ButtonGroup bg = dbm.getGroup();
    if(bg!=null){
      bg.remove(jb);
    }
  }   
View Full Code Here

    return super.getParent();
  }
  @Override
  public void deleteNotify() {
    JCheckBox jb = (JCheckBox) getWidget();
    DefaultButtonModel dbm = (DefaultButtonModel) jb.getModel();
    ButtonGroup bg = dbm.getGroup();
    if(bg!=null){
      bg.remove(jb);
    }
  } 
View Full Code Here

    return JRadioButtonMenuItem.class;
  }
  @Override
  public IAdapter getParent() {
    JRadioButtonMenuItem jb = (JRadioButtonMenuItem) getWidget();   
    DefaultButtonModel dbm = (DefaultButtonModel) jb.getModel();
    ButtonGroup bg = dbm.getGroup();
    if (bg != null) {
      for (InvisibleAdapter invisible : getRootAdapter().getInvisibles()) {
        if (invisible instanceof ButtonGroupAdapter) {
          if (bg == ((ButtonGroupAdapter) invisible).getButtonGroup())
            return invisible;
View Full Code Here

    return super.getParent();
  }
  @Override
  public void deleteNotify() {
    JRadioButtonMenuItem jb = (JRadioButtonMenuItem) getWidget();
    DefaultButtonModel dbm = (DefaultButtonModel) jb.getModel();
    ButtonGroup bg = dbm.getGroup();
    if(bg!=null){
      bg.remove(jb);
    }
  } 
View Full Code Here

TOP

Related Classes of javax.swing.DefaultButtonModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.