亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? migratorframe.java

?? Java開發最新的日志記錄工具slf4j的源碼
?? JAVA
字號:
/*  * Copyright (c) 2004-2008 QOS.ch * All rights reserved. *  * Permission is hereby granted, free  of charge, to any person obtaining * a  copy  of this  software  and  associated  documentation files  (the * "Software"), to  deal in  the Software without  restriction, including * without limitation  the rights to  use, copy, modify,  merge, publish, * distribute,  sublicense, and/or sell  copies of  the Software,  and to * permit persons to whom the Software  is furnished to do so, subject to * the following conditions: *  * The  above  copyright  notice  and  this permission  notice  shall  be * included in all copies or substantial portions of the Software. *  * THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND, * EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF * MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION * OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */package org.slf4j.migrator.internal;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import java.io.File;import java.util.ArrayList;import java.util.List;import javax.swing.ButtonGroup;import javax.swing.JButton;import javax.swing.JCheckBox;import javax.swing.JFileChooser;import javax.swing.JFrame;import javax.swing.JLabel;import javax.swing.JOptionPane;import javax.swing.JProgressBar;import javax.swing.JRadioButton;import javax.swing.JTextField;import javax.swing.SpringLayout;import javax.swing.WindowConstants;import org.slf4j.migrator.Constant;import org.slf4j.migrator.helper.SpringLayoutHelper;/** * This code was edited or generated using CloudGarden's Jigloo SWT/Swing GUI * Builder, which is free for non-commercial use. If Jigloo is being used * commercially (ie, by a corporation, company or business for any purpose * whatever) then you should purchase a license for each developer using Jigloo. * Please visit www.cloudgarden.com for details. Use of Jigloo implies * acceptance of these licensing terms. A COMMERCIAL LICENSE HAS NOT BEEN * PURCHASED FOR THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED LEGALLY FOR * ANY CORPORATE OR COMMERCIAL PURPOSE. */public class MigratorFrame extends JFrame implements ActionListener {  private static final long serialVersionUID = 1L;  private static final int BASIC_PADDING = 10;  private static final int FOLDER_COLUMNS = 40;  private static final String MIGRATE_COMMAND = "MIGRATE_COMMAND";  private static final String BROWSE_COMMAND = "BROWSE_COMMAND";  static final String EXIT_COMMAND = "EXIT_COMMAND";  static final int X_SIZE = 700;  static final int Y_SIZE = 400;  private SpringLayout layoutManager = new SpringLayout();  private SpringLayoutHelper slh = new SpringLayoutHelper(layoutManager,      BASIC_PADDING);  private JLabel migrationLabel;  private JRadioButton radioLog4j;  private JRadioButton radioJCL;  private JRadioButton radioJUL;  private ButtonGroup buttonGroup;  private JTextField folderTextField;  private JLabel warningLabel;  JButton migrateButton;  private JButton browseButton;  private JLabel folderLabel;  private JCheckBox awareCheckBox;  private JLabel awareLabel;  JLabel otherLabel;  JProgressBar progressBar;  private JFileChooser fileChooser;  public MigratorFrame() {    super();    initGUI();  }  private void initGUI() {    try {      setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);      getContentPane().setLayout(layoutManager);      this.setTitle("SLF4J migrator");      createComponents();      constrainAll();      addAllComponentsToContextPane();      pack();      this.setSize(700, 400);    } catch (Exception e) {      e.printStackTrace();    }  }  private void createComponents() {    createMigrationLabel();    createRadioJCL();    createRadioLog4j();    createRadioJUL();    createButtonGroup();    createFolderLabel();    createFolderTextField();    createBrowseButton();    createMigrateButton();    createAwareCheckbox();    createAwareLabel();    createWarningLabel();    createFileChooser();    otherLabel = new JLabel();    otherLabel.setText("");    createProgressBar();  }  /**   *    */  private void constrainAll() {    // contrain migration label    layoutManager.putConstraint(SpringLayout.WEST, migrationLabel,        BASIC_PADDING, SpringLayout.EAST, this);    layoutManager.putConstraint(SpringLayout.NORTH, migrationLabel,        BASIC_PADDING, SpringLayout.NORTH, this);    slh.placeToTheRight(migrationLabel, radioJCL, BASIC_PADDING,        -BASIC_PADDING / 2);    slh.placeBelow(radioJCL, radioLog4j, 0, 0);   slh.placeBelow(radioLog4j, radioJUL, 0, 0);                slh.placeBelow(migrationLabel, folderLabel, 0, BASIC_PADDING * 6);    slh.placeToTheRight(folderLabel, folderTextField);    slh.placeToTheRight(folderTextField, browseButton, BASIC_PADDING,        -BASIC_PADDING / 2);    slh.placeBelow(folderLabel, warningLabel, 0, BASIC_PADDING * 3);    slh.placeBelow(warningLabel, awareCheckBox, 0, (int) (BASIC_PADDING * 1.5));    slh.placeToTheRight(awareCheckBox, awareLabel);    slh.placeBelow(awareCheckBox, migrateButton, 0, BASIC_PADDING * 3);    slh.placeBelow(migrateButton, otherLabel, 0, BASIC_PADDING * 2);    slh.placeBelow(otherLabel, progressBar, 0, BASIC_PADDING);  }  private void addAllComponentsToContextPane() {    getContentPane().add(migrationLabel);    getContentPane().add(radioJCL);    getContentPane().add(radioLog4j);    getContentPane().add(radioJUL);        getContentPane().add(folderLabel);    getContentPane().add(folderTextField);    getContentPane().add(browseButton);    getContentPane().add(migrateButton);    getContentPane().add(awareCheckBox);    getContentPane().add(awareLabel);    getContentPane().add(warningLabel);    getContentPane().add(otherLabel);    getContentPane().add(progressBar);  }  private void createButtonGroup() {    buttonGroup = new ButtonGroup();    buttonGroup.add(radioJCL);    buttonGroup.add(radioLog4j);    buttonGroup.add(radioJUL);  }  private void createMigrationLabel() {    migrationLabel = new JLabel();    migrationLabel.setText("Migration Type");  }  private void createRadioJCL() {    radioJCL = new JRadioButton();    radioJCL.setText("from Jakarta Commons Logging to SLF4J");    radioJCL        .setToolTipText("Select this button if you wish to migrate a Java project using Jakarta Commons Logging to use SLF4J.");  }  private void createRadioLog4j() {    radioLog4j = new JRadioButton();    radioLog4j.setText("from log4j to SLF4J ");    radioLog4j        .setToolTipText("Select this button if you wish to migrate a Java project using log4j to use SLF4J.");  }  private void createRadioJUL() {	    radioJUL = new JRadioButton();	    radioJUL.setText("from JUL to SLF4J ");	    radioJUL	        .setToolTipText("Select this button if you wish to migrate a Java project using java.utl.logging (JUL) to use SLF4J.");	  }  private void createFolderLabel() {    folderLabel = new JLabel();    folderLabel.setText("Project Directory");  }  private void createFolderTextField() {    folderTextField = new JTextField();    folderTextField.setColumns(FOLDER_COLUMNS);  }  private void createBrowseButton() {    browseButton = new JButton();    browseButton.setText("Browse");    browseButton.addActionListener(this);    browseButton.setActionCommand(BROWSE_COMMAND);    browseButton        .setToolTipText("Click this button to browse the file systems on your computer.");  }  private void createAwareCheckbox() {    awareCheckBox = new JCheckBox();    awareCheckBox        .setToolTipText("<html><p>Check this box of you understand that the migration tool<p>will <b>not</b> backup your Java source files.</html>");  }  private void createAwareLabel() {    awareLabel = new JLabel();    awareLabel        .setText("<html>"            + "<p>I am aware that this tool will directly modify all Java source files</p>"            + "<p>in the selected folder without creating backup files.</p>"            + "</html>");  }  private void createWarningLabel() {    warningLabel = new JLabel();    warningLabel        .setText("<html>"            + "<p><span color=\"red\">WARNING:</span> This SLF4J migration tool will directly modify all Java source files</p>"            + "<p>in the selected project folder without creating a backup of the original files.</p>"            + "</html>");  }  private void createMigrateButton() {    migrateButton = new JButton();    migrateButton.setText("Migrate Project to SLF4J");    migrateButton        .setToolTipText("Click this button to initiate migration of your project.");    migrateButton.addActionListener(this);    migrateButton.setActionCommand(MIGRATE_COMMAND);  }  private void createFileChooser() {    fileChooser = new JFileChooser();    fileChooser.setDialogTitle("Source folder selector");    fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);  }  private void createProgressBar() {    progressBar = new JProgressBar(0, 1);    progressBar        .setPreferredSize(new java.awt.Dimension((int) (X_SIZE * 0.8), 5));    progressBar.setVisible(false);  }  public void disableInput() {    radioJCL.setEnabled(false);    radioLog4j.setEnabled(false);    browseButton.setEnabled(false);    folderTextField.setEnabled(false);    awareCheckBox.setEnabled(false);    migrateButton.setText("Migration in progress");    migrateButton.setEnabled(false);  }  public void actionPerformed(ActionEvent e) {    if (MIGRATE_COMMAND.equals(e.getActionCommand())) {      List<String> errorList = doSanityAnalysis();      if (errorList.size() > 0) {        showDialogBox(errorList);      } else {        File projectFolder = new File(folderTextField.getText());        int conversionType;        if(radioJCL.isSelected()) {          conversionType = Constant.JCL_TO_SLF4J;        } else if (radioLog4j.isSelected()) {          conversionType = Constant.LOG4J_TO_SLF4J;        } else if (radioJUL.isSelected()) {              conversionType = Constant.JUL_TO_SLF4J;        } else {          // we cannot possibly reach here          throw new IllegalStateException("One of JCL or log4j project must have been previously chosen.");        }        ConversionTask task = new ConversionTask(projectFolder, this,            conversionType);        task.launch();      }    } else if (BROWSE_COMMAND.equals(e.getActionCommand())) {      showFileChooser();    } else if (EXIT_COMMAND.equals(e.getActionCommand())) {      this.dispose();    }  }  void showFileChooser() {    int returnVal = fileChooser.showOpenDialog(this);    if (returnVal == JFileChooser.APPROVE_OPTION) {      File selectedFile = fileChooser.getSelectedFile();      folderTextField.setText(selectedFile.getAbsolutePath());    }  }  List<String> doSanityAnalysis() {    List<String> errorList = new ArrayList<String>();    if (!radioJCL.isSelected() && !radioLog4j.isSelected() && !radioJUL.isSelected()) {      errorList          .add("Please select the migration type: JCL, log4j, or JUL to SLF4J.");    }    String folder = folderTextField.getText();    if (folder == null || folder.length() == 0) {      errorList.add("Please select the folder of the project to migrate");    } else if (!isDirectory(folder)) {      errorList.add("[" + folder + "] does not look like a valid folder");    }    if (!awareCheckBox.isSelected()) {      errorList          .add("Cannot initiate migration unless you acknowledge<p>that files will be modified without creating backup files");    }    return errorList;  }  void showDialogBox(List<String> errorList) {    StringBuffer buf = new StringBuffer();    buf.append("<html>");    int i = 1;    for (String msg : errorList) {      buf.append("<p>");      buf.append(i);      buf.append(". ");      buf.append(msg);      buf.append("</p>");      i++;    }    buf.append("</html>");    JOptionPane.showMessageDialog(this, buf.toString(), "",        JOptionPane.ERROR_MESSAGE);  }  boolean isDirectory(String filename) {    if (filename == null) {      return false;    }    File file = new File(filename);    if (file.exists() && file.isDirectory()) {      return true;    } else {      return false;    }  }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩成人一区二区| 成人免费看的视频| 麻豆成人免费电影| 色综合天天视频在线观看| 精品盗摄一区二区三区| 亚洲主播在线播放| 国产91综合网| 欧美精品一区二区久久久| 亚洲18色成人| 色猫猫国产区一区二在线视频| 精品日韩在线观看| 天天av天天翘天天综合网色鬼国产 | 久久亚洲影视婷婷| 午夜一区二区三区视频| 99精品欧美一区| 久久久精品免费网站| 久久99精品久久久久久国产越南| 91成人在线精品| 亚洲日本韩国一区| 国产一区二区三区电影在线观看| 欧美一区二区三区免费大片 | 蜜臀av一区二区在线观看| 欧美综合欧美视频| 综合激情网...| 美女国产一区二区| 亚洲欧美国产毛片在线| 欧美96一区二区免费视频| 在线日韩一区二区| 一区二区三区在线播放| 一道本成人在线| 亚洲精品免费在线播放| 91视频观看视频| 亚洲免费av网站| 色综合久久综合网欧美综合网| 国产精品免费丝袜| 不卡的电影网站| 国产精品午夜免费| 成人动漫一区二区在线| 久久久国产一区二区三区四区小说 | 日本一不卡视频| 欧美福利电影网| 免费成人在线观看| 久久在线免费观看| 国产成人精品www牛牛影视| 国产日韩欧美高清| www.一区二区| 亚洲蜜臀av乱码久久精品| 欧美亚洲动漫精品| 免费观看在线综合| 国产亚洲va综合人人澡精品| 东方aⅴ免费观看久久av| 国产精品久线在线观看| 在线欧美日韩国产| 肉肉av福利一精品导航| 精品久久人人做人人爽| 九九九久久久精品| 亚洲欧美日韩综合aⅴ视频| 懂色av噜噜一区二区三区av| 国产精品三级视频| 色婷婷激情综合| 亚洲成人av电影在线| 欧美精品一区二区三区蜜臀| 成人自拍视频在线| 亚洲综合成人在线视频| 欧美一区二区三区的| 国产一区999| 一区二区在线免费| 欧美大片一区二区三区| 成人黄色小视频| 亚洲国产精品久久久男人的天堂| 日韩欧美中文字幕制服| 成人av在线网站| 日韩国产在线一| 欧美激情中文不卡| 欧美日高清视频| 国产成a人无v码亚洲福利| 成人av网站在线观看免费| 精品美女被调教视频大全网站| 成人午夜视频免费看| 亚洲综合免费观看高清在线观看| 欧美一区二区三区四区视频| 成人高清在线视频| 免费成人av在线| 亚洲日本一区二区三区| 日韩欧美一区二区视频| 91麻豆成人久久精品二区三区| 美女网站视频久久| 亚洲欧美色一区| 国产欧美精品国产国产专区 | 另类欧美日韩国产在线| 亚洲免费在线视频| 久久久精品黄色| 6080国产精品一区二区| 97超碰欧美中文字幕| 久草热8精品视频在线观看| 亚洲最色的网站| 国产精品私人影院| 日韩精品一区二区三区三区免费| 在线中文字幕不卡| 精品嫩草影院久久| 欧美日韩视频第一区| 成人亚洲一区二区一| 极品少妇xxxx精品少妇偷拍| 午夜久久久影院| 亚洲一区二区精品视频| 亚洲日本成人在线观看| 国产精品国产三级国产普通话蜜臀| 日韩欧美在线不卡| 91精品国产乱码| 在线不卡中文字幕| 99综合影院在线| 99久久精品国产精品久久| 岛国av在线一区| 国产成人综合亚洲网站| 黄一区二区三区| 国产伦理精品不卡| 国产精品一区三区| 国产一区二区三区久久久| 国产精品亚洲人在线观看| 国产一区美女在线| 激情综合网av| 国产精品自拍一区| 欧美视频一区二| eeuss鲁片一区二区三区| 国产成人午夜视频| 国产成人精品影院| 99re视频这里只有精品| 95精品视频在线| 欧美在线视频你懂得| 欧美日韩午夜在线视频| 在线视频一区二区三| 欧美丝袜第三区| 91精品婷婷国产综合久久竹菊| 欧美浪妇xxxx高跟鞋交| 欧美精品成人一区二区三区四区| 制服丝袜亚洲精品中文字幕| 欧美精品一区二区蜜臀亚洲| 欧美国产日韩在线观看| 亚洲精品日韩综合观看成人91| 亚洲自拍偷拍九九九| 蜜臀av一区二区在线观看 | 欧美日韩国产另类不卡| 日韩欧美一卡二卡| 国产欧美精品一区aⅴ影院 | 裸体一区二区三区| 国产一区二区三区| 91啪在线观看| 日韩一级在线观看| 国产精品午夜春色av| 亚洲黄色在线视频| 蜜桃免费网站一区二区三区| 激情偷乱视频一区二区三区| 色综合中文字幕国产 | 亚洲国产日韩a在线播放性色| 五月婷婷激情综合| 国产精品123| 欧美视频在线观看一区| www国产精品av| 亚洲国产日韩在线一区模特 | 一本久久综合亚洲鲁鲁五月天| 欧美精品乱码久久久久久按摩| 精品国产一区二区三区忘忧草| 国产精品久久久久久久久晋中| 午夜久久久久久电影| 福利电影一区二区| 91麻豆精品国产91久久久久久 | 精品噜噜噜噜久久久久久久久试看 | 蜜臀av亚洲一区中文字幕| www.亚洲在线| 精品国产乱码久久久久久牛牛| 亚洲蜜臀av乱码久久精品 | 欧美在线视频不卡| 国产精品亲子伦对白| 肉色丝袜一区二区| 欧美影视一区在线| 国产欧美中文在线| 六月丁香婷婷久久| 欧美色国产精品| 国产精品高潮久久久久无| 国产一区二区三区蝌蚪| 欧美一区二区三区四区视频| 亚洲男人电影天堂| 大桥未久av一区二区三区中文| 欧美mv和日韩mv国产网站| 五月天国产精品| 欧美午夜电影在线播放| 亚洲欧美日韩国产综合在线| 国产永久精品大片wwwapp | 国产伦精品一区二区三区在线观看 | 国产一区欧美日韩| 欧美成人一区二区三区片免费| 亚洲一区电影777| 色妞www精品视频| 自拍偷拍国产亚洲| 99久久精品一区二区| 国产精品水嫩水嫩| 丁香婷婷综合色啪| 欧美国产一区视频在线观看| 粉嫩aⅴ一区二区三区四区 | 国产一区二区三区久久久|