@Beta public class CellCopyPolicy extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
CellCopyPolicy.Builder |
Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_CONDENSE_ROWS_POLICY |
static boolean |
DEFAULT_COPY_CELL_FORMULA_POLICY |
static boolean |
DEFAULT_COPY_CELL_STYLE_POLICY |
static boolean |
DEFAULT_COPY_CELL_VALUE_POLICY |
static boolean |
DEFAULT_COPY_HYPERLINK_POLICY |
static boolean |
DEFAULT_COPY_MERGED_REGIONS_POLICY |
static boolean |
DEFAULT_COPY_ROW_HEIGHT_POLICY |
static boolean |
DEFAULT_MERGE_HYPERLINK_POLICY |
Constructor and Description |
---|
CellCopyPolicy()
Default CellCopyPolicy, uses default policy For custom CellCopyPolicy, use
CellCopyPolicy.Builder class
|
CellCopyPolicy(CellCopyPolicy other)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
CellCopyPolicy.Builder |
createBuilder() |
boolean |
isCondenseRows()
If condenseRows is true, a discontinuities in srcRows will be removed when copied to destination For example: Sheet.copyRows({Row(1), Row(2), Row(5)}, 11, policy) results in rows 1, 2, and 5 being copied to rows 11, 12, and 13 if condenseRows is True, or rows 11, 11, 15 if condenseRows is false
(如果 condenseRows 为真,则 srcRows 中的不连续性将在复制到目标时被删除 例如:Sheet.copyRows({Row(1), Row(2), Row(5)}, 11, policy) 导致第 1、2 行, 如果 condenseRows 为 True,则将 5 复制到第 11、12 和 13 行,如果 condenseRows 为 false,则复制到第 11、11、15 行)
|
boolean |
isCopyCellFormula() |
boolean |
isCopyCellStyle() |
boolean |
isCopyCellValue() |
boolean |
isCopyHyperlink() |
boolean |
isCopyMergedRegions() |
boolean |
isCopyRowHeight() |
boolean |
isMergeHyperlink() |
void |
setCondenseRows(boolean condenseRows) |
void |
setCopyCellFormula(boolean copyCellFormula) |
void |
setCopyCellStyle(boolean copyCellStyle) |
void |
setCopyCellValue(boolean copyCellValue) |
void |
setCopyHyperlink(boolean copyHyperlink) |
void |
setCopyMergedRegions(boolean copyMergedRegions) |
void |
setCopyRowHeight(boolean copyRowHeight) |
void |
setMergeHyperlink(boolean mergeHyperlink) |
public static final boolean DEFAULT_COPY_CELL_VALUE_POLICY
public static final boolean DEFAULT_COPY_CELL_STYLE_POLICY
public static final boolean DEFAULT_COPY_CELL_FORMULA_POLICY
public static final boolean DEFAULT_COPY_HYPERLINK_POLICY
public static final boolean DEFAULT_MERGE_HYPERLINK_POLICY
public static final boolean DEFAULT_COPY_ROW_HEIGHT_POLICY
public static final boolean DEFAULT_CONDENSE_ROWS_POLICY
public static final boolean DEFAULT_COPY_MERGED_REGIONS_POLICY
public CellCopyPolicy()
CellCopyPolicy.Builder
class
(默认 CellCopyPolicy,使用默认策略 对于自定义 CellCopyPolicy,使用 CellCopyPolicy.Builder 类)
public CellCopyPolicy(CellCopyPolicy other)
other
- policy to copy
(其他 - 要复制的策略)
public CellCopyPolicy.Builder createBuilder()
public boolean isCopyCellValue()
public void setCopyCellValue(boolean copyCellValue)
copyCellValue
- the copyCellValue to set
(copyCellValue - 要设置的 copyCellValue)
public boolean isCopyCellStyle()
public void setCopyCellStyle(boolean copyCellStyle)
copyCellStyle
- the copyCellStyle to set
(copyCellStyle - 要设置的 copyCellStyle)
public boolean isCopyCellFormula()
public void setCopyCellFormula(boolean copyCellFormula)
copyCellFormula
- the copyCellFormula to set
(copyCellFormula - 要设置的 copyCellFormula)
public boolean isCopyHyperlink()
public void setCopyHyperlink(boolean copyHyperlink)
copyHyperlink
- the copyHyperlink to set
(copyHyperlink - 要设置的 copyHyperlink)
public boolean isMergeHyperlink()
public void setMergeHyperlink(boolean mergeHyperlink)
mergeHyperlink
- the mergeHyperlink to set
(mergeHyperlink - 要设置的 mergeHyperlink)
public boolean isCopyRowHeight()
public void setCopyRowHeight(boolean copyRowHeight)
copyRowHeight
- the copyRowHeight to set
(copyRowHeight - 要设置的 copyRowHeight)
public boolean isCondenseRows()
public void setCondenseRows(boolean condenseRows)
condenseRows
- the condenseRows to set
(condenseRows - 要设置的 condenseRows)
public boolean isCopyMergedRegions()
public void setCopyMergedRegions(boolean copyMergedRegions)
copyMergedRegions
- the copyMergedRegions to set
(copyMergedRegions - 要设置的 copyMergedRegions)
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.