init(thousandsDelimeter, decimalDelimeter, unitType, selectionOnly) {
      this.measurementSystem_.setSystem(
          thousandsDelimeter, decimalDelimeter, unitType);
      this.selectionOnly_.updateValue(selectionOnly);

      // Initialize ticket with user's previous values.
      if (this.appState_.hasField(
              print_preview.AppStateField.IS_COLOR_ENABLED)) {
        this.color_.updateValue(
            /** @type {!Object} */ (this.appState_.getField(
                print_preview.AppStateField.IS_COLOR_ENABLED)));
      }
      if (this.appState_.hasField(print_preview.AppStateField.DPI)) {
        this.dpi_.updateValue(
            /** @type {!Object} */ (
                this.appState_.getField(print_preview.AppStateField.DPI)));
      }
      if (this.appState_.hasField(
              print_preview.AppStateField.IS_DUPLEX_ENABLED)) {
        this.duplex_.updateValue(
            /** @type {!Object} */ (this.appState_.getField(
                print_preview.AppStateField.IS_DUPLEX_ENABLED)));
      }
      if (this.appState_.hasField(print_preview.AppStateField.MEDIA_SIZE)) {
        this.mediaSize_.updateValue(
            /** @type {!Object} */ (this.appState_.getField(
                print_preview.AppStateField.MEDIA_SIZE)));
      }
      if (this.appState_.hasField(
              print_preview.AppStateField.IS_LANDSCAPE_ENABLED)) {
        this.landscape_.updateValue(
            /** @type {!Object} */ (this.appState_.getField(
                print_preview.AppStateField.IS_LANDSCAPE_ENABLED)));
      }
      // Initialize margins after landscape because landscape may reset margins.
      if (this.appState_.hasField(print_preview.AppStateField.MARGINS_TYPE)) {
        this.marginsType_.updateValue(
            /** @type {!Object} */ (this.appState_.getField(
                print_preview.AppStateField.MARGINS_TYPE)));
      }
      if (this.appState_.hasField(print_preview.AppStateField.CUSTOM_MARGINS)) {
        this.customMargins_.updateValue(
            /** @type {!Object} */ (this.appState_.getField(
                print_preview.AppStateField.CUSTOM_MARGINS)));
      }
      if (this.appState_.hasField(
              print_preview.AppStateField.IS_HEADER_FOOTER_ENABLED)) {
        this.headerFooter_.updateValue(
            /** @type {!Object} */ (this.appState_.getField(
                print_preview.AppStateField.IS_HEADER_FOOTER_ENABLED)));
      }
      if (this.appState_.hasField(
              print_preview.AppStateField.IS_COLLATE_ENABLED)) {
        this.collate_.updateValue(
            /** @type {!Object} */ (this.appState_.getField(
                print_preview.AppStateField.IS_COLLATE_ENABLED)));
      }
      if (this.appState_.hasField(
              print_preview.AppStateField.IS_FIT_TO_PAGE_ENABLED)) {
        this.fitToPage_.updateValue(
            /** @type {!Object} */ (this.appState_.getField(
                print_preview.AppStateField.IS_FIT_TO_PAGE_ENABLED)));
      }
      if (this.appState_.hasField(print_preview.AppStateField.SCALING)) {
        this.scaling_.updateValue(
            /** @type {!Object} */ (
                this.appState_.getField(print_preview.AppStateField.SCALING)));
      }
      if (this.appState_.hasField(
              print_preview.AppStateField.IS_CSS_BACKGROUND_ENABLED)) {
        this.cssBackground_.updateValue(
            /** @type {!Object} */ (this.appState_.getField(
                print_preview.AppStateField.IS_CSS_BACKGROUND_ENABLED)));
      }
      if (this.appState_.hasField(print_preview.AppStateField.VENDOR_OPTIONS)) {
        this.vendorItems_.updateValue(
            /** @type {!Object<string>} */ (this.appState_.getField(
                print_preview.AppStateField.VENDOR_OPTIONS)));
      }
    }
/**
     * Initializes the print ticket store. Dispatches an INITIALIZE event.
     * @param {string} thousandsDelimeter Delimeter of the thousands place.
     * @param {string} decimalDelimeter Delimeter of the decimal point.
     * @param {!print_preview.MeasurementSystemUnitType} unitType Type of unit
     *     of the local measurement system.
     * @param {boolean} selectionOnly Whether only selected content should be
     *     printed.
     */
