<commit_before>package com.itlaborer.apitools.ui;

import org.apache.log4j.Logger;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.program.Program;
import org.eclipse.swt.widgets.Dialog;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Link;
import org.eclipse.swt.widgets.Shell;

import com.itlaborer.apitools.res.Resource;
import com.itlaborer.apitools.swt.SWTResourceManager;
import com.itlaborer.apitools.utils.ApiUtils;

/**
 * 快捷键说明界面
 * 
 * @author liudewei[<EMAIL>]
 * @version 1.0
 * @since 1.0
 */

public class ShortcutKeyExplain extends Dialog {

	private static Logger logger = Logger.getLogger(ShortcutKeyExplain.class.getName());
	protected Object result;
	protected Shell aboutToolsShell;

	public ShortcutKeyExplain(Shell parent, int style) {
		super(parent, style);
		setText("快捷键");
		logger.info("进入快捷键说明");
	}

	public Object open() {
		createContents();
		aboutToolsShell.open();
		aboutToolsShell.layout();
		Display display = getParent().getDisplay();

		while (!aboutToolsShell.isDisposed()) {
			if (!display.readAndDispatch()) {
				display.sleep();
			}
		}
		return result;
	}

	private void createContents() {
		aboutToolsShell = new Shell(getParent(), getStyle());
		aboutToolsShell.setImage(SWTResourceManager.getImage(ShortcutKeyExplain.class, Resource.IMAGE_ICON));
		aboutToolsShell.setSize(400, 391);
		aboutToolsShell.setText(getText());
		ApiUtils.SetCenterinParent(getParent(), aboutToolsShell);

		Link link = new Link(aboutToolsShell, SWT.NONE);
		link.setBounds(143, 336, 108, 17);
		link.setText("<a>www.itlaborer.com</a>");
		link.addSelectionListener(new LinkSelection());

		StyledText readMeTextLabel = new StyledText(aboutToolsShell,
				SWT.BORDER | SWT.READ_ONLY | SWT.WRAP | SWT.V_SCROLL);
		readMeTextLabel.setBounds(3, 33, 389, 297);
		readMeTextLabel.setText("Ctrl+Q：提交请求\r\nCtrl+Enter：提交请求\r\nCtrl+L：清空结果\r\nCtrl+S：临时保存参数");

		Label label_2 = new Label(aboutToolsShell, SWT.NONE);
		label_2.setFont(org.eclipse.wb.swt.SWTResourceManager.getFont("微软雅黑", 9, SWT.BOLD));
		label_2.setText("快捷键说明:");
		label_2.setBounds(3, 12, 136, 17);
	}

	// 打开网站<commit_msg>更新快捷键说明<commit_after>package com.itlaborer.apitools.ui;

import org.apache.log4j.Logger;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.program.Program;
import org.eclipse.swt.widgets.Dialog;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Link;
import org.eclipse.swt.widgets.Shell;

import com.itlaborer.apitools.res.Resource;
import com.itlaborer.apitools.swt.SWTResourceManager;
import com.itlaborer.apitools.utils.ApiUtils;

/**
 * 快捷键说明界面
 * 
 * @author liudewei[<EMAIL>]
 * @version 1.0
 * @since 1.0
 */

public class ShortcutKeyExplain extends Dialog {

	private static Logger logger = Logger.getLogger(ShortcutKeyExplain.class.getName());
	protected Object result;
	protected Shell aboutToolsShell;

	public ShortcutKeyExplain(Shell parent, int style) {
		super(parent, style);
		setText("快捷键");
		logger.info("进入快捷键说明");
	}

	public Object open() {
		createContents();
		aboutToolsShell.open();
		aboutToolsShell.layout();
		Display display = getParent().getDisplay();

		while (!aboutToolsShell.isDisposed()) {
			if (!display.readAndDispatch()) {
				display.sleep();
			}
		}
		return result;
	}

	private void createContents() {
		aboutToolsShell = new Shell(getParent(), getStyle());
		aboutToolsShell.setImage(SWTResourceManager.getImage(ShortcutKeyExplain.class, Resource.IMAGE_ICON));
		aboutToolsShell.setSize(400, 391);
		aboutToolsShell.setText(getText());
		ApiUtils.SetCenterinParent(getParent(), aboutToolsShell);

		Link link = new Link(aboutToolsShell, SWT.NONE);
		link.setBounds(143, 336, 108, 17);
		link.setText("<a>www.itlaborer.com</a>");
		link.addSelectionListener(new LinkSelection());

		StyledText readMeTextLabel = new StyledText(aboutToolsShell,
				SWT.BORDER | SWT.READ_ONLY | SWT.WRAP | SWT.V_SCROLL);
		readMeTextLabel.setBounds(3, 33, 389, 297);
		readMeTextLabel.setText("Ctrl+Q：提交请求\r\nCtrl+Enter：提交请求\r\nCtrl+L：清空结果\r\nCtrl+S：临时保存参数\r\nCtrl+N：打开一个新窗口");

		Label label_2 = new Label(aboutToolsShell, SWT.NONE);
		label_2.setFont(org.eclipse.wb.swt.SWTResourceManager.getFont("微软雅黑", 9, SWT.BOLD));
		label_2.setText("快捷键说明:");
		label_2.setBounds(3, 12, 136, 17);
	}

	// 打开网站
{'fraction_non_alphanumeric': 0.1384217335058215, 'fraction_numerical': 0.018973695558430356, 'mean_word_length': 5.363511659807956, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '131919', 'n_tokens_mistral': 1857, 'n_tokens_neox': 1720, 'n_words': 261}