Package jpianotrain.util

Examples of jpianotrain.util.UserConfiguration


    add(wrongKeyChooser, gbc);
  }

  @Override
  public void initData() {
    UserConfiguration uc=UserConfiguration.getInstance();
    showWrongKey.setSelected(uc.getBooleanProperty(SHOW_WRONG_KEY, true));
    showHints.setSelected(uc.getBooleanProperty(SHOW_HINTS, true));
   
    keyWrongColor.setBackground(uc.getColorProperty(COLOR_WRONG_KEY, Constants.COLOR_WRONG_KEY));
    keyHintColor.setBackground(uc.getColorProperty(COLOR_HINTS, Constants.COLOR_HINTS));
    updateEnabledStatus();
  }
View Full Code Here


    updateEnabledStatus();
  }
 
  @Override
  public void saveData() {
    UserConfiguration uc=UserConfiguration.getInstance();
    ApplicationContext ctx=ApplicationContext.getInstance();
   
    log.debug("sending show wrong key status: "+showWrongKey.isSelected());
    ctx.setKeyWrongColor(keyWrongColor.getBackground());
    ctx.setShowWrongKey(showWrongKey.isSelected());
   
    ctx.setKeyHintColor(keyHintColor.getBackground());
    ctx.setShowHints(showHints.isSelected());
   
    uc.putProperty(COLOR_WRONG_KEY, keyWrongColor.getBackground());
    uc.putProperty(COLOR_HINTS, keyHintColor.getBackground());
    uc.putProperty(SHOW_WRONG_KEY, keyWrongColor.isEnabled());
    uc.putProperty(SHOW_HINTS, keyHintColor.isEnabled());
  }
View Full Code Here

TOP

Related Classes of jpianotrain.util.UserConfiguration

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.