Examples of TextValue


Examples of it.cilea.osd.jdyna.value.TextValue

            rp = new ResearcherPage();
            rp.setEpersonID(getCurrentUser(request).getID());
            RPPropertiesDefinition fN = applicationService
                    .findPropertiesDefinitionByShortName(
                            RPPropertiesDefinition.class, "fullName");
            TextValue val = new TextValue();
            val.setOggetto(getCurrentUser(request).getFullName());
            RPProperty prop = rp.createProprieta(fN);
            prop.setValue(val);
            prop.setVisibility(1);
            applicationService.saveOrUpdate(ResearcherPage.class, rp);
        }
View Full Code Here

Examples of it.cilea.osd.jdyna.value.TextValue

                try
                {
                    propDef = cris.getClassPropertiesDefinition().newInstance();
                    propDef.setRendering(widget);                   
                    prop = cris.getClassProperty().newInstance();
                    TextValue avalue = new TextValue();
                    avalue.setReal(value);
                    prop.setValue(avalue);
                    prop.setVisibility(VisibilityConstants.PUBLIC);
                    prop.setTypo(propDef);
                    results.add(prop);
                }
View Full Code Here

Examples of it.cilea.osd.jdyna.value.TextValue

                RPPropertiesDefinition propDef = applicationService
                        .findPropertiesDefinitionByShortName(
                                RPPropertiesDefinition.class, propDefName);
                RPProperty rpItemsCited = rp.getDynamicField().createProprieta(
                        propDef);
                TextValue valore = new TextValue();
                valore.setOggetto(value);
                rpItemsCited.setValue(valore);
                rpItemsCited.setVisibility(VisibilityConstants.PUBLIC);
                updated = true;
            }
        }
View Full Code Here

Examples of it.cilea.osd.jdyna.value.TextValue

                            .findPropertiesDefinitionByShortName(
                                    RPPropertiesDefinition.class,
                                    shortName));
//        }

        TextValue nConnectionValue = new TextValue();
        nConnectionValue.setOggetto(value);
        nConnectionRPP.setValue(nConnectionValue);
        nConnectionRPP.setVisibility(VisibilityConstants.PUBLIC);
    }
View Full Code Here

Examples of net.sf.jasperreports.engine.export.data.TextValue

    return tzId == null ? null : JRDataUtils.getTimeZone(tzId);
  }
 
  protected TextValue getTextValue(JRPrintText text, String textStr)
  {
    TextValue textValue;
    if (text.getValueClassName() == null)
    {
      textValue = getTextValueString(text, textStr);
    }
    else
View Full Code Here

Examples of net.sf.jasperreports.engine.export.data.TextValue

    return new BooleanTextValue(textStr, value);
  }

  protected TextValue getDateCellValue(JRPrintText text, String textStr) throws ParseException
  {
    TextValue textValue;
    String pattern = text.getPattern();
    if (pattern == null || pattern.trim().length() == 0)
    {
      textValue = getTextValueString(text, textStr);
    }
View Full Code Here

Examples of net.sf.jasperreports.engine.export.data.TextValue

    return textValue;
  }

  protected TextValue getNumberCellValue(JRPrintText text, String textStr) throws ParseException, ClassNotFoundException
  {
    TextValue textValue;
    String pattern = text.getPattern();
    if (pattern == null || pattern.trim().length() == 0)
    {
      if (textStr != null && textStr.length() > 0)
      {
View Full Code Here

Examples of net.sf.jasperreports.engine.export.data.TextValue

  protected void addCell(int x, int y, JRPrintText text, String textStr, StyleInfo baseStyle) throws WriteException, RowsExceededException, JRException
  {
    CellValue cellValue = null;

    TextValue textValue = null;

    String textFormula = getFormula(text);
    if( textFormula != null)
    {
      // if the cell has formula, we try create a formula cell
View Full Code Here

Examples of net.sf.jasperreports.engine.export.data.TextValue

    final int textLength = styledText == null ? 0 : styledText.length();

    final String textStr = styledText.getText();

    TextValue textValue = null;
    if (isDetectCellType)
    {
      textValue = getTextValue(text, textStr);
    }
   
    cellHelper.exportHeader(
      gridCell, rowIndex, colIndex, textValue,
      getConvertedPattern(text.getPattern()),
      getTextLocale(text),
      isWrapText(gridCell.getElement()),
      isCellHidden(gridCell.getElement()),
      isCellLocked(gridCell.getElement())
      );
    sheetHelper.exportMergedCells(rowIndex, colIndex, gridCell.getRowSpan(), gridCell.getColSpan());

    String textFormula = getFormula(text);
    if (textFormula != null)
    {
      sheetHelper.write("<f>" + textFormula + "</f>\n");
    }

//    if (text.getLineSpacing() != JRTextElement.LINE_SPACING_SINGLE)
//    {
//      styleBuffer.append("line-height: " + text.getLineSpacingFactor() + "; ");
//    }

//    if (styleBuffer.length() > 0)
//    {
//      writer.write(" style=\"");
//      writer.write(styleBuffer.toString());
//      writer.write("\"");
//    }
//
//    writer.write(">");
   
//    tableHelper.getParagraphHelper().exportProps(text);
   
//    insertPageAnchor();
//    if (text.getAnchorName() != null)
//    {
//      tempBodyWriter.write("<text:bookmark text:name=\"");
//      tempBodyWriter.write(text.getAnchorName());
//      tempBodyWriter.write("\"/>");
//    }

    String href = getHyperlinkURL(text);
    if (href != null)
    {
      sheetHelper.exportHyperlink(rowIndex, colIndex, href);
    }

   
    TextValueHandler handler =
      new TextValueHandler()
      {
        public void handle(BooleanTextValue textValue) throws JRException {
          writeText();
        }
       
        public void handle(DateTextValue textValue) throws JRException {
          Date date = textValue.getValue();
          sheetHelper.write(
            "<v>"
            + (date == null ? "" : JRDataUtils.getExcelSerialDayNumber(
              date,
              getTextLocale(text),
              getTextTimeZone(text)
              ))
            + "</v>"
            );
        }
       
        public void handle(NumberTextValue textValue) throws JRException {
          Number number = textValue.getValue();
          sheetHelper.write(
            "<v>"
            + (number == null ? "" : number)
            + "</v>"
            );
        }
       
        public void handle(StringTextValue textValue) throws JRException {
          writeText();
        }
       
        private void writeText() throws JRException {
          sheetHelper.write("<is>");//FIXMENOW make writer util; check everywhere
 
          if (textLength > 0)
          {
            exportStyledText(text.getStyle(), styledText, getTextLocale(text));
          }
 
          sheetHelper.write("</is>");
        }
      };
   
    if (textValue != null)
    {
      //detect cell type
      textValue.handle(handler);
    }
    else
    {
      handler.handle((StringTextValue)null);
    }
View Full Code Here

Examples of net.sf.jasperreports.engine.export.data.TextValue

   
    if (formula != null)
    { 
      try
      {
        TextValue value = getTextValue(textElement, textStr);
       
        if (value instanceof NumberTextValue && ((NumberTextValue)value).getPattern() != null)
        {
          baseStyle.setDataFormat(
            dataFormat.getFormat(
              getConvertedPattern(((NumberTextValue)value).getPattern())
              )
            );
        }
        else if (value instanceof DateTextValue && ((DateTextValue)value).getPattern() != null)
        {
          baseStyle.setDataFormat(
              dataFormat.getFormat(
                getConvertedPattern(((DateTextValue)value).getPattern())
                )
              );
         
        }
       
        HSSFCellStyle cellStyle = initCreateCell(gridCell, colIndex, rowIndex, baseStyle);
        cell.setCellType(HSSFCell.CELL_TYPE_FORMULA);
        cell.setCellFormula(formula);
        endCreateCell(cellStyle);
        return;
      }
      catch(Exception e)//FIXMENOW what exceptions could we get here?
      {
        if(log.isWarnEnabled())
        {
          log.warn(e.getMessage());
        }
      }
    }

    if (isDetectCellType)
    {
      TextValue value = getTextValue(textElement, textStr);
      value.handle(new TextValueHandler()
      {
        public void handle(StringTextValue textValue)
        {
          HSSFCellStyle cellStyle = initCreateCell(gridCell, colIndex, rowIndex, baseStyle);
          if (JRCommonText.MARKUP_NONE.equals(textElement.getMarkup()))
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.