Initializes the print ticket store. Dispatches an INITIALIZE event.
@param {string} thousandsDelimeter Delimeter of the thousands place.
@param {string} decimalDelimeter Delimeter of the decimal point.
@param {!print_preview.MeasurementSystemUnitType} unitType Type of unit
of the local measurement system.
@param {boolean} selectionOnly Whether only selected content should be
printed.
Initializes the print ticket store . Dispatches an INITIALIZE event . @param { string } thousandsDelimeter Delimeter of the thousands place . @param { string } decimalDelimeter Delimeter of the decimal point . @param { !print_preview . MeasurementSystemUnitType } unitType Type of unit of the local measurement system . @param { boolean } selectionOnly Whether only selected content should be printed .
init(thousandsDelimeter, decimalDelimeter, unitType, selectionOnly) {
      this.measurementSystem_.setSystem(
          thousandsDelimeter, decimalDelimeter, unitType);
      this.selectionOnly_.updateValue(selectionOnly);
      if (this.appState_.hasField(
              print_preview.AppStateField.IS_COLOR_ENABLED)) {
        this.color_.updateValue(
             (this.appState_.getField(
                print_preview.AppStateField.IS_COLOR_ENABLED)));
      }
      if (this.appState_.hasField(print_preview.AppStateField.DPI)) {
        this.dpi_.updateValue(
             (
                this.appState_.getField(print_preview.AppStateField.DPI)));
      }
      if (this.appState_.hasField(
              print_preview.AppStateField.IS_DUPLEX_ENABLED)) {
        this.duplex_.updateValue(
             (this.appState_.getField(
                print_preview.AppStateField.IS_DUPLEX_ENABLED)));
      }
      if (this.appState_.hasField(print_preview.AppStateField.MEDIA_SIZE)) {
        this.mediaSize_.updateValue(
             (this.appState_.getField(
                print_preview.AppStateField.MEDIA_SIZE)));
      }
      if (this.appState_.hasField(
              print_preview.AppStateField.IS_LANDSCAPE_ENABLED)) {
        this.landscape_.updateValue(
             (this.appState_.getField(
                print_preview.AppStateField.IS_LANDSCAPE_ENABLED)));
      }
      if (this.appState_.hasField(print_preview.AppStateField.MARGINS_TYPE)) {
        this.marginsType_.updateValue(
             (this.appState_.getField(
                print_preview.AppStateField.MARGINS_TYPE)));
      }
      if (this.appState_.hasField(print_preview.AppStateField.CUSTOM_MARGINS)) {
        this.customMargins_.updateValue(
             (this.appState_.getField(
                print_preview.AppStateField.CUSTOM_MARGINS)));
      }
      if (this.appState_.hasField(
              print_preview.AppStateField.IS_HEADER_FOOTER_ENABLED)) {
        this.headerFooter_.updateValue(
             (this.appState_.getField(
                print_preview.AppStateField.IS_HEADER_FOOTER_ENABLED)));
      }
      if (this.appState_.hasField(
              print_preview.AppStateField.IS_COLLATE_ENABLED)) {
        this.collate_.updateValue(
             (this.appState_.getField(
                print_preview.AppStateField.IS_COLLATE_ENABLED)));
      }
      if (this.appState_.hasField(
              print_preview.AppStateField.IS_FIT_TO_PAGE_ENABLED)) {
        this.fitToPage_.updateValue(
             (this.appState_.getField(
                print_preview.AppStateField.IS_FIT_TO_PAGE_ENABLED)));
      }
      if (this.appState_.hasField(print_preview.AppStateField.SCALING)) {
        this.scaling_.updateValue(
             (
                this.appState_.getField(print_preview.AppStateField.SCALING)));
      }
      if (this.appState_.hasField(
              print_preview.AppStateField.IS_CSS_BACKGROUND_ENABLED)) {
        this.cssBackground_.updateValue(
             (this.appState_.getField(
                print_preview.AppStateField.IS_CSS_BACKGROUND_ENABLED)));
      }
      if (this.appState_.hasField(print_preview.AppStateField.VENDOR_OPTIONS)) {
        this.vendorItems_.updateValue(
             (this.appState_.getField(
                print_preview.AppStateField.VENDOR_OPTIONS)));
      }
    }
init ( thousandsDelimeter , decimalDelimeter , unitType , selectionOnly ) { this . measurementSystem_ . setSystem ( thousandsDelimeter , decimalDelimeter , unitType ) ; this . selectionOnly_ . updateValue ( selectionOnly ) ; if ( this . appState_ . hasField ( print_preview . AppStateField . IS_COLOR_ENABLED ) ) { this . color_ . updateValue ( ( this . appState_ . getField ( print_preview . AppStateField . IS_COLOR_ENABLED ) ) ) ; } if ( this . appState_ . hasField ( print_preview . AppStateField . DPI ) ) { this . dpi_ . updateValue ( ( this . appState_ . getField ( print_preview . AppStateField . DPI ) ) ) ; } if ( this . appState_ . hasField ( print_preview . AppStateField . IS_DUPLEX_ENABLED ) ) { this . duplex_ . updateValue ( ( this . appState_ . getField ( print_preview . AppStateField . IS_DUPLEX_ENABLED ) ) ) ; } if ( this . appState_ . hasField ( print_preview . AppStateField . MEDIA_SIZE ) ) { this . mediaSize_ . updateValue ( ( this . appState_ . getField ( print_preview . AppStateField . MEDIA_SIZE ) ) ) ; } if ( this . appState_ . hasField ( print_preview . AppStateField . IS_LANDSCAPE_ENABLED ) ) { this . landscape_ . updateValue ( ( this . appState_ . getField ( print_preview . AppStateField . IS_LANDSCAPE_ENABLED ) ) ) ; } if ( this . appState_ . hasField ( print_preview . AppStateField . MARGINS_TYPE ) ) { this . marginsType_ . updateValue ( ( this . appState_ . getField ( print_preview . AppStateField . MARGINS_TYPE ) ) ) ; } if ( this . appState_ . hasField ( print_preview . AppStateField . CUSTOM_MARGINS ) ) { this . customMargins_ . updateValue ( ( this . appState_ . getField ( print_preview . AppStateField . CUSTOM_MARGINS ) ) ) ; } if ( this . appState_ . hasField ( print_preview . AppStateField . IS_HEADER_FOOTER_ENABLED ) ) { this . headerFooter_ . updateValue ( ( this . appState_ . getField ( print_preview . AppStateField . IS_HEADER_FOOTER_ENABLED ) ) ) ; } if ( this . appState_ . hasField ( print_preview . AppStateField . IS_COLLATE_ENABLED ) ) { this . collate_ . updateValue ( ( this . appState_ . getField ( print_preview . AppStateField . IS_COLLATE_ENABLED ) ) ) ; } if ( this . appState_ . hasField ( print_preview . AppStateField . IS_FIT_TO_PAGE_ENABLED ) ) { this . fitToPage_ . updateValue ( ( this . appState_ . getField ( print_preview . AppStateField . IS_FIT_TO_PAGE_ENABLED ) ) ) ; } if ( this . appState_ . hasField ( print_preview . AppStateField . SCALING ) ) { this . scaling_ . updateValue ( ( this . appState_ . getField ( print_preview . AppStateField . SCALING ) ) ) ; } if ( this . appState_ . hasField ( print_preview . AppStateField . IS_CSS_BACKGROUND_ENABLED ) ) { this . cssBackground_ . updateValue ( ( this . appState_ . getField ( print_preview . AppStateField . IS_CSS_BACKGROUND_ENABLED ) ) ) ; } if ( this . appState_ . hasField ( print_preview . AppStateField . VENDOR_OPTIONS ) ) { this . vendorItems_ . updateValue ( ( this . appState_ . getField ( print_preview . AppStateField . VENDOR_OPTIONS ) ) ) ; } }
Initializes the print ticket store.
Initializes the print ticket store .
// Initialize ticket with user's previous values. /** @type {!Object} */ /** @type {!Object} */ /** @type {!Object} */ /** @type {!Object} */ /** @type {!Object} */ // Initialize margins after landscape because landscape may reset margins. /** @type {!Object} */ /** @type {!Object} */ /** @type {!Object} */ /** @type {!Object} */ /** @type {!Object} */ /** @type {!Object} */ /** @type {!Object} */ /** @type {!Object<string>} */