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

📄 systemoptionwindow.java

📁 java写的qq代码实现qq的部分功能
💻 JAVA
字号:
/*
* LumaQQ - Java QQ Client
*
* Copyright (C) 2004 luma <stubma@163.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package edu.tsinghua.lumaqq.ui.config.sys;

import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;

import edu.tsinghua.lumaqq.IconHolder;
import edu.tsinghua.lumaqq.LumaQQ;
import edu.tsinghua.lumaqq.ui.MainShell;
import edu.tsinghua.lumaqq.ui.config.AbstractConfigurationWindow;
import edu.tsinghua.lumaqq.utils.OptionUtil;


/**
 * 系统设置窗口
 * 
 * @author luma
 */
public class SystemOptionWindow extends AbstractConfigurationWindow {
    // 配置页索引常量
	/** GUI配置页 */
	public static final int GUI = 0;
	/** 消息配置页 */
	public static final int MESSAGE = 1;
	/** 回复配置页 */
	public static final int REPLY = 2;
	/** 登录配置页 */
	public static final int LOGIN = 3;
	/** 同步配置页 */
	public static final int SYNC = 4;
	/** 其他配置页 */
	public static final int OTHER = 5;
	
	private MainShell main;

    /**
     * @param parent
     */
    public SystemOptionWindow(MainShell main) {
        super(main.getShell());
        this.main = main;
        setCloseButtonText(LumaQQ.getString("common.button.cancel"));
    }
    
    /* (non-Javadoc)
     * @see edu.tsinghua.lumaqq.shells.AbstractConfigurationWindow#initialPages()
     */
    protected void initialPages() {
        addPage(new GUIPage(getPageContainer(), main));
        addPage(new MessagePage(getPageContainer(), main));
        addPage(new ReplyPage(getPageContainer(), main));
        addPage(new LoginPage(getPageContainer(), main));
        addPage(new SyncPage(getPageContainer()));
        addPage(new OtherPage(getPageContainer(), main));
    }

    /* (non-Javadoc)
     * @see edu.tsinghua.lumaqq.shells.AbstractConfigurationWindow#getTitle()
     */
    protected String getTitle() {
        return LumaQQ.getString("sys.opt.title");
    }

    /* (non-Javadoc)
     * @see edu.tsinghua.lumaqq.shells.AbstractConfigurationWindow#getImage()
     */
    protected Image getImage() {
        return IconHolder.getInstance().getImage(IconHolder.icoSysOpt);
    }
    
    /* (non-Javadoc)
     * @see edu.tsinghua.lumaqq.shells.AbstractConfigurationWindow#configureShellSize()
     */
    protected void configureShellSize() {
        shell.pack();
        Point size = shell.getSize();
        size.x = 600;
        shell.setSize(size);
    }
    
    /* (non-Javadoc)
     * @see edu.tsinghua.lumaqq.shells.AbstractConfigurationWindow#onShellClose()
     */
    protected void onShellClose() {
		main.getShellRegistry().deregisterSystemOptionWindow();
    }
    
    /* (non-Javadoc)
     * @see edu.tsinghua.lumaqq.shells.AbstractConfigurationWindow#onOK()
     */
    protected void onOK() {
        saveAllAndClose();
        OptionUtil.getInstance().save();
    }
}

⌨️ 快捷键说明

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