package net.pterodactylus.jkeytool.gui;
+import net.pterodactylus.jkeytool.core.Core;
import net.pterodactylus.jkeytool.core.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();
import java.io.File;
import java.security.KeyStore;
+import net.pterodactylus.jkeytool.core.Core;
import net.pterodactylus.jkeytool.gui.Interface;
/**
*/
public class SwingInterface implements Interface {
+ /** The core to control. */
+ private Core core;
+
//
// 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() {
public static void main(String[] arguments) {
Core core = new Core();
Interface gui = getInterface();
+ gui.setCore(core);
core.addCoreListener(gui);
gui.start();
}