projects
/
jkeytool.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
3ff8f90
)
Add Interface.setCore(Core) method to set the core that is controlled by the interface.
author
David ‘Bombe’ Roden
<bombe@pterodactylus.net>
Mon, 26 Jan 2009 23:27:32 +0000
(
00:27
+0100)
committer
David ‘Bombe’ Roden
<bombe@pterodactylus.net>
Mon, 26 Jan 2009 23:27:32 +0000
(
00:27
+0100)
src/net/pterodactylus/jkeytool/gui/Interface.java
patch
|
blob
|
history
src/net/pterodactylus/jkeytool/gui/swing/SwingInterface.java
patch
|
blob
|
history
src/net/pterodactylus/jkeytool/main/Main.java
patch
|
blob
|
history
diff --git
a/src/net/pterodactylus/jkeytool/gui/Interface.java
b/src/net/pterodactylus/jkeytool/gui/Interface.java
index
7b278ce
..
44b0a65
100644
(file)
--- a/
src/net/pterodactylus/jkeytool/gui/Interface.java
+++ b/
src/net/pterodactylus/jkeytool/gui/Interface.java
@@
-19,6
+19,7
@@
package net.pterodactylus.jkeytool.gui;
package net.pterodactylus.jkeytool.gui;
+import net.pterodactylus.jkeytool.core.Core;
import net.pterodactylus.jkeytool.core.CoreListener;
/**
import net.pterodactylus.jkeytool.core.CoreListener;
/**
@@
-29,6
+30,14
@@
import net.pterodactylus.jkeytool.core.CoreListener;
public interface Interface extends CoreListener {
/**
public interface Interface extends CoreListener {
/**
+ * Sets the core to control.
+ *
+ * @param core
+ * The core to control
+ */
+ public void setCore(Core core);
+
+ /**
* Starts the interface, usually by making it visible.
*/
public void start();
* Starts the interface, usually by making it visible.
*/
public void start();
diff --git
a/src/net/pterodactylus/jkeytool/gui/swing/SwingInterface.java
b/src/net/pterodactylus/jkeytool/gui/swing/SwingInterface.java
index
388846d
..
4d287d9
100644
(file)
--- a/
src/net/pterodactylus/jkeytool/gui/swing/SwingInterface.java
+++ b/
src/net/pterodactylus/jkeytool/gui/swing/SwingInterface.java
@@
-22,6
+22,7
@@
package net.pterodactylus.jkeytool.gui.swing;
import java.io.File;
import java.security.KeyStore;
import java.io.File;
import java.security.KeyStore;
+import net.pterodactylus.jkeytool.core.Core;
import net.pterodactylus.jkeytool.gui.Interface;
/**
import net.pterodactylus.jkeytool.gui.Interface;
/**
@@
-31,11
+32,24
@@
import net.pterodactylus.jkeytool.gui.Interface;
*/
public class SwingInterface implements Interface {
*/
public class SwingInterface implements Interface {
+ /** The core to control. */
+ private Core core;
+
//
// INTERFACE Interface
//
/**
//
// INTERFACE Interface
//
/**
+ * Sets the core to control.
+ *
+ * @param core
+ * The core to control
+ */
+ public void setCore(Core core) {
+ this.core = core;
+ }
+
+ /**
* {@inheritDoc}
*/
public void start() {
* {@inheritDoc}
*/
public void start() {
diff --git
a/src/net/pterodactylus/jkeytool/main/Main.java
b/src/net/pterodactylus/jkeytool/main/Main.java
index
9f4b477
..
26a9496
100644
(file)
--- a/
src/net/pterodactylus/jkeytool/main/Main.java
+++ b/
src/net/pterodactylus/jkeytool/main/Main.java
@@
-56,6
+56,7
@@
public class Main {
public static void main(String[] arguments) {
Core core = new Core();
Interface gui = getInterface();
public static void main(String[] arguments) {
Core core = new Core();
Interface gui = getInterface();
+ gui.setCore(core);
core.addCoreListener(gui);
gui.start();
}
core.addCoreListener(gui);
gui.start();
}