///////////////////////////////////////////////// G U I   M E T H O D S
 // \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
 public CopyRightReportScreen(SubsystemApp subsystemApp, String screenTitle, Locale local) {
   super(subsystemApp);
   className = getClass().getName();
   this.screenTitle = screenTitle;
   this.local = local;
   dataFetcher = new CopyRightReportRowData.copyRightReportDataFetcher(local);
   dataFetcher.setReportObject(null);
   guiInit();
   layoutComponents();
 }
 /** <code>clearActionPerformed()</code> defines for reseting all components. */
 private void clearActionPerformed() {
   txfTitle.setText("");
   txfNumber.setText("");
   txfFromDate.setDate(null);
   txfToDate.setDate(null);
   txfUserName.setText("");
   rdoCopyrightReq.setSelected(true);
   rdoNoAnswerReq.setSelected(true);
   rdoHasNumber.setSelected(true);
   chkAnswerDate.setSelected(false);
   chkRequestDate.setSelected(false);
   chkSetNumberDate.setSelected(false);
   txfFromDate.setEnabled(false);
   txfToDate.setEnabled(false);
   cmbDocType.setEnabled(false);
   userId = 0;
   dataFetcher.setReportObject(null);
   grid.refresh();
 }
  /**
   * <code>reportActionPerformed()</code> defiens for searching copyrights in DB according to search
   * keys.
   */
  private void reportActionPerformed() {
    filterObject = new TempRequestReport();
    int counter = 0;
    previewHeaderText = new String();
    radioValue = new String();

    if (!txfTitle.getText().equals(""))
      filterObject.setTitle((txfTitle.getText().toUpperCase().trim()));

    if (!txfNumber.getText().equals(""))
      filterObject.setNumber(StringUtils.arabicToLatinDigit(txfNumber.getText()).trim());

    if (rdoAnswerReq.isSelected()) {
      filterObject.setIsAnswered(WorkflowConstants.IS_ANSWERED_REQUEST);
      radioValue = props.getProperty("print_answered_req.name");
    } else if (rdoNoAnswerReq.isSelected()) {
      filterObject.setIsAnswered(WorkflowConstants.IS_NOT_ANSWERED_REQUEST);
      radioValue = props.getProperty("print_no_answered_req.name");
    }

    if (rdoHasNumber.isSelected()) {
      filterObject.setHasNumber(WorkflowConstants.HAS_NUMBER);
      radioValue += " " + props.getProperty("print_has_number_req.name");
    } else if (rdoNoNumber.isSelected()) {
      filterObject.setHasNumber(WorkflowConstants.NO_NUMBER);
      radioValue += " " + props.getProperty("print_no_number_req.name");
    }

    if (txfUserName.getText() != null
        && txfUserName.getText() != ""
        && txfUserName.getText().length() != 0) filterObject.setUserId(userId);

    if (rdoCopyrightReq.isSelected()) {
      filterObject.setType(WorkflowConstants.COPY_RIGHT_BOOK_TYPE);
      filterObject.setDocType("");
      radioValue += " " + props.getProperty("print_copy_right_req.name");
    } else if (rdoDepositReq.isSelected()) {
      filterObject.setType(WorkflowConstants.COPY_RIGHT_NON_BOOK_TYPE);
      if (cmbDocType.getSelectedIndex() != 0) {
        filterObject.setDocType(((ConstantTableItem) cmbDocType.getSelected()).getCode());
      } else filterObject.setDocType("");
      radioValue += " " + props.getProperty("print_deposit_req.name");
    }

    if (chkAnswerDate.isSelected()) {
      filterObject.setAnswerDate(WorkflowConstants.SELECTED);
      previewHeaderText = props.getProperty("answer_date.name");
      counter++;
    }
    if (chkRequestDate.isSelected()) {
      filterObject.setRequestDate(WorkflowConstants.SELECTED);
      if (counter > 0)
        previewHeaderText += " " + '\u060c' + " " + props.getProperty("request_date.name");
      else previewHeaderText += " " + props.getProperty("request_date.name");
      counter++;
    }

    if (chkSetNumberDate.isSelected()) {
      filterObject.setSetNumberDate(WorkflowConstants.SELECTED);
      if (counter > 0)
        previewHeaderText += " " + '\u060c' + " " + props.getProperty("set_number_date.name");
      else previewHeaderText += " " + props.getProperty("set_number_date.name");
    }

    if (txfFromDate.getDate() != null && txfToDate.getDate() != null) {
      if (txfFromDate.getDate().getTime() > txfToDate.getDate().getTime()) {
        MessagePanes.showErrorDialog(
            this, props.getProperty("from_date_larger.name"), LocaleUtils.PERSIAN);
        return;
      }
    }

    if (txfFromDate.getDate() != null) {
      filterObject.setFromDate(txfFromDate.getDate());
      if (!previewHeaderText.equals(""))
        previewHeaderText +=
            " "
                + props.getProperty("from_date.name")
                + " "
                + StringUtils.RTL_MARK
                + txfFromDate.getDate();
    }
    if (txfToDate.getDate() != null) {
      filterObject.setToDate(txfToDate.getDate());
      if (!previewHeaderText.equals(""))
        previewHeaderText +=
            " "
                + props.getProperty("to_date.name")
                + " "
                + StringUtils.RTL_MARK
                + txfToDate.getDate();
    }
    if (txfToDate.getDate() == null && txfFromDate.getDate() == null)
      previewHeaderText = new String();

    dataFetcher.setReportObject(filterObject);
    grid.refresh();
    if (grid.getDataModel().getData().getDataList() == null
        || grid.getDataModel().getData().getDataList().size() == 0)
      MessagePanes.showInfoDialog(this, props.getProperty("empty_list.name"), LocaleUtils.PERSIAN);
  }