owndetailsdialog.java

来自「一个类似QQ的在线通讯聊天软件原码,适合初学者参考学习。」· Java 代码 · 共 106 行

JAVA
106
字号
package openicq.gui;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>OwnDetailsDialog</code> class is the basic dialog to view and * change the own details. * @author Hansgeorg Schwibbe * @copyright 2004 */public class OwnDetailsDialog extends SettingsDialogModel  implements Localizable{  protected static TitledList localized = Start.env.getLocalizedList();  protected OwnDetailsPanel ownDetailsPanel;  /**   * Initializes a new instance of the class <code>OwnDetailsDialog</code>.   * @param parent the parent frame   */  public OwnDetailsDialog(JFrame parent)  {    super(parent, ((String[]) localized.get("menubar"))[2], false, 0.25);  }  /**   * (non-Javadoc)   * @see org.javalib.gui.model.SettingsDialogModel#action_saveSettings()   */  protected void action_saveSettings()  {    super.action_saveSettings();  }  /**   * Sets the focus on the close button.   */  public void focusCloseButton()  {    super.jButtonClose.requestFocus();  }  /**   * (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#getDialogSize()   */  protected Dimension getDialogSize()  {    return new Dimension(420, 290);  }  /**   * (non-Javadoc)   * @see org.javalib.gui.model.SettingsDialogModel#getDisplayPanels()   */  protected SettingsDisplayPanel[] getDisplayPanels()  {    ownDetailsPanel = new OwnDetailsPanel(this);    return new SettingsDisplayPanel[]    { ownDetailsPanel    };  }  /**   * (non-Javadoc)   * @see org.javalib.gui.model.SettingsDialogModel#getSelectedIndex()   */  protected int getSelectedIndex()  {    return 0;  }  /**   * (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"))[2]);    }    this.setCloseButtonText(this.getCloseButtonText());    this.setDisplayPanels(this.getDisplayPanels());  }}

⌨️ 快捷键说明

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