PaperSourceSetting.java 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. package epson.print.screen;
  2. import android.os.Parcel;
  3. import android.os.Parcelable;
  4. public class PaperSourceSetting implements Parcelable {
  5. public static final Parcelable.Creator<PaperSourceSetting> CREATOR = new Parcelable.Creator<PaperSourceSetting>() {
  6. public PaperSourceSetting createFromParcel(Parcel parcel) {
  7. return new PaperSourceSetting(parcel);
  8. }
  9. public PaperSourceSetting[] newArray(int i) {
  10. return new PaperSourceSetting[i];
  11. }
  12. };
  13. public boolean bSupportESCPR;
  14. public int paperSizeId;
  15. public int paperSource;
  16. public int paperTypeId;
  17. public int describeContents() {
  18. return 0;
  19. }
  20. public PaperSourceSetting() {
  21. this.bSupportESCPR = true;
  22. }
  23. private PaperSourceSetting(Parcel parcel) {
  24. this.bSupportESCPR = true;
  25. this.paperSource = parcel.readInt();
  26. this.paperSizeId = parcel.readInt();
  27. this.paperTypeId = parcel.readInt();
  28. this.bSupportESCPR = ((Boolean) parcel.readValue(Boolean.class.getClassLoader())).booleanValue();
  29. }
  30. public void writeToParcel(Parcel parcel, int i) {
  31. parcel.writeInt(this.paperSource);
  32. parcel.writeInt(this.paperSizeId);
  33. parcel.writeInt(this.paperTypeId);
  34. parcel.writeValue(Boolean.valueOf(this.bSupportESCPR));
  35. }
  36. public boolean equals(PaperSourceSetting paperSourceSetting) {
  37. if (this.paperSizeId == paperSourceSetting.paperSizeId && this.paperTypeId == paperSourceSetting.paperTypeId && this.paperSource == paperSourceSetting.paperSource) {
  38. return true;
  39. }
  40. return false;
  41. }
  42. }