Working Component Management
This commit is contained in:
@ -1,11 +1,14 @@
|
||||
package fabrik.simulator.pic16f84;
|
||||
|
||||
import fabrik.simulator.pic16f84.interfaces.*;
|
||||
import javafx.application.Application;
|
||||
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.scene.Node;
|
||||
import javafx.scene.Parent;
|
||||
import javafx.scene.Scene;
|
||||
|
||||
import javafx.scene.control.Tab;
|
||||
import javafx.scene.layout.GridPane;
|
||||
import javafx.scene.layout.VBox;
|
||||
import javafx.stage.Stage;
|
||||
@ -14,18 +17,30 @@ import java.io.IOException;
|
||||
import java.util.Objects;
|
||||
|
||||
public class CreateWindow extends Application {
|
||||
|
||||
private static VBox table;
|
||||
private PICComponents picComponents = new PICComponents(); // Subjekt
|
||||
public static GridPane grid = new GridPane();
|
||||
private static VBox table;
|
||||
|
||||
@Override
|
||||
public void start(Stage primaryStage) throws IOException {
|
||||
|
||||
//DataRegister.initDataRegister();
|
||||
//table = Table.refresh();
|
||||
FXMLLoader codewindow = new FXMLLoader(CreateWindow.class.getResource("frontend.fxml"));
|
||||
Parent code = codewindow.load();
|
||||
picComponents.registerComponent(CommandInterface.class, new Commands());
|
||||
picComponents.registerComponent(ToggleButtonInterface.class, new ToggleButtonGroupExt());
|
||||
picComponents.registerComponent(FrontendControllerInterface.class, new Controller_Frontend());
|
||||
picComponents.registerComponent(DataRegisterInterface.class, new DataRegister());
|
||||
picComponents.registerComponent(EEPROMInterface.class, new EEPROM());
|
||||
picComponents.registerComponent(InterruptInterface.class, new Interrupts());
|
||||
picComponents.registerComponent(IOPortInterface.class, new IOPorts());
|
||||
picComponents.registerComponent(PreScalerInterface.class, new PreScaler());
|
||||
picComponents.registerComponent(ProgramStackInterface.class, new ProgramStack());
|
||||
picComponents.registerComponent(TimerInterface.class, new Timer());
|
||||
picComponents.registerComponent(WatchdogTimerInterface.class, new WatchdogTimer());
|
||||
picComponents.initAll();
|
||||
|
||||
FXMLLoader codewindow = new FXMLLoader(CreateWindow.class.getResource("frontend.fxml"));
|
||||
codewindow.setController(picComponents.getComponent(FrontendControllerInterface.class));
|
||||
Parent code = codewindow.load();
|
||||
table = Table.init(picComponents);
|
||||
grid.add(table, 1, 1);
|
||||
grid.add(code, 0, 1);
|
||||
|
||||
@ -44,7 +59,7 @@ public class CreateWindow extends Application {
|
||||
|
||||
public static void refreshTable() {
|
||||
grid.getChildren().remove(table);
|
||||
//table= Table.refresh();
|
||||
table= Table.refresh();
|
||||
grid.add(table, 1, 1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user