예제 #1
0
  private void creaSeccionCondiciones(Boolean isTarifaDefecto) {
    if (isTarifaDefecto == null) isTarifaDefecto = false;
    String puntos = "";
    Block block = new Block();
    Block condicionesBlock = withNewBlock();
    condicionesBlock.setMarginTop("0.3cm");

    block.setFontSize("8pt");
    block.setColor(GRIS_OSCURO);
    block.setFontWeight("bold");
    block.setMarginBottom("0.2em");
    block.getContent().add(ResourceProperties.getProperty(locale, "entrada.condiciones"));
    condicionesBlock.getContent().add(block);

    block = new Block();
    block.setLinefeedTreatment(LinefeedTreatmentType.PRESERVE);
    block.setFontSize("8pt");
    block.setColor(GRIS_OSCURO);
    block.setMarginBottom("0.2em");

    if (!isTarifaDefecto) {
      block.setBackgroundImage("/etc/uji/par/imagenes/entrada_descuento.png");
      block.setBackgroundRepeat(BackgroundRepeatType.NO_REPEAT);
      block.setBackgroundPositionVertical("35%");
    }

    for (int i = 1; i <= 10; i++)
      puntos += ResourceProperties.getProperty(locale, String.format("entrada.condicion%d", i));

    block.getContent().add(puntos);
    condicionesBlock.getContent().add(block);
  }
예제 #2
0
  private Table createEntradaDerechaAbajo() {
    BaseTable table = new BaseTable(new EntradaReportStyle(), 2, "3cm", "2.5cm");

    table.withNewRow();
    table.withNewCell("");
    table.withNewCell(ResourceProperties.getProperty(locale, "entrada.total"));

    table.withNewRow();
    table.withNewCell("");
    table.withNewCell(ResourceProperties.getProperty(locale, "entrada.importe", this.total));

    return table;
  }
예제 #3
0
  private void creaSeccionEntrada(String urlPublic) {
    Block entradaBlock = withNewBlock();

    EntradaReportStyle style = new EntradaReportStyle();
    BaseTable entradaTable = new BaseTable(style, 2, "11.8cm", "6.1cm");

    entradaTable.withNewRow();

    TableCell cellIzquierda = entradaTable.withNewCell(createEntradaIzquierda(urlPublic));
    cellIzquierda.setPadding("0.3cm");
    cellIzquierda.setPaddingTop("0.0cm");
    cellIzquierda.setBackgroundColor(FONDO_GRIS);

    TableCell cellDerecha = entradaTable.withNewCell(createEntradaDerecha());
    cellDerecha.setPadding("0.3cm");
    cellDerecha.setPaddingTop("0.3cm");
    cellDerecha.setBackgroundColor(FONDO_GRIS);
    cellDerecha.setBorderLeftWidth("0.03cm");
    cellDerecha.setBorderLeftColor("white");
    cellDerecha.setBorderLeftStyle(BorderStyleType.DOTTED);

    TableRow rowAbajo = entradaTable.withNewRow();
    rowAbajo.setBackgroundColor(FONDO_GRIS);
    entradaTable.withNewCell(ResourceProperties.getProperty(locale, "entrada.entradaValida"), "2");

    entradaBlock.getContent().add(entradaTable);
  }
예제 #4
0
  private Block createEntradaIzquierdaCentroDatos() {
    Block block = new Block();

    BaseTable table = new BaseTable(new EntradaReportStyle(), 3, "2.5cm", "1.8cm", "2.1cm");

    Block titulo = new Block();
    titulo.setFontSize("14pt");
    titulo.setFontStyle(FontStyleType.ITALIC);
    titulo.getContent().add(this.titulo);
    titulo.setMarginBottom("0.2cm");

    table.withNewRow();
    table.withNewCell(titulo, "3");

    table.withNewRow();
    table.withNewCell(ResourceProperties.getProperty(locale, "entrada.fecha"));
    table.withNewCell(ResourceProperties.getProperty(locale, "entrada.hora"));
    table.withNewCell(ResourceProperties.getProperty(locale, "entrada.apertura"));

    table.withNewRow();
    table.withNewCell(this.fecha);
    table.withNewCell(this.hora);
    table.withNewCell(this.horaApertura);

    table.withNewRow();
    TableCell cell = table.withNewCell(ResourceProperties.getProperty(locale, "entrada.zona"), "3");
    cell.setPaddingTop("0.2cm");

    Block zona = new Block();
    zona.getContent().add(this.zona);
    zona.setFontSize("12pt");

    table.withNewRow();
    table.withNewCell(zona, "3");

    if (this.fila != null && this.numero != null) {
      table.withNewRow();
      table.withNewCell(
          ResourceProperties.getProperty(locale, "entrada.butaca", this.fila, this.numero), "3");
    }

    block.getContent().add(table);

    return block;
  }
