Examples of JRLineBox


Examples of net.sf.jasperreports.engine.JRLineBox

   */
  public static class Top extends JRPenFactory
  {
    public Object createObject(Attributes atts)
    {
      JRLineBox box = (JRLineBox) digester.peek();
      setPenAttributes(atts, box.getTopPen());
      return box;
    }
View Full Code Here

Examples of net.sf.jasperreports.engine.JRLineBox

   */
  public static class Left extends JRPenFactory
  {
    public Object createObject(Attributes atts)
    {
      JRLineBox box = (JRLineBox) digester.peek();
      setPenAttributes(atts, box.getLeftPen());
      return box;
    }
View Full Code Here

Examples of net.sf.jasperreports.engine.JRLineBox

   */
  public static class Bottom extends JRPenFactory
  {
    public Object createObject(Attributes atts)
    {
      JRLineBox box = (JRLineBox) digester.peek();
      setPenAttributes(atts, box.getBottomPen());
      return box;
    }
View Full Code Here

Examples of net.sf.jasperreports.engine.JRLineBox

  /**
   *
   */
  protected void exportRectangle(TableBuilder tableBuilder, JRPrintRectangle rectangle, JRExporterGridCell gridCell) throws IOException
  {
    JRLineBox box = new JRBaseLineBox(null);
    JRPen pen = box.getPen();
    pen.setLineColor(rectangle.getLinePen().getLineColor());
    pen.setLineStyle(rectangle.getLinePen().getLineStyleValue());
    pen.setLineWidth(rectangle.getLinePen().getLineWidth());

    gridCell.setBox(box);//CAUTION: only some exporters set the cell box
View Full Code Here

Examples of net.sf.jasperreports.engine.JRLineBox

  /**
   *
   */
  public static JRLineBox copyBordersNoPadding(JRLineBox box, boolean keepLeft, boolean keepRight, boolean keepTop, boolean keepBottom, JRLineBox complementaryBox)
  {
    JRLineBox clone = box.clone(box.getBoxContainer());
   
    clone.setTopPadding(0);
    clone.setLeftPadding(0);
    clone.setBottomPadding(0);
    clone.setRightPadding(0);
   
    //FIXMEBORDER does not copy padding correctly, if we only test line width
    if (!keepLeft || box.getLeftPen().getLineWidth().floatValue() <= 0f)
    {
      if (complementaryBox != null)
      {
        clone.getLeftPen().setLineWidth(complementaryBox.getLeftPen().getLineWidth());
        clone.getLeftPen().setLineColor(complementaryBox.getLeftPen().getLineColor());
        //clone.setLeftPadding(complementaryBox.getLeftPadding());
      }
      else
      {
        clone.getLeftPen().setLineWidth(0);
      }
    }
   
    if (!keepRight || box.getRightPen().getLineWidth().floatValue() <= 0f)
    {
      if (complementaryBox != null)
      {
        clone.getRightPen().setLineWidth(complementaryBox.getRightPen().getLineWidth());
        clone.getRightPen().setLineColor(complementaryBox.getRightPen().getLineColor());
        //clone.setRightPadding(complementaryBox.getRightPadding());
      }
      else
      {
        clone.getRightPen().setLineWidth(0);
      }
    }
   
    if (!keepTop || box.getTopPen().getLineWidth().floatValue() <= 0f)
    {
      if (complementaryBox != null)
      {
        clone.getTopPen().setLineWidth(complementaryBox.getTopPen().getLineWidth());
        clone.getTopPen().setLineColor(complementaryBox.getTopPen().getLineColor());
        //clone.setTopPadding(complementaryBox.getTopPadding());
      }
      else
      {
        clone.getTopPen().setLineWidth(0);
      }
    }
   
    if (!keepBottom || box.getBottomPen().getLineWidth().floatValue() <= 0f)
    {
      if (complementaryBox != null)
      {
        clone.getBottomPen().setLineWidth(complementaryBox.getBottomPen().getLineWidth());
        clone.getBottomPen().setLineColor(complementaryBox.getBottomPen().getLineColor());
        //clone.setBottomPadding(complementaryBox.getBottomPadding());
      }
      else
      {
        clone.getBottomPen().setLineWidth(0);
      }
    }
   
    return clone;
  }
View Full Code Here

Examples of net.sf.jasperreports.engine.JRLineBox

   *
   */
  public Object createObject(Attributes atts)
  {
    JRBoxContainer boxContainer = (JRBoxContainer) digester.peek();
    JRLineBox box = boxContainer.getLineBox();
    setBoxAttributes(atts, box);
    return box;
  }
View Full Code Here

Examples of net.sf.jasperreports.engine.JRLineBox

        boolean keepTop = row == row1;
        boolean keepBottom = row == row2 - cell.getRowSpan();

        if (keepLeft || keepRight || keepTop || keepBottom)
        {
          JRLineBox cellBox = cell.getBox();
          Object key = new BoxKey(frame.getLineBox(), cellBox, keepLeft, keepRight, keepTop, keepBottom);
          JRLineBox modBox = (JRLineBox) boxesCache.get(key);
          if (modBox == null)
          {
            modBox = JRBoxUtil.clone(frame.getLineBox(), keepLeft, keepRight, keepTop, keepBottom, cellBox);
            boxesCache.put(key, modBox);
          }
View Full Code Here

Examples of net.sf.jasperreports.engine.JRLineBox

   * @return высота элемента
   */
 
  int getElementHeight(){
    double      target = builder.getFieldHeigth();
    JRLineBox box = tableStyle.getLineBox();
    target += box.getTopPen().getLineWidth();
    return (int) Math.round(target);
  }
View Full Code Here

Examples of net.sf.jasperreports.engine.JRLineBox

   * @return - длинну
   */
 
  double getElementLenght(String line){
    double    target = getStringLength(line);
    JRLineBox  box = tableStyle.getLineBox();
    target += box.getLeftPadding();
    target += box.getRightPadding();
    target += box.getLeftPen().getLineWidth();
    target += 1;
    return target;
  }
View Full Code Here

Examples of net.sf.jasperreports.engine.JRLineBox

  private void initStyles() throws JRException{
    tableStyle = new JRDesignStyle();
    tableStyle.setName("Table");
    tableStyle.setDefault(false);
    tableStyle.setParentStyle(builder.getNormalStyle());
    JRLineBox box = tableStyle.getLineBox();
    box.getPen().setLineStyle(JRPen.LINE_STYLE_SOLID);
    box.getPen().setLineWidth(1);
    builder.getTargetDesting().addStyle(tableStyle);
   
    stringsWidth = builder.getDestingWidth() - (endColoumn - beginColoumn) * getElementOverhead();
   
    if (options.showTableHeader && table != null){
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.