DecodingProgressModel.java 573 B

1234567891011121314151617181920212223242526
  1. package com.poqop.document.models;
  2. import com.poqop.document.events.DecodingProgressListener;
  3. import com.poqop.document.events.EventDispatcher;
  4. public class DecodingProgressModel extends EventDispatcher
  5. {
  6. private int currentlyDecoding;
  7. public void increase()
  8. {
  9. currentlyDecoding++;
  10. dispatchChanged();
  11. }
  12. private void dispatchChanged()
  13. {
  14. dispatch(new DecodingProgressListener.DecodingProgressEvent(currentlyDecoding));
  15. }
  16. public void decrease()
  17. {
  18. currentlyDecoding--;
  19. dispatchChanged();
  20. }
  21. }