📄 exploreroptions.java
字号:
/** * File and FTP Explorer * Copyright 2002 * BOESCH Vincent * * 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 javaexplorer.gui.dialog;import java.awt.*;import java.awt.event.*;import javaexplorer.Launcher;import javaexplorer.util.options.*;import javaexplorer.util.registry.*;import javax.swing.*;import javax.swing.border.*;/** *@author BOESCH Vincent *@created 21 janvier 2002 *@version 3.3 * * 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. * */public class ExplorerOptions extends JDialog implements ActionListener { private Launcher _launcher = null; private GridLayout gridLayout1 = new GridLayout(); private GridLayout gridLayout2 = new GridLayout(); private GridLayout gridLayout3 = new GridLayout(); private JPanel jPanel1 = new JPanel(); private JPanel jpanelCopy = new JPanel(); private JTabbedPane jTabbedPane1 = new JTabbedPane(); private JButton jbtCancel = new JButton(); private JButton jbtOk = new JButton(); private JCheckBox jchkStartMaximized = new JCheckBox(); private JCheckBox jchkShowHtmlAsText = new JCheckBox(); private JCheckBox jchkShowImagesOnly = new JCheckBox(); private JCheckBox jchkShowImagesPreview = new JCheckBox(); private JCheckBox jchkUseDragAndDrop = new JCheckBox(); private JCheckBox jchkUseDebugMode = new JCheckBox(); private JCheckBox jchkUseMagicNumberForLocalFiles = new JCheckBox(); private JCheckBox jchkUseResume = new JCheckBox(); private JLabel jlbCutsForCopy = new JLabel(); private JLabel jlbCopyHistory = new JLabel(); private JLabel jlbCopyRunning = new JLabel(); private JLabel jlbCopyMinimumSize = new JLabel(); private JLabel jlbCopyBufferSize = new JLabel(); private JLabel jlbMaxSizeBeforeConfirm = new JLabel(); private JLabel jlbUseDragAndDrop = new JLabel(); private JLabel jlbUseDebugMode = new JLabel(); private JLabel jlbUseResume = new JLabel(); private JLabel jlblDefaultFtpPoolSize = new JLabel(); private JLabel jlblSetJpegCompression = new JLabel(); private JLabel jlblSetZoomFactor = new JLabel(); private JLabel jlblStartMaximized = new JLabel(); private JLabel jlblShowHtmlAsText = new JLabel(); private JLabel jlblShowImagesAsIcones = new JLabel(); private JLabel jlblShowImagesOnly = new JLabel(); private JLabel jlblShowImagesPreview = new JLabel(); private JSlider jsldSetJpegCompression = new JSlider(); private JTextField jtfDefaultFtpPoolSize = new JTextField(); private JTextField jtfMaxSizeBeforeConfirm = new JTextField(); private JTextField jtfCutsForCopy = new JTextField(); private JTextField jtfCopyHistory = new JTextField(); private JTextField jtfCopyRunning = new JTextField(); private JTextField jtfCopyMinimumSize = new JTextField(); private JTextField jtfCopyBufferSize = new JTextField(); private JTextField jtfSetZoomFactor = new JTextField(); private JPanel panel = new JPanel(); private JFrame _parent = null; RegistryPanel rv = null; HttpPanel hp = null; private TitledBorder titledBorder1; /** * Constructeur objet ExplorerOptions * *@param frame Description of the * Parameter *@param launcher Description of the * Parameter */ public ExplorerOptions(JFrame frame, Launcher launcher) { super(frame, true); _parent = frame; _launcher = launcher; rv = new RegistryPanel(_launcher); hp = new HttpPanel(_launcher); try { jbInit(); } catch (Exception e) { javaexplorer.util.Log.addError(e); } } /** * Description de la methode * *@param e Description of the Parameter */ public void actionPerformed(ActionEvent e) { Object obj = e.getSource(); if (obj == jbtOk) { ok(); } else if (obj == jbtCancel) { cancel(); } } /** * Description de la methode */ public void cancel() { endWindow(); } /** * Description de la methode */ public void endWindow() { try { setVisible(false); dispose(); } catch (Exception e) { javaexplorer.util.Log.addError(e); } } /** * Description de la methode */ public void initValues() { //Init de la registry rv.initRegistry(); jchkStartMaximized.setSelected(Options.getOptions().getStartMaximized()); jchkShowHtmlAsText.setSelected(Options.getOptions().getShowHTMLAsText()); jchkUseMagicNumberForLocalFiles.setSelected(Options.getOptions() .getUseMagicNumberForLocalFilesOnly()); jchkShowImagesOnly.setSelected(Options.getOptions().getShowImagesOnly()); jchkShowImagesPreview.setSelected(Options.getOptions() .getShowImagesPreview()); jtfSetZoomFactor.setText("" + Options.getOptions().getZoomFactor()); jsldSetJpegCompression.setValue(Options.getOptions().getJpegQuality()); jtfDefaultFtpPoolSize.setText("" + Options.getOptions().getDefaultFtpPoolSize()); jtfMaxSizeBeforeConfirm.setText("" + Options.getOptions().getMaxSizeBeforeConfirm()); jtfCopyBufferSize.setText("" + Options.getOptions().getCopyBufferSize()); jtfCopyMinimumSize.setText("" + Options.getOptions().getCopyMinimumSize()); jtfCopyHistory.setText("" + Options.getOptions().getCopyHistory()); jtfCopyRunning.setText("" + Options.getOptions().getCopyRunning()); jtfCutsForCopy.setText("" + Options.getOptions().getCutsForCopy()); jchkUseResume.setSelected(Options.getOptions().getUseResume()); jchkUseDragAndDrop.setSelected(Options.getOptions().getUseDragAndDrop()); jchkUseDebugMode.setSelected(Options.getOptions().getUseDebugMode()); } /** * Description de la methode * *@throws Exception Description of the * Exception */ private void jbInit() throws Exception { setTitle("Options"); Font defaultFont = new java.awt.Font("Dialog", 1, 10); getContentPane().setLayout(new BorderLayout()); titledBorder1 = new TitledBorder(""); jsldSetJpegCompression.setOpaque(false); panel.setLayout(gridLayout1); panel.setBorder(BorderFactory.createLineBorder(Color.black)); jpanelCopy.setLayout(gridLayout3); jpanelCopy.setBorder(BorderFactory.createLineBorder(Color.black)); jtfSetZoomFactor.setToolTipText(""); jlblShowImagesAsIcones.setFont(defaultFont); jlblShowImagesAsIcones.setText("Magic Number only on local files"); jchkStartMaximized.setOpaque(false); jlblStartMaximized.setFont(defaultFont); jlblStartMaximized.setText("Start Maximized"); jchkShowHtmlAsText.setOpaque(false); jlblShowHtmlAsText.setFont(defaultFont); jlblShowHtmlAsText.setText("Show HTML As Text"); jlblShowImagesOnly.setFont(defaultFont); jlblShowImagesOnly.setText("Filter Images Only"); gridLayout1.setRows(10); gridLayout1.setColumns(2); gridLayout1.setHgap(3); gridLayout3.setRows(7); gridLayout3.setColumns(2); gridLayout3.setHgap(4); gridLayout2.setRows(6); gridLayout2.setColumns(2); gridLayout2.setHgap(10); jlblShowImagesPreview.setFont(defaultFont);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -