⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 settingsdialog.java

📁 一个类似QQ的在线通讯聊天软件原码,适合初学者参考学习。
💻 JAVA
字号:
package openicq.gui;import java.awt.BorderLayout;import java.awt.Dimension;import javax.swing.JFrame;import openicq.Start;import org.javalib.dynamic.localize.Localizable;import org.javalib.gui.model.SettingsDialogModel;import org.javalib.gui.model.SettingsDisplayPanel;import org.javalib.util.TitledList;/** * The <code>SettingsDialog</code> class is the basic dialog to change the * settings of this application. * @author Hansgeorg Schwibbe * @copyright 2004 */public class SettingsDialog extends SettingsDialogModel implements Localizable{  protected static TitledList localized = Start.env.getLocalizedList();  protected MainFrame mainFrame;  protected GeneralSettingsPanel generalPanel;  protected LoginSettingsPanel loginPanel;  protected LanguageSettingsPanel languagePanel;  protected SoundSettingsPanel soundPanel;  protected VisibilitySettingsPanel visibilityPanel;  /**   * Initializes a new instance of the class <code>SettingsDialog</code>.   * @param parent the parent frame   */  public SettingsDialog(JFrame parent)  {    super(parent, ((String[]) localized.get("menubar"))[3], false, 0.195);    mainFrame = (MainFrame) parent;    visibilityPanel.loadSettings();    contentPane.add(generalPanel, BorderLayout.CENTER);  }  /**   * (non-Javadoc)   * @see org.javalib.gui.model.SettingsDialogModel#getCloseButtonText()   */  protected String getCloseButtonText()  {    return ((String[]) localized.get("stdButtons"))[3];  }  /**   * (non-Javadoc)   * @see org.javalib.gui.model.SettingsDialogModel#getDisplayPanels()   */  protected SettingsDisplayPanel[] getDisplayPanels()  {    generalPanel = new GeneralSettingsPanel(this);    loginPanel = new LoginSettingsPanel(this);    languagePanel = new LanguageSettingsPanel(this);    soundPanel = new SoundSettingsPanel(this);    visibilityPanel = new VisibilitySettingsPanel();    return new SettingsDisplayPanel[]    {     generalPanel,     loginPanel,     languagePanel,     soundPanel,     visibilityPanel    };  }  /**   * (non-Javadoc)   * @see org.javalib.gui.model.SettingsDialogModel#getSelectedIndex()   */  protected int getSelectedIndex()  {    return 0;  }  /**   * (non-Javadoc)   * @see org.javalib.gui.model.SettingsDialogModel#getDialogSize()   */  protected Dimension getDialogSize()  {    return new Dimension(640, 480);  }  /**   * (non-Javadoc)   * @see org.javalib.dynamic.localize.Localizable#localize()   */  public void localize()  {    synchronized (Start.env)    {      localized = Start.env.getLocalizedList();      this.setTitle(((String[]) localized.get("menubar"))[3]);    }    this.setCloseButtonText(this.getCloseButtonText());    this.setDisplayPanels(this.getDisplayPanels(), 2);  }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -