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