-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathJavaIndexer.java
More file actions
55 lines (47 loc) · 1.21 KB
/
JavaIndexer.java
File metadata and controls
55 lines (47 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package com.JavaIndexer;
import com.JavaIndexer.gui.JavaIndexerGUI;
/**
* The JavaIndexer main file.
*
* @author Nicole Pernischova
*
* This file is a modification of the jgaap's main file by Mike Ryan
*
*/
public class JavaIndexer {
public static boolean commandline = false;
public static final boolean DEBUG = true;
/**
* Launches the JavaIndexer GUI.
*/
private static void createAndShowGUI() {
// Note that the GUI object is stored in the globalObjects HashMap
// under the key "gui" so other objects can access it easily
JavaIndexerConstants.globalObjects.put("gui", (new JavaIndexerGUI()));
}
/**
* Initializes predefined global parameters.
*/
public static void initParameters() {
JavaIndexerConstants.globalParams.setParameter("Language", "English");
}
/**
* launches either the CLI or the GUI based on the command line arguments
*
* @param args
* the command line arguments
*/
public static void main(String[] args) {
initParameters();
if (args.length == 0) {
javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() {
createAndShowGUI();
}
});
} else {
// do nothing
// not using command line
}
}
}