com.lowagie.text.Rectangle.disableBorderSide()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(2.8k)|赞(0)|评价(0)|浏览(92)

本文整理了Java中com.lowagie.text.Rectangle.disableBorderSide方法的一些代码示例,展示了Rectangle.disableBorderSide的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Rectangle.disableBorderSide方法的具体详情如下:
包路径:com.lowagie.text.Rectangle
类名称:Rectangle
方法名:disableBorderSide

Rectangle.disableBorderSide介绍

[英]Disables the border on the specified side.
[中]禁用指定一侧的边框。

代码示例

代码示例来源:origin: com.github.librepdf/openpdf

/**
 * Helper function updating the border flag for a side based on the specified
 * width. A width of 0 will disable the border on that side. Any other width
 * enables it.
 * 
 * @param width
 *          width of border
 * @param side
 *          border side constant
 */
private void updateBorderBasedOnWidth(float width, int side) {
 useVariableBorders = true;
 if (width > 0)
  enableBorderSide(side);
 else
  disableBorderSide(side);
}

代码示例来源:origin: es.gob.afirma/afirma-crypto-pdf-itext

/**
 * Helper function updating the border flag for a side
 * based on the specified width.
 * A width of 0 will disable the border on that side.
 * Any other width enables it.
 * 
 * @param width    width of border
 * @param side    border side constant
 */
private void updateBorderBasedOnWidth(float width, int side) {
  useVariableBorders = true;
  if (width > 0)
    enableBorderSide(side);
  else
    disableBorderSide(side);
}

代码示例来源:origin: fr.opensagres.xdocreport.itext-gae/itext-gae

/**
 * Helper function updating the border flag for a side
 * based on the specified width.
 * A width of 0 will disable the border on that side.
 * Any other width enables it.
 * 
 * @param width    width of border
 * @param side    border side constant
 */
private void updateBorderBasedOnWidth(float width, int side) {
  useVariableBorders = true;
  if (width > 0)
    enableBorderSide(side);
  else
    disableBorderSide(side);
}

代码示例来源:origin: fr.opensagres.xdocreport.itext-gae/itext-gae

/**
 * Gets a Rectangle that is altered to fit on the page.
 * 
 * @param top        the top position
 * @param bottom    the bottom position
 * @return a <CODE>Rectangle</CODE>
 */
public Rectangle rectangle(float top, float bottom) {
  Rectangle tmp = new Rectangle(this);
  if (getTop() > top) {
    tmp.setTop(top);
    tmp.disableBorderSide(TOP);
  }
  if (getBottom() < bottom) {
    tmp.setBottom(bottom);
    tmp.disableBorderSide(BOTTOM);
  }
  return tmp;
}

代码示例来源:origin: es.gob.afirma/afirma-crypto-pdf-itext

/**
 * Gets a Rectangle that is altered to fit on the page.
 * 
 * @param top        the top position
 * @param bottom    the bottom position
 * @return a <CODE>Rectangle</CODE>
 */
public Rectangle rectangle(float top, float bottom) {
  Rectangle tmp = new Rectangle(this);
  if (getTop() > top) {
    tmp.setTop(top);
    tmp.disableBorderSide(TOP);
  }
  if (getBottom() < bottom) {
    tmp.setBottom(bottom);
    tmp.disableBorderSide(BOTTOM);
  }
  return tmp;
}

代码示例来源:origin: com.github.librepdf/openpdf

/**
 * Gets a Rectangle that is altered to fit on the page.
 * 
 * @param top
 *          the top position
 * @param bottom
 *          the bottom position
 * @return a <CODE>Rectangle</CODE>
 */
public Rectangle rectangle(float top, float bottom) {
 Rectangle tmp = new Rectangle(this);
 if (getTop() > top) {
  tmp.setTop(top);
  tmp.disableBorderSide(TOP);
 }
 if (getBottom() < bottom) {
  tmp.setBottom(bottom);
  tmp.disableBorderSide(BOTTOM);
 }
 return tmp;
}

相关文章

微信公众号

最新文章

更多