Implemented lodge appeal loader and controller
parent
eda570c863
commit
43af4b016d
|
@ -1,7 +1,16 @@
|
||||||
package polling_station_dashboard.search.submitVoter.lodgeAppeal;
|
package polling_station_dashboard.search.submitVoter.lodgeAppeal;
|
||||||
|
|
||||||
|
import javafx.stage.Stage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by dasha on 7/2/2016.
|
* Created by dasha on 7/2/2016.
|
||||||
|
* Contros the behavior od the lodge appeal panel
|
||||||
*/
|
*/
|
||||||
public class LodgeAppealController {
|
public class LodgeAppealController {
|
||||||
|
private Stage currentStage;
|
||||||
|
|
||||||
|
public void SetStage(Stage primaryStage)
|
||||||
|
{
|
||||||
|
this.currentStage = primaryStage;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,33 @@
|
||||||
package polling_station_dashboard.search.submitVoter.lodgeAppeal;
|
package polling_station_dashboard.search.submitVoter.lodgeAppeal;
|
||||||
|
|
||||||
|
import javafx.fxml.FXMLLoader;
|
||||||
|
import javafx.scene.layout.GridPane;
|
||||||
|
import javafx.stage.Stage;
|
||||||
|
import polling_station_dashboard.settings.settingsController;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by dasha on 7/2/2016.
|
* Created by dasha on 7/2/2016.
|
||||||
|
* Loads the lodge appeal fxml file
|
||||||
*/
|
*/
|
||||||
public class LodgeAppealLoader {
|
public class LodgeAppealLoader {
|
||||||
|
private static final String LODGE_APPEAL_PATH = "/view/dashboard/lodge_appeal.fxml";
|
||||||
|
|
||||||
|
private Stage currentStage;
|
||||||
|
private FXMLLoader fxmlLoader;
|
||||||
|
|
||||||
|
public LodgeAppealLoader(Stage primaryStage) throws IOException
|
||||||
|
{
|
||||||
|
currentStage = primaryStage;
|
||||||
|
fxmlLoader = new FXMLLoader(getClass().getResource(LODGE_APPEAL_PATH));
|
||||||
|
}
|
||||||
|
|
||||||
|
public GridPane GetSettingsInstance() throws IOException {
|
||||||
|
GridPane settings = fxmlLoader.load();
|
||||||
|
LodgeAppealController controller = fxmlLoader.getController();
|
||||||
|
controller.SetStage(currentStage);
|
||||||
|
|
||||||
|
return settings;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue