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

📄 optiondialog.java

📁 java+eclipse做的TTPlayer
💻 JAVA
字号:
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package com.hadeslee.yoyoplayer.setting;/** * * @author Administrator */import com.hadeslee.yoyoplayer.util.Config;import java.awt.Component;import java.util.logging.Logger;import javax.swing.JDialog;public class OptionDialog extends JDialog {    private static Logger log = Logger.getLogger(OptionDialog.class.getName());    private ListBar bar;    /** Creates new form OptionDialog */    public OptionDialog(java.awt.Frame parent, boolean modal) {        super(parent, modal);        initComponents();    }    public OptionDialog(java.awt.Dialog parent, boolean modal) {        super(parent, modal);        initComponents();    }    public void setSelected(String name) {        bar.setSelectedComponent(name);    }    public void setVisible(boolean b) {        if (b) {//在其设为可见的时候,更新一下配置            int count = bar.getBarComponentCount();            for (int i = 0; i < count; i++) {                Component com = bar.getBarComponent(i);                if (com instanceof Initable) {                    ((Initable) com).init();                }            }        }        super.setVisible(b);    }    private void initComponents() {        bar = new ListBar();        bar.addComponent(Config.getResource("OptionDialog.about"), new AboutPanel());        bar.addComponent(Config.getResource("OptionDialog.view"), new AudioChartPanel());        bar.addComponent(Config.getResource("OptionDialog.lrc"), new LyricSettingPanel());        bar.addComponent(Config.getResource("OptionDialog.pl"), new PlayListPanel());        bar.addComponent(Config.getResource("OptionDialog.playSetting"), new PlayPanel());        bar.addComponent(Config.getResource("OptionDialog.lyricSearching"), new SearchLyricPanel());        bar.addComponent(Config.getResource("OptionDialog.normalSetting"), new SettingPanel());        bar.addComponent(Config.getResource("OptionDialog.webConnection"), new WebConnectPanel());        bar.setSelectedComponent(Config.getResource("OptionDialog.about"));        this.add(bar);        pack();    }}

⌨️ 快捷键说明

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