Package cli_fmw.report

Examples of cli_fmw.report.ExtraField


     * @param value значение
     * @param afterTable если true, то добавлять после таблицы
     */
  @Override
  public void addField(String title, String value, boolean afterTable) {
    addField(new ExtraField(value, title), afterTable);
  }
View Full Code Here


            HashMap<String, Object> data = new LinkedHashMap<String, Object>();
            data.put("date", "Дата: " + Converter.dateToString(profcheckup.getDateFrom()));
       
            data.put("contractInfo", "Данные договора, по которому производится профосмотр");
            AlignmentType at = AlignmentType.dataInOneColoumnByLeft;
            ExtraField ef = new ExtraField(contractLocal.getIndex(), "индекс:", at);
            data.put("contractIndex", ef);
            ef = new ExtraField(contractLocal.getEnterprise(), "предприятие:", at);
            data.put("contractEnterprise", ef);
       
            String dangers = "Вредные факторы:\n";
            Iterator<PanelDanger> it = panelDangerMap.values().iterator();
            while (it.hasNext()) {
View Full Code Here

  JRDesignExpression createFieldExpression(Map.Entry<String, Object> entry) throws JRException{
    JRDesignParameter    param = createFieldParam(entry);
    String          exp;
    Object          val = entry.getValue();
    if (val != null && val instanceof ExtraField){
      ExtraField    data = (ExtraField) val;
      exp = expressionField(param, data);
     
    }
    else {
      exp = expressionParamNullCheck(param, val);
View Full Code Here

    double        nameSize = 0;
    double        valSize = 0;
    AlignmentType    atype = null;
   
    for (Map.Entry<String, Object> entry : efields) {
      ExtraField      val = (ExtraField) entry.getValue();
      nameSize = Math.max(nameSize, getFieldLenght(val.getNNFieldName()));
      valSize = Math.max(valSize, getFieldLenght(val.getNNFieldData() + val.getNNFieldSufix()));
      atype = val.alignmentType;
    }
   
    if (nameSize + valSize > destingWidth){
      if (nameSize > (double)destingWidth / 3d){
        //nameSize = (double)destingWidth / 3d;
        valSize = ((double)destingWidth * 2) / 3d;
        nameSize = (double)destingWidth - valSize;
      }
      else{
        valSize = (double)destingWidth - nameSize;
      }
    }
   
    double    leftPos = 0;
    switch (atype){
      case dataInOneColoumnByRight:
      case dataInOneColoumnByRightAndRigthAlign:
      case dataInOneColoumnByRightAndHalfRigthAlign:
        leftPos = (double)destingWidth - nameSize - valSize;
        break;
      case dataInOneColoumnByLeft:
        valSize = (double) destingWidth - nameSize;
        break;
    }
    for (Map.Entry<String, Object> entry : efields){
      ExtraField          val = (ExtraField) entry.getValue();
      JRDesignExpression      nameExp = createExpression(expressionFieldName(val, false));
      JRDesignExpression      dataExp = createFieldExpression(entry);
      JRDesignTextField      nameField = createItem(FieldTypes.firstPrage,
            (int)Math.round(leftPos), 0,
            (int)Math.round(nameSize), (int)Math.round(getFieldHeigth()), nameExp);
View Full Code Here

 
  double createFieldPackCompact(double startPosition, JRDesignBand band, ArrayList<Map.Entry<String, Object>> efields) throws JRException{
    String      exp = "";
    boolean      fistPass = true;
    for (Map.Entry<String, Object> entry : efields) {
      ExtraField          val = (ExtraField) entry.getValue();
      if (!fistPass) {
        exp += " + \" \" + ";
      }
      else {
        fistPass = false;
View Full Code Here

  double createFieldPack(double startPosition, JRDesignBand band, ArrayList<Map.Entry<String, Object>> efields) throws JRException{
    if (efields.size() <= 0) {
      return startPosition;
    }
    ExtraField        val = (ExtraField) efields.get(0).getValue();
    switch (val.alignmentType){
      case left:
      case center:
      case right:
        return createFieldPackSamle(startPosition, band, efields);
View Full Code Here

   * @throws net.sf.jasperreports.engine.JRException
   */
 
  double createReportFields(double startPosition, JRDesignBand band, Collection<Map.Entry<String, Object>> fields) throws JRException{
    double                  posistion = startPosition;
    ExtraField                startField = null;
    ArrayList<Map.Entry<String, Object>>  efields = new ArrayList<Map.Entry<String, Object>>();
    for (Iterator<Map.Entry<String, Object>> it = fields.iterator(); it.hasNext();) {
      Map.Entry<String, Object> entry = it.next();
      Object          val = entry.getValue();
      if (val != null && val instanceof ExtraField){
        if (startField != null && startField.formatEqual((ExtraField) val)){
          efields.add(entry);
        }
        else{
          if (efields.size() > 0) {
            posistion = createFieldPack(posistion, band, efields);
View Full Code Here

        String title = "Данные диагноза";
       
        AlignmentType alType = AlignmentType.dataInOneColoumnByLeft;
       
        String val = getSerrenLocal().getPolisData().getClient(getAuditListener()).toString();
        ExtraField extraField = new ExtraField(val, "Пациент:", alType);
        data.put("client", extraField);
       
        val = Converter.dateToString(getDate());
        extraField = new ExtraField(val, "Дата:", alType);
        data.put("date", extraField);
       
        val = getMkbAndStage();
        extraField = new ExtraField(val, "Диагноз:", alType);
        data.put("mkb", extraField);
       
        val = getType().getTitle();
        extraField = new ExtraField(val, "Тип диагноза:", alType);
        data.put("type", extraField);
       
        val = getEncounter().getTitle();
        extraField = new ExtraField(val, "Повторяемость:", alType);
        data.put("enc", extraField);
       
        if (getAuthor() != null) {
            val = getAuthor();
            extraField = new ExtraField(val, "Автор:", alType);
            data.put("author", extraField);
        }
       
        TableModel model = null;
        if (!getAccompDiagnosis().isEmpty()) {
View Full Code Here

    @Override
    public void print() {
        if (readyForPrint()) {
            String title = "Справочник кабинетов";
      ArrayList<Entry<String, Object>>    fields = new ArrayList<Entry<String, Object>>();
      fields.add(new SampleMapEntry<String, Object>("clinic", new ExtraField(getCurLpu(), "Клиника: ")));
            PrintCreators.createGeneratedReport(title, null, fields, null, tabCabinets.getModel(), getClass());
        }
    }
View Full Code Here

    @Override
    public void print() {
        if (readyForPrint()) {
            String title = "Справочник кабинетов";
      ArrayList<Entry<String, Object>>    fields = new ArrayList<Entry<String, Object>>();
      fields.add(new SampleMapEntry<String, Object>("clinic", new ExtraField(getCurLpu(), "Клиника: ")));
            PrintCreators.createGeneratedReport(title, null, fields, null, tabDistricts.getModel(), getClass());
        }
    }
View Full Code Here

TOP

Related Classes of cli_fmw.report.ExtraField

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.