WorkerValidParam.java 956 B

12345678910111213141516171819202122232425262728293031323334353637
  1. package com.persagy.filemove.dto;
  2. import com.persagy.filemove.app.SagaFileMoveApp;
  3. import javafx.beans.property.SimpleDoubleProperty;
  4. public class WorkerValidParam extends Thread {
  5. private SagaFileMoveApp app;
  6. private SimpleDoubleProperty doubleProperty = new SimpleDoubleProperty(-1);
  7. public WorkerValidParam(SagaFileMoveApp app) {
  8. this.app = app;
  9. }
  10. public double getDoubleProperty() {
  11. return doubleProperty.get();
  12. }
  13. public SimpleDoubleProperty doublePropertyProperty() {
  14. return doubleProperty;
  15. }
  16. public void setDoubleProperty(double doubleProperty) {
  17. this.doubleProperty.set(doubleProperty);
  18. }
  19. @Override
  20. public void run() {
  21. while("".equals(app.getTips())) {
  22. try {
  23. Thread.sleep(500);
  24. } catch (InterruptedException e) {
  25. e.printStackTrace();
  26. }
  27. }
  28. setDoubleProperty(1.0);
  29. }
  30. }