projects
/
jSite2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
enhance javadoc
[jSite2.git]
/
src
/
net
/
pterodactylus
/
jsite
/
gui
/
SwingInterface.java
diff --git
a/src/net/pterodactylus/jsite/gui/SwingInterface.java
b/src/net/pterodactylus/jsite/gui/SwingInterface.java
index
02142a9
..
79b799d
100644
(file)
--- a/
src/net/pterodactylus/jsite/gui/SwingInterface.java
+++ b/
src/net/pterodactylus/jsite/gui/SwingInterface.java
@@
-39,7
+39,7
@@
import net.pterodactylus.jsite.i18n.gui.I18nAction;
import net.pterodactylus.util.io.Closer;
/**
import net.pterodactylus.util.io.Closer;
/**
- * T
ODO
+ * T
he Swing user interface.
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
* @version $Id$
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
* @version $Id$
@@
-48,9
+48,9
@@
public class SwingInterface implements CoreListener {
/** The application core. */
private final Core core;
/** The application core. */
private final Core core;
-
+
/** The configuration directory. */
/** The configuration directory. */
- private String configDirectory;
+ private
final
String configDirectory;
/** The main window. */
private MainWindow mainWindow;
/** The main window. */
private MainWindow mainWindow;
@@
-106,10
+106,13
@@
public class SwingInterface implements CoreListener {
*
* @param core
* The core to operate on
*
* @param core
* The core to operate on
+ * @param configDirectory
+ * The directory the configuration is stored in
*/
*/
- public SwingInterface(Core core) {
+ public SwingInterface(Core core
, String configDirectory
) {
this.core = core;
this.core = core;
- I18n.setLocale(Locale.ENGLISH); /* TODO - load config */
+ this.configDirectory = configDirectory;
+ I18n.setLocale(Locale.ENGLISH);
loadConfig();
if (beautify) {
System.setProperty("swing.aatext", "true");
loadConfig();
if (beautify) {
System.setProperty("swing.aatext", "true");
@@
-223,16
+226,6
@@
public class SwingInterface implements CoreListener {
return addProjectAction;
}
return addProjectAction;
}
- /**
- * Sets the configuration directory.
- *
- * @param configDirectory
- * The directory the configuration is stored in
- */
- public void setConfigDirectory(String configDirectory) {
- this.configDirectory = configDirectory;
- }
-
//
// ACTIONS
//
//
// ACTIONS
//
@@
-259,6
+252,7
@@
public class SwingInterface implements CoreListener {
/* initialize default stuff. */
beautify = false;
/* now read config. */
/* initialize default stuff. */
beautify = false;
/* now read config. */
+ System.out.println("configDirectory: “" + configDirectory + "”");
File configFile = new File(configDirectory, "swing-interface.properties");
if (!configFile.exists() || !configFile.canRead() || !configFile.isFile()) {
System.err.println("could not find “" + configFile.getAbsolutePath() + "”!");
File configFile = new File(configDirectory, "swing-interface.properties");
if (!configFile.exists() || !configFile.canRead() || !configFile.isFile()) {
System.err.println("could not find “" + configFile.getAbsolutePath() + "”!");