예제 #5
0
 private Block createTextParanimf(String fontSize) {
   Block textParanimf = new Block();
   textParanimf
       .getContent()
       .add(ResourceProperties.getProperty(locale, "entrada.nombreLocalizacion"));
   textParanimf.setFontSize(fontSize);
   textParanimf.setFontStyle(FontStyleType.ITALIC);
   return textParanimf;
 }
예제 #6
0
  private BaseTable createEntradaDerechaArriba() {
    BaseTable table = new BaseTable(new EntradaReportStyle(), 2, "3.5cm", "2cm");

    table.withNewRow();
    table.withNewCell(createTextParanimf("18pt"));

    TableCell cell = table.withNewCell(logoUji());
    cell.setTextAlign(TextAlignType.CENTER);
    cell.setDisplayAlign(DisplayAlignType.CENTER);

    table.withNewRow();
    table.withNewCell(ResourceProperties.getProperty(locale, "entrada.nombreEntidad"), "2");

    table.withNewRow();
    table.withNewCell(ResourceProperties.getProperty(locale, "entrada.direccion"), "2");

    return table;
  }
예제 #7
0
  private BaseTable createEntradaIzquierdaAbajo(String urlPublic) {
    BaseTable table = new BaseTable(new EntradaReportStyle(), 2, "8.5cm", "2.5cm");

    table.setMarginTop("0.2cm");

    table.withNewRow();
    table.withNewCell(ResourceProperties.getProperty(locale, "entrada.cif"));
    table.withNewCell(ResourceProperties.getProperty(locale, "entrada.total"));

    table.withNewRow();
    table.withNewCell(this.barcode);
    table.withNewCell(ResourceProperties.getProperty(locale, "entrada.importe", this.total));

    table.withNewRow();
    table.withNewCell(createBarcode(urlPublic), "2");

    return table;
  }
예제 #8
0
  private BaseTable createEntradaDerechaCentro() {
    BaseTable table = new BaseTable(new EntradaReportStyle(), 2, "2.5cm", "2.5cm");

    String margin = "0.3cm";
    table.setMarginTop("0.5cm");
    table.setMarginBottom(margin);
    table.setMarginLeft(margin);
    table.setMarginRight(margin);

    table.setBackgroundColor(FONDO_BLANCO);

    Block titulo = new Block();
    titulo.setFontSize("14pt");
    titulo.setFontStyle(FontStyleType.ITALIC);
    titulo.getContent().add(this.titulo);
    titulo.setMarginBottom("0.2cm");

    table.withNewRow();
    TableCell tituloCell = table.withNewCell(titulo, "2");
    tituloCell.setPaddingTop("0.2cm");

    table.withNewRow();
    table.withNewCell(ResourceProperties.getProperty(locale, "entrada.fecha"));
    table.withNewCell(ResourceProperties.getProperty(locale, "entrada.hora"));

    table.withNewRow();
    table.withNewCell(this.fecha);
    table.withNewCell(this.hora);

    table.withNewRow();
    TableCell aperturaCell =
        table.withNewCell(ResourceProperties.getProperty(locale, "entrada.apertura"), "2");
    aperturaCell.setPaddingTop("0.2cm");

    table.withNewRow();
    table.withNewCell(this.horaApertura, "2");

    table.withNewRow();
    TableCell cell = table.withNewCell(ResourceProperties.getProperty(locale, "entrada.zona"), "2");
    cell.setPaddingTop("0.2cm");

    Block zona = new Block();
    zona.getContent().add(this.zona);
    zona.setFontSize("12pt");

    table.withNewRow();
    TableCell zonaCell = table.withNewCell(zona, "2");

    if (this.fila != null && this.numero != null) {
      table.withNewRow();
      TableCell butacaCell =
          table.withNewCell(
              ResourceProperties.getProperty(locale, "entrada.butaca", this.fila, this.numero),
              "2");
      butacaCell.setPaddingBottom("0.2cm");
    } else {
      zonaCell.setPaddingBottom("0.2cm");
    }

    return table;
  }