ViewerState.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. *+------------------------------------------------------------------------+
  3. *| Licensed Materials - Property of IBM
  4. *| IBM Cognos Products: Viewer
  5. *| (C) Copyright IBM Corp. 2013
  6. *|
  7. *| US Government Users Restricted Rights - Use, duplication or
  8. *| disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  9. *|
  10. *+------------------------------------------------------------------------+
  11. */
  12. function ViewerState() {
  13. this.findState = null;
  14. this.pageState = null;
  15. }
  16. ViewerState.prototype.setFindState = function(state) {
  17. if (typeof ViewerFindState != "function") {
  18. return;
  19. }
  20. if (!this.findState) {
  21. this.findState = new ViewerFindState();
  22. }
  23. this.findState.setState(state);
  24. };
  25. ViewerState.prototype.clearFindState = function() {
  26. this.findState = null;
  27. };
  28. ViewerState.prototype.getFindState = function() {
  29. return this.findState;
  30. };
  31. ViewerState.prototype.setPageState = function(state) {
  32. if (typeof ViewerPageState != "function") {
  33. return;
  34. }
  35. if (!this.pageState) {
  36. this.pageState = new ViewerPageState();
  37. }
  38. this.pageState.setState(state);
  39. };
  40. ViewerState.prototype.clearPageState = function() {
  41. this.pageState = null;
  42. };
  43. ViewerState.prototype.getPageState = function() {
  44. return this.pageState;
  45. };