Fixed the status log panel bug
The issue was the name of the panel not in capital lattervoting-station-gui
parent
dab9ca1ed1
commit
8ac466e73a
|
@ -5,6 +5,8 @@ import javafx.event.EventHandler;
|
|||
import javafx.scene.Parent;
|
||||
import java.util.HashMap;
|
||||
|
||||
// TODO: add logging to the process
|
||||
|
||||
/**
|
||||
* Created by Vladimir Eliezer Tokarev on 12/06/2016.
|
||||
* EventHandlerMap maps events ids (that are part of polling station dashboard)
|
||||
|
@ -27,6 +29,12 @@ public class EventHandlerMap {
|
|||
|
||||
public void Handle(Event event)
|
||||
{
|
||||
this.eventIdToHandler.get(((Parent)event.getSource()).getId()).handle(event);
|
||||
try {
|
||||
this.eventIdToHandler.get(((Parent) event.getSource()).getId()).handle(event);
|
||||
}
|
||||
catch (RuntimeException e) {
|
||||
System.out.println("The event map doesn't have this kind of event handler : " + e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ public class EventHandlerMapper {
|
|||
StatusLogVisualUpdater statusLogVisualUpdater =
|
||||
new StatusLogVisualUpdater(statusLogLoader.GetStatusLogInstance(), primaryStage);
|
||||
map.Add("StatusLogButton", statusLogVisualUpdater);
|
||||
map.Add("statusLog", statusLogVisualUpdater);
|
||||
map.Add("StatusLog", statusLogVisualUpdater);
|
||||
|
||||
// map add voter to search button triggered
|
||||
SearchHandler searchHandler = new SearchHandler(primaryStage, new DummyVotersFetcher());
|
||||
|
|
|
@ -45,18 +45,18 @@ public class StatusLogVisualUpdater implements EventHandler {
|
|||
}
|
||||
|
||||
private void addStatusLog() {
|
||||
Pane statusLog = (Pane) currentStage.getScene().lookup("#statusLog");
|
||||
Pane statusLog = (Pane) currentStage.getScene().lookup("#StatusLog");
|
||||
statusLog.getChildren().add(this.statusLog);
|
||||
}
|
||||
|
||||
private void removeStatusLog(){
|
||||
Pane statusLog = (Pane) currentStage.getScene().lookup("#statusLog");
|
||||
Pane statusLog = (Pane) currentStage.getScene().lookup("#StatusLog");
|
||||
statusLog.getChildren().remove(this.statusLog);
|
||||
}
|
||||
|
||||
private void SetStatusLogSize(int expansionWidth) {
|
||||
currentStage.setWidth(currentStage.getWidth() + expansionWidth);
|
||||
Pane statusLog = (Pane) currentStage.getScene().lookup("#statusLog");
|
||||
Pane statusLog = (Pane) currentStage.getScene().lookup("#StatusLog");
|
||||
statusLog.setPrefWidth(expansionWidth);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue