MCPcopy Index your code
hub / github.com/10cks/fofaEX / searchButton

Method searchButton

src/main/java/Main.java:1182–1726  ·  view source on GitHub ↗
(String buttonText, boolean shouldSetSize, JPanel panel, JTextField textField, JTextField emailField, JTextField keyField, JTextField urlField, JPanel resultPanel, JPanel exportPanel, JLabel changeIcon, JPanel disablePanel2, JPanel disablePanel3, JPanel disablePanel7, JPanel totalPanel8, String pageButton)

Source from the content-addressed store, hash-verified

1180 }
1181
1182 private static void searchButton(String buttonText, boolean shouldSetSize, JPanel panel, JTextField textField, JTextField emailField, JTextField keyField, JTextField urlField, JPanel resultPanel, JPanel exportPanel, JLabel changeIcon, JPanel disablePanel2, JPanel disablePanel3, JPanel disablePanel7, JPanel totalPanel8, String pageButton) {
1183
1184 JButton button = new JButton(buttonText);
1185 button.setFocusPainted(false);
1186 button.setFocusable(false);
1187
1188 if (shouldSetSize) {
1189 button.setPreferredSize(new Dimension(60, 50));
1190 }
1191 button.addActionListener(new ActionListener() {
1192
1193 @Override
1194 public void actionPerformed(ActionEvent actionEvent) {
1195
1196 String domain = urlField.getText().trim();
1197 String email = emailField.getText().trim();
1198 String key = keyField.getText().trim();
1199 String grammar = textField.getText().trim();
1200
1201 String orginIconStr = changeIcon.getText();
1202
1203// String searchAsciiIcon = " ____ _ _ \n" +
1204// " / ___| ___ __ _ _ __ ___ | |__ (_) _ __ __ _ \n" +
1205// " \\___ \\ / _ \\ / _` | | '__| / __| | '_ \\ | | | '_ \\ / _` | \n" +
1206// " ___) | | __/ | (_| | | | | (__ | | | | | | | | | | | (_| | \n" +
1207// " |____/ \\___| \\__,_| |_| \\___| |_| |_| |_| |_| |_| \\__, | \n" ;
1208//
1209//
1210// changeIcon.setText("<html><pre>" + searchAsciiIcon + "</pre></html>");
1211 changeIcon.setText(" FOFA EX");
1212 changeIcon.setForeground(new Color(89, 154, 248)); // 设置文本颜色为红色
1213 Font font = new Font("Times New Roman", Font.BOLD, 60);
1214 changeIcon.setFont(font);
1215
1216 setComponentsEnabled(disablePanel2, false);
1217 setComponentsEnabled(disablePanel3, false);
1218 setComponentsEnabled(disablePanel7, false);
1219
1220
1221 // 创建 SwingWorker 来处理搜索任务
1222 SwingWorker<SearchResults, Void> worker = new SwingWorker<SearchResults, Void>() {
1223
1224 private void fontSet(JLabel changeIcon, String originIconStr) {
1225 changeIcon.setText(originIconStr);
1226 changeIcon.setForeground(new Color(48, 49, 52));
1227 }
1228
1229 @Override
1230 protected SearchResults doInBackground() throws Exception {
1231
1232 SearchResults results = new SearchResults();
1233 QueryResponse queryResponse = new QueryResponse();
1234 String errorMessage = null; // 用于存储错误消息
1235 errorMessage = queryResponse.errmsg; // 存储错误消息以便后面使用
1236 String fieldsTotal = "";
1237
1238 long startTime = System.nanoTime();
1239 try {

Callers 1

mainMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected