|
|
@ -79,8 +79,6 @@ public class MonitorDesktopTask implements Runnable { |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
loadMonitors(); |
|
|
|
|
|
|
|
while (!start.get()) { |
|
|
|
try { |
|
|
|
Thread.sleep(100); |
|
|
@ -89,6 +87,8 @@ public class MonitorDesktopTask implements Runnable { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
loadMonitors(); |
|
|
|
|
|
|
|
startListening(); |
|
|
|
|
|
|
|
while (this.running.get() && this.plebe.getRunning().get()) { |
|
|
@ -129,13 +129,7 @@ public class MonitorDesktopTask implements Runnable { |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
private void startListening() { |
|
|
|
double w = stage.getWidth() - 50; |
|
|
|
double h = stage.getHeight() - 70; |
|
|
|
|
|
|
|
while(controller.choiceBox.getItems().isEmpty()){ |
|
|
|
while (controller.choiceBox.getSelectionModel().getSelectedItem() == null){ |
|
|
|
try { |
|
|
|
Thread.sleep(20); |
|
|
|
} catch (InterruptedException e) { |
|
|
@ -143,6 +137,12 @@ public class MonitorDesktopTask implements Runnable { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
private void startListening() { |
|
|
|
double w = stage.getWidth() - 50; |
|
|
|
double h = stage.getHeight() - 70; |
|
|
|
|
|
|
|
request = plebe.startDesktop(new MonitorDesktopWrapper(w, h, controller.isCompressed(), 0)); |
|
|
|
|
|
|
|
ObservableList<Object> observableList = request.getObservableReceivedObjs(); |
|
|
@ -191,9 +191,13 @@ public class MonitorDesktopTask implements Runnable { |
|
|
|
} |
|
|
|
|
|
|
|
public void refreshSettings() { |
|
|
|
int index = controller.choiceBox.getSelectionModel().getSelectedIndex(); |
|
|
|
if (index<0){ |
|
|
|
return; |
|
|
|
} |
|
|
|
double w = stage.getWidth() - 50; |
|
|
|
double h = stage.getHeight() - 70; |
|
|
|
this.plebe.refreshDesktop(new MonitorDesktopWrapper(w, h, controller.isCompressed(), controller.choiceBox.getSelectionModel().getSelectedIndex())); |
|
|
|
this.plebe.refreshDesktop(new MonitorDesktopWrapper(w, h, controller.isCompressed(), index)); |
|
|
|
} |
|
|
|
|
|
|
|
public AtomicBoolean getRunning() { |
|
|
|