コード例 #1
0
 /*
  * Writes the preferences to the disk.
  */
 private void writePreferences() {
   prefs.setFullscreen(fullscreen.isSelected());
   prefs.setBitrate(bitrate.getValue());
   prefs.setResolution((Resolution) resolution.getSelectedItem());
   prefs.setUseOpenGlRenderer(openGlRenderer.isSelected());
   prefs.setLocalAudio(localAudio.isSelected());
   PreferencesManager.writePreferences(prefs);
 }
コード例 #2
0
 /**
  * Construcs a new frame and loads the saved preferences. <br>
  * The frame is not made visible until a call to <br>
  * build()</br> is made.
  */
 public PreferencesFrame() {
   super("Preferences");
   this.setSize(350, 250);
   this.setResizable(false);
   prefs = PreferencesManager.getPreferences();
 }