3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-02-15 11:45:51 +00:00

WalletTemplate: rename Controller to MainController

This commit is contained in:
Mike Hearn 2014-08-06 13:53:42 +02:00
parent 96e4774e79
commit 7338d530a1
4 changed files with 7 additions and 7 deletions

View File

@ -34,7 +34,7 @@ public class Main extends Application {
private StackPane uiStack; private StackPane uiStack;
private Pane mainUI; private Pane mainUI;
public Controller controller; public MainController controller;
@Override @Override
public void start(Stage mainWindow) throws Exception { public void start(Stage mainWindow) throws Exception {
@ -48,7 +48,7 @@ public class Main extends Application {
// AquaFx.style(); // AquaFx.style();
} }
// Load the GUI. The Controller class will be automagically created and wired up. // Load the GUI. The MainController class will be automagically created and wired up.
URL location = getClass().getResource("main.fxml"); URL location = getClass().getResource("main.fxml");
FXMLLoader loader = new FXMLLoader(location); FXMLLoader loader = new FXMLLoader(location);
mainUI = loader.load(); mainUI = loader.load();

View File

@ -23,7 +23,7 @@ import static wallettemplate.Main.bitcoin;
* Gets created auto-magically by FXMLLoader via reflection. The widget fields are set to the GUI controls they're named * Gets created auto-magically by FXMLLoader via reflection. The widget fields are set to the GUI controls they're named
* after. This class handles all the updates and event handling for the main UI. * after. This class handles all the updates and event handling for the main UI.
*/ */
public class Controller { public class MainController {
public ProgressBar syncProgress; public ProgressBar syncProgress;
public VBox syncBox; public VBox syncBox;
public HBox controlsBox; public HBox controlsBox;
@ -67,7 +67,7 @@ public class Controller {
@Override @Override
protected void doneDownload() { protected void doneDownload() {
super.doneDownload(); super.doneDownload();
Platform.runLater(Controller.this::readyToGoAnimation); Platform.runLater(MainController.this::readyToGoAnimation);
} }
} }

View File

@ -11,7 +11,7 @@ import javafx.scene.layout.Pane;
import javafx.stage.Modality; import javafx.stage.Modality;
import javafx.stage.Stage; import javafx.stage.Stage;
import javafx.util.Duration; import javafx.util.Duration;
import wallettemplate.Controller; import wallettemplate.MainController;
import java.io.IOException; import java.io.IOException;
import java.net.URL; import java.net.URL;
@ -161,7 +161,7 @@ public class GuiUtils {
if (false) if (false)
return unchecked(() -> new URL("file:///your/path/here/src/main/wallettemplate/" + name)); return unchecked(() -> new URL("file:///your/path/here/src/main/wallettemplate/" + name));
else else
return Controller.class.getResource(name); return MainController.class.getResource(name);
} }
public static void checkGuiThread() { public static void checkGuiThread() {

View File

@ -15,7 +15,7 @@
<?import wallettemplate.controls.*?> <?import wallettemplate.controls.*?>
<?import wallettemplate.controls.ClickableBitcoinAddress ?> <?import wallettemplate.controls.ClickableBitcoinAddress ?>
<AnchorPane styleClass="root-pane" maxHeight="Infinity" maxWidth="Infinity" minHeight="200.0" minWidth="300.0" prefHeight="400.0" prefWidth="800.0" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/2.2" fx:controller="wallettemplate.Controller"> <AnchorPane styleClass="root-pane" maxHeight="Infinity" maxWidth="Infinity" minHeight="200.0" minWidth="300.0" prefHeight="400.0" prefWidth="800.0" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/2.2" fx:controller="wallettemplate.MainController">
<children> <children>
<Label layoutX="14.0" layoutY="14.0" text="Balance"> <Label layoutX="14.0" layoutY="14.0" text="Balance">
<font> <font>