Package org.jampa.gui.actions

Examples of org.jampa.gui.actions.ChangePlaymodeAction


  private void changePlayMode(Action action) {
    if (action == _normalPlayModeAction) {
      if (_normalPlayModeAction.isChecked()) {
        _repeatPlayModeAction.setChecked(false);
        _randomPlayModeAction.setChecked(false);
        new ChangePlaymodeAction(0).run();       
      } else {
        _repeatPlayModeAction.setChecked(true);
        _randomPlayModeAction.setChecked(false);
        new ChangePlaymodeAction(1).run();       
      }
    } else if (action == _repeatPlayModeAction) {
      if (_repeatPlayModeAction.isChecked()) {
        _normalPlayModeAction.setChecked(false);
        _randomPlayModeAction.setChecked(false);
        new ChangePlaymodeAction(1).run();       
      } else {
        _normalPlayModeAction.setChecked(false);
        _randomPlayModeAction.setChecked(true);
        new ChangePlaymodeAction(2).run();       
      }
    } else if (action == _randomPlayModeAction) {
      if (_randomPlayModeAction.isChecked()) {
        _normalPlayModeAction.setChecked(false);
        _repeatPlayModeAction.setChecked(false);
        new ChangePlaymodeAction(2).run();       
      } else {
        _normalPlayModeAction.setChecked(true);
        _repeatPlayModeAction.setChecked(false);
        new ChangePlaymodeAction(0).run();       
      }
    }   
  }
View Full Code Here


  private void setPlaymodeUI() {
    switch (Controller.getInstance().getPreferenceStore().getInt(PreferenceConstants.PLAY_MODE)) {
      case 0 : _normalPlayModeAction.setChecked(true); _repeatPlayModeAction.setChecked(false); _randomPlayModeAction.setChecked(false); break;
      case 1 : _normalPlayModeAction.setChecked(false); _repeatPlayModeAction.setChecked(true); _randomPlayModeAction.setChecked(false); break;
      case 2 : _normalPlayModeAction.setChecked(false); _repeatPlayModeAction.setChecked(false); _randomPlayModeAction.setChecked(true); break;
      default : _normalPlayModeAction.setChecked(true); _repeatPlayModeAction.setChecked(false); _randomPlayModeAction.setChecked(false); new ChangePlaymodeAction(0).run();
    }
  }
View Full Code Here

  private void setPlaymodeUI() {
    switch (Controller.getInstance().getPreferenceStore().getInt(PreferenceConstants.PLAY_MODE)) {
      case 0 : normalPlayModeAction.setChecked(true); repeatPlayModeAction.setChecked(false); randomPlayModeAction.setChecked(false); break;
      case 1 : normalPlayModeAction.setChecked(false); repeatPlayModeAction.setChecked(true); randomPlayModeAction.setChecked(false); break;
      case 2 : normalPlayModeAction.setChecked(false); repeatPlayModeAction.setChecked(false); randomPlayModeAction.setChecked(true); break;
      default : normalPlayModeAction.setChecked(true); repeatPlayModeAction.setChecked(false); randomPlayModeAction.setChecked(false); new ChangePlaymodeAction(0).run();
    }
  }
View Full Code Here

  private void changePlayMode(IAction action) {
    if (action == normalPlayModeAction) {
      if (normalPlayModeAction.isChecked()) {
        repeatPlayModeAction.setChecked(false);
        randomPlayModeAction.setChecked(false);
        new ChangePlaymodeAction(0).run();
      } else {
        repeatPlayModeAction.setChecked(true);
        randomPlayModeAction.setChecked(false);
        new ChangePlaymodeAction(1).run();       
      }
    } else if (action == repeatPlayModeAction) {
      if (repeatPlayModeAction.isChecked()) {
        normalPlayModeAction.setChecked(false);
        randomPlayModeAction.setChecked(false);
        new ChangePlaymodeAction(1).run();       
      } else {
        normalPlayModeAction.setChecked(false);
        randomPlayModeAction.setChecked(true);
        new ChangePlaymodeAction(2).run();   
      }
    } else if (action == randomPlayModeAction) {
      if (randomPlayModeAction.isChecked()) {
        normalPlayModeAction.setChecked(false);
        repeatPlayModeAction.setChecked(false);
        new ChangePlaymodeAction(2).run();       
      } else {
        normalPlayModeAction.setChecked(true);
        repeatPlayModeAction.setChecked(false);
        new ChangePlaymodeAction(0).run();       
      }
    }   
  }
View Full Code Here

TOP

Related Classes of org.jampa.gui.actions.ChangePlaymodeAction

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.