📄 lyricsettingpanel.java
字号:
/* * LyricSettingPanel.java * * Created on 2007年12月25日, 下午7:11 */package com.hadeslee.yoyoplayer.setting;import com.hadeslee.yoyoplayer.lyric.LyricPanel;import com.hadeslee.yoyoplayer.util.Config;import com.hadeslee.yoyoplayer.util.FontChooser;import com.hadeslee.yoyoplayer.util.Util;import com.sun.jna.examples.WindowUtils;import java.awt.Color;import java.awt.Font;import java.util.logging.Level;import java.util.logging.Logger;import javax.swing.JColorChooser;import javax.swing.JDialog;import javax.swing.JOptionPane;/** * * @author hadeslee */public class LyricSettingPanel extends javax.swing.JPanel implements Initable { private static Logger log = Logger.getLogger(LyricSettingPanel.class.getName()); private Color foregroundColor, backgroundColor, hilightColor; private Font font; public static final int width = 15; public static final int height = 15; /** Creates new form LyricSettingPanel */ public LyricSettingPanel() { initComponents(); init(); } /** This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel3 = new javax.swing.JPanel(); jPanel1 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); scrollMode = new javax.swing.JComboBox(); jLabel2 = new javax.swing.JLabel(); alignMode = new javax.swing.JComboBox(); jLabel3 = new javax.swing.JLabel(); hSpace = new javax.swing.JSpinner(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); vSpace = new javax.swing.JSpinner(); jLabel6 = new javax.swing.JLabel(); lyricShadow = new javax.swing.JCheckBox(); karaoke = new javax.swing.JCheckBox(); trans = new javax.swing.JCheckBox(); borderTrans = new javax.swing.JCheckBox(); jLabel7 = new javax.swing.JLabel(); foreground = new javax.swing.JButton(); hilight = new javax.swing.JButton(); background = new javax.swing.JButton(); jLabel8 = new javax.swing.JLabel(); jButton4 = new javax.swing.JButton(); jPanel2 = new javax.swing.JPanel(); autoLoadLyric = new javax.swing.JCheckBox(); cutBlankChars = new javax.swing.JCheckBox(); autoHide = new javax.swing.JCheckBox(); autoResize = new javax.swing.JCheckBox(); resizeV = new javax.swing.JCheckBox(); mouseDragEnable = new javax.swing.JCheckBox(); anti = new javax.swing.JCheckBox(); scrollAdjust = new javax.swing.JCheckBox(); jLabel9 = new javax.swing.JLabel(); refreshInterval = new javax.swing.JSpinner(); jLabel10 = new javax.swing.JLabel(); topShow = new javax.swing.JCheckBox(); jPanel4 = new javax.swing.JPanel(); jButton9 = new javax.swing.JButton(); jButton10 = new javax.swing.JButton(); javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup( jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 100, Short.MAX_VALUE) ); jPanel3Layout.setVerticalGroup( jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 100, Short.MAX_VALUE) ); setDoubleBuffered(false); jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(Config.getResource("LyricSettingPanel.view"))); // NOI18N jLabel1.setText(Config.getResource("LyricSettingPanel.scrollMode")); // NOI18N scrollMode.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "水平模式", "垂直模式" })); jLabel2.setText(Config.getResource("LyricSettingPanel.alignMode")); // NOI18N alignMode.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "左对齐", "中间对齐", "右对齐" })); jLabel3.setText(Config.getResource("LyricSettingPanel.HDistance")); // NOI18N jLabel4.setText(Config.getResource("LyricSettingPanel.pix")); // NOI18N jLabel5.setText(Config.getResource("LyricSettingPanel.VDistance")); // NOI18N jLabel6.setText(Config.getResource("LyricSettingPanel.pix")); // NOI18N lyricShadow.setText(Config.getResource("LyricSettingPanel.shadowLyric")); // NOI18N karaoke.setText(Config.getResource("LyricSettingPanel.karaoke")); // NOI18N trans.setText(Config.getResource("LyricSettingPanel.transBG")); // NOI18N trans.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { transActionPerformed(evt); } }); borderTrans.setText(Config.getResource("LyricSettingPanel.borderTrans")); // NOI18N jLabel7.setText(Config.getResource("LyricSettingPanel.color")); // NOI18N foreground.setText(Config.getResource("LyricSettingPanel.normal")); // NOI18N foreground.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { foregroundActionPerformed(evt); } }); hilight.setText(Config.getResource("LyricSettingPanel.hilight")); // NOI18N hilight.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { hilightActionPerformed(evt); } }); background.setText(Config.getResource("LyricSettingPanel.bg")); // NOI18N background.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { backgroundActionPerformed(evt); } }); jLabel8.setText(Config.getResource("LyricSettingPanel.font")); // NOI18N jButton4.setText(Config.getResource("LyricSettingPanel.changeFont")); // NOI18N jButton4.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton4ActionPerformed(evt); } }); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(scrollMode, 0, 136, Short.MAX_VALUE)) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jLabel3) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(hSpace, javax.swing.GroupLayout.DEFAULT_SIZE, 98, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jLabel4) .addGap(4, 4, 4))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 6, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(lyricShadow) .addGap(103, 103, 103))) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(trans) .addGap(79, 79, 79))) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(borderTrans) .addComponent(karaoke) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jLabel2) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(alignMode, javax.swing.GroupLayout.PREFERRED_SIZE, 118, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jLabel5) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(vSpace, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel6))))
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -