<property name="examples.src" location="src/examples/src"/>
<property name="examples.output.dir" location="build/examples-classes"/>
- <!-- Common interfaces for ole2 and ooxml classes -->
- <property name="interfaces.jdk15.src" location="src/ooxml/interfaces-jdk15"/>
-
- <!-- Experimental OOXML support: -->
+ <!-- OOXML support: -->
<property name="ooxml.src" location="src/ooxml/java"/>
<property name="ooxml.src.test" location="src/ooxml/testcases"/>
<property name="ooxml.reports.test" location="build/ooxml-test-results"/>
<javac target="${jdk.version.class}" source="${jdk.version.source}"
failonerror="true" destdir="${main.output.dir}" debug="on" fork="yes">
<src path="${main.src}" />
- <src path="${interfaces.jdk15.src}" />
<classpath refid="main.classpath"/>
</javac>
<javac target="${jdk.version.class}" source="${jdk.version.source}"
<packageset dir="${ooxml.src}" defaultexcludes="yes">
<include name="org/apache/poi/**"/>
</packageset>
- <packageset dir="${interfaces.jdk15.src}" defaultexcludes="yes">
- <include name="org/apache/poi/**"/>
- </packageset>
<classpath id="javadoc.classpath">
<path refid="main.classpath"/>
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+package org.apache.poi.common.usermodel;
+
+import java.awt.Color;
+
+public interface Fill {
+ public Color getColor();
+ public void setColor(Color color);
+}
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+package org.apache.poi.common.usermodel;
+
+/**
+ * Represents a hyperlink.
+ */
+public interface Hyperlink {
+ /**
+ * Link to a existing file or web page
+ */
+ public static final int LINK_URL = 1;
+
+ /**
+ * Link to a place in this document
+ */
+ public static final int LINK_DOCUMENT = 2;
+
+ /**
+ * Link to an E-mail address
+ */
+ public static final int LINK_EMAIL = 3;
+
+ /**
+ * Link to a file
+ */
+ public static final int LINK_FILE = 4;
+
+
+ /**
+ * Hypelink address. Depending on the hyperlink type it can be URL, e-mail, patrh to a file, etc.
+ *
+ * @return the address of this hyperlink
+ */
+ public String getAddress();
+
+ /**
+ * Hypelink address. Depending on the hyperlink type it can be URL, e-mail, patrh to a file, etc.
+ *
+ * @param address the address of this hyperlink
+ */
+ public void setAddress(String address);
+
+ /**
+ * Return text label for this hyperlink
+ *
+ * @return text to display
+ */
+ public String getLabel();
+
+ /**
+ * Sets text label for this hyperlink
+ *
+ * @param label text label for this hyperlink
+ */
+ public void setLabel(String label);
+
+ /**
+ * Return the type of this hyperlink
+ *
+ * @return the type of this hyperlink
+ */
+ public int getType();
+}
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+package org.apache.poi.common.usermodel;
+
+public interface LineStyle {
+
+}
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+package org.apache.poi.ss.extractor;
+
+/**
+ * Common interface for Excel text extractors, covering
+ * HSSF and XSSF
+ */
+public interface ExcelExtractor {
+ /**
+ * Should sheet names be included? Default is true
+ */
+ public void setIncludeSheetNames(boolean includeSheetNames);
+
+ /**
+ * Should we return the formula itself, and not
+ * the result it produces? Default is false
+ */
+ public void setFormulasNotResults(boolean formulasNotResults);
+
+ /**
+ * Should cell comments be included? Default is false
+ */
+ public void setIncludeCellComments(boolean includeCellComments);
+
+ /**
+ * Retreives the text contents of the file
+ */
+ public String getText();
+}
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+
+package org.apache.poi.ss.usermodel;
+
+/**
+ * The enumeration value indicating the line style of a border in a cell,
+ * i.e., whether it is borded dash dot, dash dot dot, dashed, dotted, double, hair, medium,
+ * medium dash dot, medium dash dot dot, medium dashed, none, slant dash dot, thick or thin.
+ */
+ public enum BorderStyle {
+
+ /**
+ * No border
+ */
+
+ NONE,
+
+ /**
+ * Thin border
+ */
+
+ THIN,
+
+ /**
+ * Medium border
+ */
+
+ MEDIUM,
+
+ /**
+ * dash border
+ */
+
+ DASHED,
+
+ /**
+ * dot border
+ */
+
+ HAIR,
+
+ /**
+ * Thick border
+ */
+
+ THICK,
+
+ /**
+ * double-line border
+ */
+
+ DOUBLE,
+
+ /**
+ * hair-line border
+ */
+
+ DOTTED,
+
+ /**
+ * Medium dashed border
+ */
+
+ MEDIUM_DASHED,
+
+ /**
+ * dash-dot border
+ */
+
+ DASH_DOT,
+
+ /**
+ * medium dash-dot border
+ */
+
+ MEDIUM_DASH_DOT,
+
+ /**
+ * dash-dot-dot border
+ */
+
+ DASH_DOT_DOT,
+
+ /**
+ * medium dash-dot-dot border
+ */
+
+ MEDIUM_DASH_DOT_DOTC,
+
+ /**
+ * slanted dash-dot border
+ */
+
+ SLANTED_DASH_DOT;
+
+}
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+
+package org.apache.poi.ss.usermodel;
+
+import java.util.Calendar;
+import java.util.Date;
+
+/**
+ * High level representation of a cell in a row of a spreadsheet.
+ * <p>
+ * Cells can be numeric, formula-based or string-based (text). The cell type
+ * specifies this. String cells cannot conatin numbers and numeric cells cannot
+ * contain strings (at least according to our model). Client apps should do the
+ * conversions themselves. Formula cells have the formula string, as well as
+ * the formula result, which can be numeric or string.
+ * </p>
+ * <p>
+ * Cells should have their number (0 based) before being added to a row.
+ * </p>
+ */
+public interface Cell {
+
+ /**
+ * Numeric Cell type (0)
+ * @see #setCellType(int)
+ * @see #getCellType()
+ */
+ public final static int CELL_TYPE_NUMERIC = 0;
+
+ /**
+ * String Cell type (1)
+ * @see #setCellType(int)
+ * @see #getCellType()
+ */
+ public final static int CELL_TYPE_STRING = 1;
+
+ /**
+ * Formula Cell type (2)
+ * @see #setCellType(int)
+ * @see #getCellType()
+ */
+ public final static int CELL_TYPE_FORMULA = 2;
+
+ /**
+ * Blank Cell type (3)
+ * @see #setCellType(int)
+ * @see #getCellType()
+ */
+ public final static int CELL_TYPE_BLANK = 3;
+
+ /**
+ * Boolean Cell type (4)
+ * @see #setCellType(int)
+ * @see #getCellType()
+ */
+ public final static int CELL_TYPE_BOOLEAN = 4;
+
+ /**
+ * Error Cell type (5)
+ * @see #setCellType(int)
+ * @see #getCellType()
+ */
+ public final static int CELL_TYPE_ERROR = 5;
+
+ /**
+ * Returns column index of this cell
+ *
+ * @return zero-based column index of a column in a sheet.
+ */
+ int getColumnIndex();
+
+ /**
+ * Returns row index of a row in the sheet that contains this cell
+ *
+ * @return zero-based row index of a row in the sheet that contains this cell
+ */
+ int getRowIndex();
+
+ /**
+ * Returns the sheet this cell belongs to
+ *
+ * @return the sheet this cell belongs to
+ */
+ Sheet getSheet();
+
+ /**
+ * Returns the Row this cell belongs to
+ *
+ * @return the Row that owns this cell
+ */
+ Row getRow();
+
+ /**
+ * Set the cells type (numeric, formula or string)
+ *
+ * @throws IllegalArgumentException if the specified cell type is invalid
+ * @see #CELL_TYPE_NUMERIC
+ * @see #CELL_TYPE_STRING
+ * @see #CELL_TYPE_FORMULA
+ * @see #CELL_TYPE_BLANK
+ * @see #CELL_TYPE_BOOLEAN
+ * @see #CELL_TYPE_ERROR
+ */
+ void setCellType(int cellType);
+
+ /**
+ * Return the cell type.
+ *
+ * @return the cell type
+ * @see Cell#CELL_TYPE_BLANK
+ * @see Cell#CELL_TYPE_NUMERIC
+ * @see Cell#CELL_TYPE_STRING
+ * @see Cell#CELL_TYPE_FORMULA
+ * @see Cell#CELL_TYPE_BOOLEAN
+ * @see Cell#CELL_TYPE_ERROR
+ */
+ int getCellType();
+
+ /**
+ * Only valid for formula cells
+ * @return one of ({@link #CELL_TYPE_NUMERIC}, {@link #CELL_TYPE_STRING},
+ * {@link #CELL_TYPE_BOOLEAN}, {@link #CELL_TYPE_ERROR}) depending
+ * on the cached value of the formula
+ */
+ int getCachedFormulaResultType();
+
+ /**
+ * Set a numeric value for the cell
+ *
+ * @param value the numeric value to set this cell to. For formulas we'll set the
+ * precalculated value, for numerics we'll set its value. For other types we
+ * will change the cell to a numeric cell and set its value.
+ */
+ void setCellValue(double value);
+
+ /**
+ * Set a boolean value for the cell
+ *
+ * @param value the boolean value to set this cell to. For formulas we'll set the
+ * precalculated value, for booleans we'll set its value. For other types we
+ * will change the cell to a boolean cell and set its value.
+ */
+ void setCellValue(Date value);
+
+ /**
+ * Set a date value for the cell. Excel treats dates as numeric so you will need to format the cell as
+ * a date.
+ * <p>
+ * This will set the cell value based on the Calendar's timezone. As Excel
+ * does not support timezones this means that both 20:00+03:00 and
+ * 20:00-03:00 will be reported as the same value (20:00) even that there
+ * are 6 hours difference between the two times. This difference can be
+ * preserved by using <code>setCellValue(value.getTime())</code> which will
+ * automatically shift the times to the default timezone.
+ * </p>
+ *
+ * @param value the date value to set this cell to. For formulas we'll set the
+ * precalculated value, for numerics we'll set its value. For othertypes we
+ * will change the cell to a numeric cell and set its value.
+ */
+ void setCellValue(Calendar value);
+
+ /**
+ * Set a rich string value for the cell.
+ *
+ * @param value value to set the cell to. For formulas we'll set the formula
+ * string, for String cells we'll set its value. For other types we will
+ * change the cell to a string cell and set its value.
+ * If value is null then we will change the cell to a Blank cell.
+ */
+ void setCellValue(RichTextString value);
+
+ /**
+ * Set a string value for the cell.
+ *
+ * @param value value to set the cell to. For formulas we'll set the formula
+ * string, for String cells we'll set its value. For other types we will
+ * change the cell to a string cell and set its value.
+ * If value is null then we will change the cell to a Blank cell.
+ */
+ void setCellValue(String value);
+
+ /**
+ * Sets formula for this cell.
+ * <p>
+ * Note, this method only sets the formula string and does not calculate the formula value.
+ * To set the precalculated value use {@link #setCellValue(double)} or {@link #setCellValue(String)}
+ * </p>
+ *
+ * @param formula the formula to set, e.g. <code>SUM(C4:E4)</code>.
+ * If the argument is <code>null</code> then the current formula is removed.
+ * @throws IllegalArgumentException if the formula is unparsable
+ */
+ void setCellFormula(String formula);
+
+ /**
+ * Return a formula for the cell, for example, <code>SUM(C4:E4)</code>
+ *
+ * @return a formula for the cell
+ * @throws IllegalStateException if the cell type returned by {@link #getCellType()} is not CELL_TYPE_FORMULA
+ */
+ String getCellFormula();
+
+ /**
+ * Get the value of the cell as a number.
+ * <p>
+ * For strings we throw an exception. For blank cells we return a 0.
+ * For formulas or error cells we return the precalculated value;
+ * </p>
+ * @return the value of the cell as a number
+ * @throws IllegalStateException if the cell type returned by {@link #getCellType()} is CELL_TYPE_STRING
+ * @exception NumberFormatException if the cell value isn't a parsable <code>double</code>.
+ * @see DataFormatter for turning this number into a string similar to that which Excel would render this number as.
+ */
+ double getNumericCellValue();
+
+ /**
+ * Get the value of the cell as a date.
+ * <p>
+ * For strings we throw an exception. For blank cells we return a null.
+ * </p>
+ * @return the value of the cell as a date
+ * @throws IllegalStateException if the cell type returned by {@link #getCellType()} is CELL_TYPE_STRING
+ * @exception NumberFormatException if the cell value isn't a parsable <code>double</code>.
+ * @see DataFormatter for formatting this date into a string similar to how excel does.
+ */
+ Date getDateCellValue();
+
+ /**
+ * Get the value of the cell as a XSSFRichTextString
+ * <p>
+ * For numeric cells we throw an exception. For blank cells we return an empty string.
+ * For formula cells we return the pre-calculated value.
+ * </p>
+ * @return the value of the cell as a XSSFRichTextString
+ */
+ RichTextString getRichStringCellValue();
+
+ /**
+ * Get the value of the cell as a string
+ * <p>
+ * For numeric cells we throw an exception. For blank cells we return an empty string.
+ * For formulaCells that are not string Formulas, we return empty String.
+ * </p>
+ * @return the value of the cell as a string
+ */
+ String getStringCellValue();
+
+ /**
+ * Set a boolean value for the cell
+ *
+ * @param value the boolean value to set this cell to. For formulas we'll set the
+ * precalculated value, for booleans we'll set its value. For other types we
+ * will change the cell to a boolean cell and set its value.
+ */
+ void setCellValue(boolean value);
+
+ /**
+ * Set a error value for the cell
+ *
+ * @param value the error value to set this cell to. For formulas we'll set the
+ * precalculated value , for errors we'll set
+ * its value. For other types we will change the cell to an error
+ * cell and set its value.
+ * @see FormulaError
+ */
+ void setCellErrorValue(byte value);
+
+ /**
+ * Get the value of the cell as a boolean.
+ * <p>
+ * For strings, numbers, and errors, we throw an exception. For blank cells we return a false.
+ * </p>
+ * @return the value of the cell as a boolean
+ * @throws IllegalStateException if the cell type returned by {@link #getCellType()}
+ * is not CELL_TYPE_BOOLEAN, CELL_TYPE_BLANK or CELL_TYPE_FORMULA
+ */
+ boolean getBooleanCellValue();
+
+ /**
+ * Get the value of the cell as an error code.
+ * <p>
+ * For strings, numbers, and booleans, we throw an exception.
+ * For blank cells we return a 0.
+ * </p>
+ *
+ * @return the value of the cell as an error code
+ * @throws IllegalStateException if the cell type returned by {@link #getCellType()} isn't CELL_TYPE_ERROR
+ * @see FormulaError for error codes
+ */
+ byte getErrorCellValue();
+
+ /**
+ * Set the style for the cell. The style should be an CellStyle created/retreived from
+ * the Workbook.
+ *
+ * @param style reference contained in the workbook.
+ * If the value is null then the style information is removed causing the cell to used the default workbook style.
+ * @see org.apache.poi.ss.usermodel.Workbook#createCellStyle()
+ */
+ void setCellStyle(CellStyle style);
+
+ /**
+ * Return the cell's style.
+ *
+ * @return the cell's style. Always not-null. Default cell style has zero index and can be obtained as
+ * <code>workbook.getCellStyleAt(0)</code>
+ * @see Workbook#getCellStyleAt(short)
+ */
+ CellStyle getCellStyle();
+
+ /**
+ * Sets this cell as the active cell for the worksheet
+ */
+ void setAsActiveCell();
+
+ /**
+ * Assign a comment to this cell
+ *
+ * @param comment comment associated with this cell
+ */
+ void setCellComment(Comment comment);
+
+ /**
+ * Returns comment associated with this cell
+ *
+ * @return comment associated with this cell or <code>null</code> if not found
+ */
+ Comment getCellComment();
+
+ /**
+ * Returns hyperlink associated with this cell
+ *
+ * @return hyperlink associated with this cell or <code>null</code> if not found
+ */
+ Hyperlink getHyperlink();
+
+ /**
+ * Assign a hypelrink to this cell
+ *
+ * @param link hypelrink associated with this cell
+ */
+ void setHyperlink(Hyperlink link);
+}
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+
+package org.apache.poi.ss.usermodel;
+
+public interface CellStyle {
+
+ /**
+ * general (normal) horizontal alignment
+ */
+
+ public final static short ALIGN_GENERAL = 0x0;
+
+ /**
+ * left-justified horizontal alignment
+ */
+
+ public final static short ALIGN_LEFT = 0x1;
+
+ /**
+ * center horizontal alignment
+ */
+
+ public final static short ALIGN_CENTER = 0x2;
+
+ /**
+ * right-justified horizontal alignment
+ */
+
+ public final static short ALIGN_RIGHT = 0x3;
+
+ /**
+ * fill? horizontal alignment
+ */
+
+ public final static short ALIGN_FILL = 0x4;
+
+ /**
+ * justified horizontal alignment
+ */
+
+ public final static short ALIGN_JUSTIFY = 0x5;
+
+ /**
+ * center-selection? horizontal alignment
+ */
+
+ public final static short ALIGN_CENTER_SELECTION = 0x6;
+
+ /**
+ * top-aligned vertical alignment
+ */
+
+ public final static short VERTICAL_TOP = 0x0;
+
+ /**
+ * center-aligned vertical alignment
+ */
+
+ public final static short VERTICAL_CENTER = 0x1;
+
+ /**
+ * bottom-aligned vertical alignment
+ */
+
+ public final static short VERTICAL_BOTTOM = 0x2;
+
+ /**
+ * vertically justified vertical alignment
+ */
+
+ public final static short VERTICAL_JUSTIFY = 0x3;
+
+ /**
+ * No border
+ */
+
+ public final static short BORDER_NONE = 0x0;
+
+ /**
+ * Thin border
+ */
+
+ public final static short BORDER_THIN = 0x1;
+
+ /**
+ * Medium border
+ */
+
+ public final static short BORDER_MEDIUM = 0x2;
+
+ /**
+ * dash border
+ */
+
+ public final static short BORDER_DASHED = 0x3;
+
+ /**
+ * dot border
+ */
+
+ public final static short BORDER_HAIR = 0x4;
+
+ /**
+ * Thick border
+ */
+
+ public final static short BORDER_THICK = 0x5;
+
+ /**
+ * double-line border
+ */
+
+ public final static short BORDER_DOUBLE = 0x6;
+
+ /**
+ * hair-line border
+ */
+
+ public final static short BORDER_DOTTED = 0x7;
+
+ /**
+ * Medium dashed border
+ */
+
+ public final static short BORDER_MEDIUM_DASHED = 0x8;
+
+ /**
+ * dash-dot border
+ */
+
+ public final static short BORDER_DASH_DOT = 0x9;
+
+ /**
+ * medium dash-dot border
+ */
+
+ public final static short BORDER_MEDIUM_DASH_DOT = 0xA;
+
+ /**
+ * dash-dot-dot border
+ */
+
+ public final static short BORDER_DASH_DOT_DOT = 0xB;
+
+ /**
+ * medium dash-dot-dot border
+ */
+
+ public final static short BORDER_MEDIUM_DASH_DOT_DOT = 0xC;
+
+ /**
+ * slanted dash-dot border
+ */
+
+ public final static short BORDER_SLANTED_DASH_DOT = 0xD;
+
+ /** No background */
+ public final static short NO_FILL = 0;
+
+ /** Solidly filled */
+ public final static short SOLID_FOREGROUND = 1;
+
+ /** Small fine dots */
+ public final static short FINE_DOTS = 2;
+
+ /** Wide dots */
+ public final static short ALT_BARS = 3;
+
+ /** Sparse dots */
+ public final static short SPARSE_DOTS = 4;
+
+ /** Thick horizontal bands */
+ public final static short THICK_HORZ_BANDS = 5;
+
+ /** Thick vertical bands */
+ public final static short THICK_VERT_BANDS = 6;
+
+ /** Thick backward facing diagonals */
+ public final static short THICK_BACKWARD_DIAG = 7;
+
+ /** Thick forward facing diagonals */
+ public final static short THICK_FORWARD_DIAG = 8;
+
+ /** Large spots */
+ public final static short BIG_SPOTS = 9;
+
+ /** Brick-like layout */
+ public final static short BRICKS = 10;
+
+ /** Thin horizontal bands */
+ public final static short THIN_HORZ_BANDS = 11;
+
+ /** Thin vertical bands */
+ public final static short THIN_VERT_BANDS = 12;
+
+ /** Thin backward diagonal */
+ public final static short THIN_BACKWARD_DIAG = 13;
+
+ /** Thin forward diagonal */
+ public final static short THIN_FORWARD_DIAG = 14;
+
+ /** Squares */
+ public final static short SQUARES = 15;
+
+ /** Diamonds */
+ public final static short DIAMONDS = 16;
+
+ /** Less Dots */
+ public final static short LESS_DOTS = 17;
+
+ /** Least Dots */
+ public final static short LEAST_DOTS = 18;
+
+ /**
+ * get the index within the Workbook (sequence within the collection of ExtnededFormat objects)
+ * @return unique index number of the underlying record this style represents (probably you don't care
+ * unless you're comparing which one is which)
+ */
+
+ short getIndex();
+
+ /**
+ * set the data format (must be a valid format)
+ * @see DataFormat
+ */
+
+ void setDataFormat(short fmt);
+
+ /**
+ * get the index of the format
+ * @see DataFormat
+ */
+ short getDataFormat();
+
+ /**
+ * Get the format string
+ */
+ public String getDataFormatString();
+
+ /**
+ * set the font for this style
+ * @param font a font object created or retreived from the Workbook object
+ * @see Workbook#createFont()
+ * @see Workbook#getFontAt(short)
+ */
+
+ void setFont(Font font);
+
+ /**
+ * gets the index of the font for this style
+ * @see Workbook#getFontAt(short)
+ */
+ short getFontIndex();
+
+ /**
+ * set the cell's using this style to be hidden
+ * @param hidden - whether the cell using this style should be hidden
+ */
+
+ void setHidden(boolean hidden);
+
+ /**
+ * get whether the cell's using this style are to be hidden
+ * @return hidden - whether the cell using this style should be hidden
+ */
+
+ boolean getHidden();
+
+ /**
+ * set the cell's using this style to be locked
+ * @param locked - whether the cell using this style should be locked
+ */
+
+ void setLocked(boolean locked);
+
+ /**
+ * get whether the cell's using this style are to be locked
+ * @return hidden - whether the cell using this style should be locked
+ */
+
+ boolean getLocked();
+
+ /**
+ * set the type of horizontal alignment for the cell
+ * @param align - the type of alignment
+ * @see #ALIGN_GENERAL
+ * @see #ALIGN_LEFT
+ * @see #ALIGN_CENTER
+ * @see #ALIGN_RIGHT
+ * @see #ALIGN_FILL
+ * @see #ALIGN_JUSTIFY
+ * @see #ALIGN_CENTER_SELECTION
+ */
+
+ void setAlignment(short align);
+
+ /**
+ * get the type of horizontal alignment for the cell
+ * @return align - the type of alignment
+ * @see #ALIGN_GENERAL
+ * @see #ALIGN_LEFT
+ * @see #ALIGN_CENTER
+ * @see #ALIGN_RIGHT
+ * @see #ALIGN_FILL
+ * @see #ALIGN_JUSTIFY
+ * @see #ALIGN_CENTER_SELECTION
+ */
+
+ short getAlignment();
+
+ /**
+ * Set whether the text should be wrapped.
+ * Setting this flag to <code>true</code> make all content visible
+ * whithin a cell by displaying it on multiple lines
+ *
+ * @param wrapped wrap text or not
+ */
+
+ void setWrapText(boolean wrapped);
+
+ /**
+ * get whether the text should be wrapped
+ * @return wrap text or not
+ */
+
+ boolean getWrapText();
+
+ /**
+ * set the type of vertical alignment for the cell
+ * @param align the type of alignment
+ * @see #VERTICAL_TOP
+ * @see #VERTICAL_CENTER
+ * @see #VERTICAL_BOTTOM
+ * @see #VERTICAL_JUSTIFY
+ */
+
+ void setVerticalAlignment(short align);
+
+ /**
+ * get the type of vertical alignment for the cell
+ * @return align the type of alignment
+ * @see #VERTICAL_TOP
+ * @see #VERTICAL_CENTER
+ * @see #VERTICAL_BOTTOM
+ * @see #VERTICAL_JUSTIFY
+ */
+
+ short getVerticalAlignment();
+
+ /**
+ * set the degree of rotation for the text in the cell
+ * @param rotation degrees (between -90 and 90 degrees)
+ */
+
+ void setRotation(short rotation);
+
+ /**
+ * get the degree of rotation for the text in the cell
+ * @return rotation degrees (between -90 and 90 degrees)
+ */
+
+ short getRotation();
+
+ /**
+ * set the number of spaces to indent the text in the cell
+ * @param indent - number of spaces
+ */
+
+ void setIndention(short indent);
+
+ /**
+ * get the number of spaces to indent the text in the cell
+ * @return indent - number of spaces
+ */
+
+ short getIndention();
+
+ /**
+ * set the type of border to use for the left border of the cell
+ * @param border type
+ * @see #BORDER_NONE
+ * @see #BORDER_THIN
+ * @see #BORDER_MEDIUM
+ * @see #BORDER_DASHED
+ * @see #BORDER_DOTTED
+ * @see #BORDER_THICK
+ * @see #BORDER_DOUBLE
+ * @see #BORDER_HAIR
+ * @see #BORDER_MEDIUM_DASHED
+ * @see #BORDER_DASH_DOT
+ * @see #BORDER_MEDIUM_DASH_DOT
+ * @see #BORDER_DASH_DOT_DOT
+ * @see #BORDER_MEDIUM_DASH_DOT_DOT
+ * @see #BORDER_SLANTED_DASH_DOT
+ */
+
+ void setBorderLeft(short border);
+
+ /**
+ * get the type of border to use for the left border of the cell
+ * @return border type
+ * @see #BORDER_NONE
+ * @see #BORDER_THIN
+ * @see #BORDER_MEDIUM
+ * @see #BORDER_DASHED
+ * @see #BORDER_DOTTED
+ * @see #BORDER_THICK
+ * @see #BORDER_DOUBLE
+ * @see #BORDER_HAIR
+ * @see #BORDER_MEDIUM_DASHED
+ * @see #BORDER_DASH_DOT
+ * @see #BORDER_MEDIUM_DASH_DOT
+ * @see #BORDER_DASH_DOT_DOT
+ * @see #BORDER_MEDIUM_DASH_DOT_DOT
+ * @see #BORDER_SLANTED_DASH_DOT
+ */
+
+ short getBorderLeft();
+
+ /**
+ * set the type of border to use for the right border of the cell
+ * @param border type
+ * @see #BORDER_NONE
+ * @see #BORDER_THIN
+ * @see #BORDER_MEDIUM
+ * @see #BORDER_DASHED
+ * @see #BORDER_DOTTED
+ * @see #BORDER_THICK
+ * @see #BORDER_DOUBLE
+ * @see #BORDER_HAIR
+ * @see #BORDER_MEDIUM_DASHED
+ * @see #BORDER_DASH_DOT
+ * @see #BORDER_MEDIUM_DASH_DOT
+ * @see #BORDER_DASH_DOT_DOT
+ * @see #BORDER_MEDIUM_DASH_DOT_DOT
+ * @see #BORDER_SLANTED_DASH_DOT
+ */
+
+ void setBorderRight(short border);
+
+ /**
+ * get the type of border to use for the right border of the cell
+ * @return border type
+ * @see #BORDER_NONE
+ * @see #BORDER_THIN
+ * @see #BORDER_MEDIUM
+ * @see #BORDER_DASHED
+ * @see #BORDER_DOTTED
+ * @see #BORDER_THICK
+ * @see #BORDER_DOUBLE
+ * @see #BORDER_HAIR
+ * @see #BORDER_MEDIUM_DASHED
+ * @see #BORDER_DASH_DOT
+ * @see #BORDER_MEDIUM_DASH_DOT
+ * @see #BORDER_DASH_DOT_DOT
+ * @see #BORDER_MEDIUM_DASH_DOT_DOT
+ * @see #BORDER_SLANTED_DASH_DOT
+ */
+
+ short getBorderRight();
+
+ /**
+ * set the type of border to use for the top border of the cell
+ * @param border type
+ * @see #BORDER_NONE
+ * @see #BORDER_THIN
+ * @see #BORDER_MEDIUM
+ * @see #BORDER_DASHED
+ * @see #BORDER_DOTTED
+ * @see #BORDER_THICK
+ * @see #BORDER_DOUBLE
+ * @see #BORDER_HAIR
+ * @see #BORDER_MEDIUM_DASHED
+ * @see #BORDER_DASH_DOT
+ * @see #BORDER_MEDIUM_DASH_DOT
+ * @see #BORDER_DASH_DOT_DOT
+ * @see #BORDER_MEDIUM_DASH_DOT_DOT
+ * @see #BORDER_SLANTED_DASH_DOT
+ */
+
+ void setBorderTop(short border);
+
+ /**
+ * get the type of border to use for the top border of the cell
+ * @return border type
+ * @see #BORDER_NONE
+ * @see #BORDER_THIN
+ * @see #BORDER_MEDIUM
+ * @see #BORDER_DASHED
+ * @see #BORDER_DOTTED
+ * @see #BORDER_THICK
+ * @see #BORDER_DOUBLE
+ * @see #BORDER_HAIR
+ * @see #BORDER_MEDIUM_DASHED
+ * @see #BORDER_DASH_DOT
+ * @see #BORDER_MEDIUM_DASH_DOT
+ * @see #BORDER_DASH_DOT_DOT
+ * @see #BORDER_MEDIUM_DASH_DOT_DOT
+ * @see #BORDER_SLANTED_DASH_DOT
+ */
+
+ short getBorderTop();
+
+ /**
+ * set the type of border to use for the bottom border of the cell
+ * @param border type
+ * @see #BORDER_NONE
+ * @see #BORDER_THIN
+ * @see #BORDER_MEDIUM
+ * @see #BORDER_DASHED
+ * @see #BORDER_DOTTED
+ * @see #BORDER_THICK
+ * @see #BORDER_DOUBLE
+ * @see #BORDER_HAIR
+ * @see #BORDER_MEDIUM_DASHED
+ * @see #BORDER_DASH_DOT
+ * @see #BORDER_MEDIUM_DASH_DOT
+ * @see #BORDER_DASH_DOT_DOT
+ * @see #BORDER_MEDIUM_DASH_DOT_DOT
+ * @see #BORDER_SLANTED_DASH_DOT
+ */
+
+ void setBorderBottom(short border);
+
+ /**
+ * get the type of border to use for the bottom border of the cell
+ * @return border type
+ * @see #BORDER_NONE
+ * @see #BORDER_THIN
+ * @see #BORDER_MEDIUM
+ * @see #BORDER_DASHED
+ * @see #BORDER_DOTTED
+ * @see #BORDER_THICK
+ * @see #BORDER_DOUBLE
+ * @see #BORDER_HAIR
+ * @see #BORDER_MEDIUM_DASHED
+ * @see #BORDER_DASH_DOT
+ * @see #BORDER_MEDIUM_DASH_DOT
+ * @see #BORDER_DASH_DOT_DOT
+ * @see #BORDER_MEDIUM_DASH_DOT_DOT
+ * @see #BORDER_SLANTED_DASH_DOT
+ */
+ short getBorderBottom();
+
+ /**
+ * set the color to use for the left border
+ * @param color The index of the color definition
+ */
+ void setLeftBorderColor(short color);
+
+ /**
+ * get the color to use for the left border
+ */
+ short getLeftBorderColor();
+
+ /**
+ * set the color to use for the right border
+ * @param color The index of the color definition
+ */
+ void setRightBorderColor(short color);
+
+ /**
+ * get the color to use for the left border
+ * @return the index of the color definition
+ */
+ short getRightBorderColor();
+
+ /**
+ * set the color to use for the top border
+ * @param color The index of the color definition
+ */
+ void setTopBorderColor(short color);
+
+ /**
+ * get the color to use for the top border
+ * @return hhe index of the color definition
+ */
+ short getTopBorderColor();
+
+ /**
+ * set the color to use for the bottom border
+ * @param color The index of the color definition
+ */
+ void setBottomBorderColor(short color);
+
+ /**
+ * get the color to use for the left border
+ * @return the index of the color definition
+ */
+ short getBottomBorderColor();
+
+ /**
+ * setting to one fills the cell with the foreground color... No idea about
+ * other values
+ *
+ * @see #NO_FILL
+ * @see #SOLID_FOREGROUND
+ * @see #FINE_DOTS
+ * @see #ALT_BARS
+ * @see #SPARSE_DOTS
+ * @see #THICK_HORZ_BANDS
+ * @see #THICK_VERT_BANDS
+ * @see #THICK_BACKWARD_DIAG
+ * @see #THICK_FORWARD_DIAG
+ * @see #BIG_SPOTS
+ * @see #BRICKS
+ * @see #THIN_HORZ_BANDS
+ * @see #THIN_VERT_BANDS
+ * @see #THIN_BACKWARD_DIAG
+ * @see #THIN_FORWARD_DIAG
+ * @see #SQUARES
+ * @see #DIAMONDS
+ *
+ * @param fp fill pattern (set to 1 to fill w/foreground color)
+ */
+ void setFillPattern(short fp);
+
+ /**
+ * get the fill pattern (??) - set to 1 to fill with foreground color
+ * @return fill pattern
+ */
+
+ short getFillPattern();
+
+ /**
+ * set the background fill color.
+ *
+ * @param bg color
+ */
+
+ void setFillBackgroundColor(short bg);
+
+ /**
+ * get the background fill color
+ * @return fill color
+ */
+ short getFillBackgroundColor();
+
+ /**
+ * set the foreground fill color
+ * <i>Note: Ensure Foreground color is set prior to background color.</i>
+ * @param bg color
+ */
+ void setFillForegroundColor(short bg);
+
+ /**
+ * get the foreground fill color
+ * @return fill color
+ */
+ short getFillForegroundColor();
+
+ /**
+ * Clones all the style information from another
+ * CellStyle, onto this one. This
+ * CellStyle will then have all the same
+ * properties as the source, but the two may
+ * be edited independently.
+ * Any stylings on this CellStyle will be lost!
+ *
+ * The source CellStyle could be from another
+ * Workbook if you like. This allows you to
+ * copy styles from one Workbook to another.
+ *
+ * However, both of the CellStyles will need
+ * to be of the same type (HSSFCellStyle or
+ * XSSFCellStyle)
+ */
+ public void cloneStyleFrom(CellStyle source);
+}
--- /dev/null
+/* ====================================================================\r
+ Licensed to the Apache Software Foundation (ASF) under one or more\r
+ contributor license agreements. See the NOTICE file distributed with\r
+ this work for additional information regarding copyright ownership.\r
+ The ASF licenses this file to You under the Apache License, Version 2.0\r
+ (the "License"); you may not use this file except in compliance with\r
+ the License. You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+ Unless required by applicable law or agreed to in writing, software\r
+ distributed under the License is distributed on an "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ See the License for the specific language governing permissions and\r
+ limitations under the License.\r
+==================================================================== */\r
+package org.apache.poi.ss.usermodel;\r
+\r
+/**\r
+ * A client anchor is attached to an excel worksheet. It anchors against a\r
+ * top-left and bottom-right cell.\r
+ *\r
+ * @author Yegor Kozlov\r
+ */\r
+public interface ClientAnchor {\r
+ /**\r
+ * Move and Resize With Anchor Cells\r
+ * <p>\r
+ * Specifies that the current drawing shall move and\r
+ * resize to maintain its row and column anchors (i.e. the\r
+ * object is anchored to the actual from and to row and column)\r
+ * </p>\r
+ */\r
+ public static final int MOVE_AND_RESIZE = 0;\r
+\r
+ /**\r
+ * Move With Cells but Do Not Resize\r
+ * <p>\r
+ * Specifies that the current drawing shall move with its\r
+ * row and column (i.e. the object is anchored to the\r
+ * actual from row and column), but that the size shall remain absolute.\r
+ * </p>\r
+ * <p>\r
+ * If additional rows/columns are added between the from and to locations of the drawing,\r
+ * the drawing shall move its to anchors as needed to maintain this same absolute size.\r
+ * </p>\r
+ */\r
+ public static final int MOVE_DONT_RESIZE = 2;\r
+\r
+ /**\r
+ * Do Not Move or Resize With Underlying Rows/Columns\r
+ * <p>\r
+ * Specifies that the current start and end positions shall\r
+ * be maintained with respect to the distances from the\r
+ * absolute start point of the worksheet.\r
+ * </p>\r
+ * <p>\r
+ * If additional rows/columns are added before the\r
+ * drawing, the drawing shall move its anchors as needed\r
+ * to maintain this same absolute position.\r
+ * </p>\r
+ */\r
+ public static final int DONT_MOVE_AND_RESIZE = 3;\r
+\r
+ /**\r
+ * Returns the column (0 based) of the first cell.\r
+ *\r
+ * @return 0-based column of the first cell.\r
+ */\r
+ public short getCol1();\r
+\r
+ /**\r
+ * Sets the column (0 based) of the first cell.\r
+ *\r
+ * @param col1 0-based column of the first cell.\r
+ */\r
+ public void setCol1(int col1);\r
+\r
+ /**\r
+ * Returns the column (0 based) of the second cell.\r
+ *\r
+ * @return 0-based column of the second cell.\r
+ */\r
+ public short getCol2();\r
+\r
+ /**\r
+ * Returns the column (0 based) of the second cell.\r
+ *\r
+ * @param col2 0-based column of the second cell.\r
+ */\r
+ public void setCol2(int col2);\r
+\r
+ /**\r
+ * Returns the row (0 based) of the first cell.\r
+ *\r
+ * @return 0-based row of the first cell.\r
+ */\r
+ public int getRow1();\r
+\r
+ /**\r
+ * Returns the row (0 based) of the first cell.\r
+ *\r
+ * @param row1 0-based row of the first cell.\r
+ */\r
+ public void setRow1(int row1);\r
+\r
+ /**\r
+ * Returns the row (0 based) of the second cell.\r
+ *\r
+ * @return 0-based row of the second cell.\r
+ */\r
+ public int getRow2();\r
+\r
+ /**\r
+ * Returns the row (0 based) of the first cell.\r
+ *\r
+ * @param row2 0-based row of the first cell.\r
+ */\r
+ public void setRow2(int row2);\r
+\r
+ /**\r
+ * Returns the x coordinate within the first cell\r
+ *\r
+ * @return the x coordinate within the first cell\r
+ */\r
+ public int getDx1();\r
+\r
+ /**\r
+ * Sets the x coordinate within the first cell\r
+ *\r
+ * @param dx1 the x coordinate within the first cell\r
+ */\r
+ public void setDx1(int dx1);\r
+\r
+ /**\r
+ * Returns the y coordinate within the first cell\r
+ *\r
+ * @return the y coordinate within the first cell\r
+ */\r
+ public int getDy1();\r
+\r
+ /**\r
+ * Sets the y coordinate within the first cell\r
+ *\r
+ * @param dy1 the y coordinate within the first cell\r
+ */\r
+ public void setDy1(int dy1);\r
+\r
+ /**\r
+ * Sets the y coordinate within the second cell\r
+ *\r
+ * @return the y coordinate within the second cell\r
+ */\r
+ public int getDy2();\r
+\r
+ /**\r
+ * Sets the y coordinate within the second cell\r
+ *\r
+ * @param dy2 the y coordinate within the second cell\r
+ */\r
+ public void setDy2(int dy2);\r
+\r
+ /**\r
+ * Returns the x coordinate within the second cell\r
+ *\r
+ * @return the x coordinate within the second cell\r
+ */\r
+ public int getDx2();\r
+\r
+ /**\r
+ * Sets the x coordinate within the second cell\r
+ *\r
+ * @param dx2 the x coordinate within the second cell\r
+ */\r
+ public void setDx2(int dx2);\r
+\r
+\r
+ /**\r
+ * Sets the anchor type\r
+ * <p>\r
+ * 0 = Move and size with Cells, 2 = Move but don't size with cells, 3 = Don't move or size with cells.\r
+ * </p>\r
+ * @param anchorType the anchor type\r
+ * @see #MOVE_AND_RESIZE\r
+ * @see #MOVE_DONT_RESIZE\r
+ * @see #DONT_MOVE_AND_RESIZE\r
+ */\r
+ public void setAnchorType( int anchorType );\r
+\r
+ /**\r
+ * Gets the anchor type\r
+ * <p>\r
+ * 0 = Move and size with Cells, 2 = Move but don't size with cells, 3 = Don't move or size with cells.\r
+ * </p>\r
+ * @return the anchor type\r
+ * @see #MOVE_AND_RESIZE\r
+ * @see #MOVE_DONT_RESIZE\r
+ * @see #DONT_MOVE_AND_RESIZE\r
+ */\r
+ public int getAnchorType();\r
+\r
+}\r
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+
+package org.apache.poi.ss.usermodel;
+
+public interface Comment {
+
+ /**
+ * Returns whether this comment is visible.
+ *
+ * @param visible <code>true</code> if the comment is visible, <code>false</code> otherwise
+ */
+ void setVisible(boolean visible);
+
+ /**
+ * Sets whether this comment is visible.
+ *
+ * @return <code>true</code> if the comment is visible, <code>false</code> otherwise
+ */
+ boolean isVisible();
+
+ /**
+ * Return the row of the cell that contains the comment
+ *
+ * @return the 0-based row of the cell that contains the comment
+ */
+ int getRow();
+
+ /**
+ * Set the row of the cell that contains the comment
+ *
+ * @param row the 0-based row of the cell that contains the comment
+ */
+ void setRow(int row);
+
+ /**
+ * Return the column of the cell that contains the comment
+ *
+ * @return the 0-based column of the cell that contains the comment
+ */
+ int getColumn();
+
+ /**
+ * Set the column of the cell that contains the comment
+ *
+ * @param col the 0-based column of the cell that contains the comment
+ */
+ void setColumn(short col);
+
+ /**
+ * Name of the original comment author
+ *
+ * @return the name of the original author of the comment
+ */
+ String getAuthor();
+
+ /**
+ * Name of the original comment author
+ *
+ * @param author the name of the original author of the comment
+ */
+ void setAuthor(String author);
+
+ /**
+ * Fetches the rich text string of the comment
+ */
+ public RichTextString getString();
+
+ /**
+ * Sets the rich text string used by this comment.
+ *
+ * @param string Sets the rich text string used by this object.
+ */
+ void setString(RichTextString string);
+
+}
\ No newline at end of file
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+package org.apache.poi.ss.usermodel;
+
+/**
+ * An object that handles instantiating concrete
+ * classes of the various instances one needs for
+ * HSSF and XSSF.
+ * Works around a major shortcoming in Java, where we
+ * can't have static methods on interfaces or abstract
+ * classes.
+ * This allows you to get the appropriate class for
+ * a given interface, without you having to worry
+ * about if you're dealing with HSSF or XSSF, despite
+ * Java being quite rubbish.
+ */
+public interface CreationHelper {
+ /**
+ * Creates a new RichTextString instance
+ * @param text The text to initialise the RichTextString with
+ */
+ RichTextString createRichTextString(String text);
+
+ /**
+ * Creates a new DataFormat instance
+ */
+ DataFormat createDataFormat();
+
+ /**
+ * Creates a new Hyperlink, of the given type
+ */
+ Hyperlink createHyperlink(int type);
+
+ /**
+ * Creates FormulaEvaluator - an object that evaluates formula cells.
+ *
+ * @return a FormulaEvaluator instance
+ */
+ FormulaEvaluator createFormulaEvaluator();
+
+ ClientAnchor createClientAnchor();
+}
\ No newline at end of file
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+
+package org.apache.poi.ss.usermodel;
+
+public interface DataFormat {
+ /**
+ * get the format index that matches the given format string.
+ * Creates a new format if one is not found. Aliases text to the proper format.
+ * @param format string matching a built in format
+ * @return index of format.
+ */
+ short getFormat(String format);
+
+ /**
+ * get the format string that matches the given format index
+ * @param index of a format
+ * @return string represented at index of format or null if there is not a format at that index
+ */
+ String getFormat(short index);
+}
\ No newline at end of file
--- /dev/null
+/* ====================================================================\r
+ Licensed to the Apache Software Foundation (ASF) under one or more\r
+ contributor license agreements. See the NOTICE file distributed with\r
+ this work for additional information regarding copyright ownership.\r
+ The ASF licenses this file to You under the Apache License, Version 2.0\r
+ (the "License"); you may not use this file except in compliance with\r
+ the License. You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+ Unless required by applicable law or agreed to in writing, software\r
+ distributed under the License is distributed on an "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ See the License for the specific language governing permissions and\r
+ limitations under the License.\r
+==================================================================== */\r
+package org.apache.poi.ss.usermodel;\r
+\r
+/**\r
+ * @author Yegor Kozlov\r
+ */\r
+public interface Drawing {\r
+ Picture createPicture(ClientAnchor anchor, int pictureIndex);\r
+}\r
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+
+package org.apache.poi.ss.usermodel;
+
+/**
+ * The enumeration value indicating the style of fill pattern being used for a cell format.
+ *
+ */
+public enum FillPatternType {
+
+ /** No background */
+ NO_FILL,
+
+ /** Solidly filled */
+ SOLID_FOREGROUND,
+
+ /** Small fine dots */
+ FINE_DOTS,
+
+ /** Wide dots */
+ ALT_BARS,
+
+ /** Sparse dots */
+ SPARSE_DOTS,
+
+ /** Thick horizontal bands */
+ THICK_HORZ_BANDS,
+
+ /** Thick vertical bands */
+ THICK_VERT_BANDS,
+
+ /** Thick backward facing diagonals */
+ THICK_BACKWARD_DIAG,
+
+ /** Thick forward facing diagonals */
+ THICK_FORWARD_DIAG,
+
+ /** Large spots */
+ BIG_SPOTS,
+
+ /** Brick-like layout */
+ BRICKS,
+
+ /** Thin horizontal bands */
+ THIN_HORZ_BANDS,
+
+ /** Thin vertical bands */
+ THIN_VERT_BANDS,
+
+ /** Thin backward diagonal */
+ THIN_BACKWARD_DIAG,
+
+ /** Thin forward diagonal */
+ THIN_FORWARD_DIAG,
+
+ /** Squares */
+ SQUARES,
+
+ /** Diamonds */
+ DIAMONDS,
+
+ /** Less Dots */
+ LESS_DOTS,
+
+ /** Least Dots */
+ LEAST_DOTS;
+
+}
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+
+package org.apache.poi.ss.usermodel;
+
+
+public interface Font {
+ /**
+ * Normal boldness (not bold)
+ */
+
+ public final static short BOLDWEIGHT_NORMAL = 0x190;
+
+ /**
+ * Bold boldness (bold)
+ */
+
+ public final static short BOLDWEIGHT_BOLD = 0x2bc;
+
+ /**
+ * normal type of black color.
+ */
+
+ public final static short COLOR_NORMAL = 0x7fff;
+
+ /**
+ * Dark Red color
+ */
+
+ public final static short COLOR_RED = 0xa;
+
+ /**
+ * no type offsetting (not super or subscript)
+ */
+
+ public final static short SS_NONE = 0;
+
+ /**
+ * superscript
+ */
+
+ public final static short SS_SUPER = 1;
+
+ /**
+ * subscript
+ */
+
+ public final static short SS_SUB = 2;
+
+ /**
+ * not underlined
+ */
+
+ public final static byte U_NONE = 0;
+
+ /**
+ * single (normal) underline
+ */
+
+ public final static byte U_SINGLE = 1;
+
+ /**
+ * double underlined
+ */
+
+ public final static byte U_DOUBLE = 2;
+
+ /**
+ * accounting style single underline
+ */
+
+ public final static byte U_SINGLE_ACCOUNTING = 0x21;
+
+ /**
+ * accounting style double underline
+ */
+
+ public final static byte U_DOUBLE_ACCOUNTING = 0x22;
+
+ /**
+ * ANSI character set
+ */
+ public final static byte ANSI_CHARSET = 0;
+
+ /**
+ * Default character set.
+ */
+ public final static byte DEFAULT_CHARSET = 1;
+
+ /**
+ * Symbol character set
+ */
+ public final static byte SYMBOL_CHARSET = 2;
+
+ /**
+ * set the name for the font (i.e. Arial)
+ * @param name String representing the name of the font to use
+ */
+
+ void setFontName(String name);
+
+ /**
+ * get the name for the font (i.e. Arial)
+ * @return String representing the name of the font to use
+ */
+
+ String getFontName();
+
+ /**
+ * set the font height in unit's of 1/20th of a point. Maybe you might want to
+ * use the setFontHeightInPoints which matches to the familiar 10, 12, 14 etc..
+ * @param height height in 1/20ths of a point
+ * @see #setFontHeightInPoints(short)
+ */
+
+ void setFontHeight(short height);
+
+ /**
+ * set the font height
+ * @param height height in the familiar unit of measure - points
+ * @see #setFontHeight(short)
+ */
+
+ void setFontHeightInPoints(short height);
+
+ /**
+ * get the font height in unit's of 1/20th of a point. Maybe you might want to
+ * use the getFontHeightInPoints which matches to the familiar 10, 12, 14 etc..
+ * @return short - height in 1/20ths of a point
+ * @see #getFontHeightInPoints()
+ */
+
+ short getFontHeight();
+
+ /**
+ * get the font height
+ * @return short - height in the familiar unit of measure - points
+ * @see #getFontHeight()
+ */
+
+ short getFontHeightInPoints();
+
+ /**
+ * set whether to use italics or not
+ * @param italic italics or not
+ */
+
+ void setItalic(boolean italic);
+
+ /**
+ * get whether to use italics or not
+ * @return italics or not
+ */
+
+ boolean getItalic();
+
+ /**
+ * set whether to use a strikeout horizontal line through the text or not
+ * @param strikeout or not
+ */
+
+ void setStrikeout(boolean strikeout);
+
+ /**
+ * get whether to use a strikeout horizontal line through the text or not
+ * @return strikeout or not
+ */
+
+ boolean getStrikeout();
+
+ /**
+ * set the color for the font
+ * @param color to use
+ * @see #COLOR_NORMAL Note: Use this rather than HSSFColor.AUTOMATIC for default font color
+ * @see #COLOR_RED
+ */
+
+ void setColor(short color);
+
+ /**
+ * get the color for the font
+ * @return color to use
+ * @see #COLOR_NORMAL
+ * @see #COLOR_RED
+ * @see org.apache.poi.hssf.usermodel.HSSFPalette#getColor(short)
+ */
+ short getColor();
+
+ /**
+ * set normal,super or subscript.
+ * @param offset type to use (none,super,sub)
+ * @see #SS_NONE
+ * @see #SS_SUPER
+ * @see #SS_SUB
+ */
+
+ void setTypeOffset(short offset);
+
+ /**
+ * get normal,super or subscript.
+ * @return offset type to use (none,super,sub)
+ * @see #SS_NONE
+ * @see #SS_SUPER
+ * @see #SS_SUB
+ */
+
+ short getTypeOffset();
+
+ /**
+ * set type of text underlining to use
+ * @param underline type
+ * @see #U_NONE
+ * @see #U_SINGLE
+ * @see #U_DOUBLE
+ * @see #U_SINGLE_ACCOUNTING
+ * @see #U_DOUBLE_ACCOUNTING
+ */
+
+ void setUnderline(byte underline);
+
+ /**
+ * get type of text underlining to use
+ * @return underlining type
+ * @see #U_NONE
+ * @see #U_SINGLE
+ * @see #U_DOUBLE
+ * @see #U_SINGLE_ACCOUNTING
+ * @see #U_DOUBLE_ACCOUNTING
+ */
+
+ byte getUnderline();
+
+ /**
+ * get character-set to use.
+ * @return character-set
+ * @see #ANSI_CHARSET
+ * @see #DEFAULT_CHARSET
+ * @see #SYMBOL_CHARSET
+ */
+ byte getCharSet();
+
+ /**
+ * set character-set to use.
+ * @see #ANSI_CHARSET
+ * @see #DEFAULT_CHARSET
+ * @see #SYMBOL_CHARSET
+ */
+ void setCharSet(byte charset);
+
+ /**
+ * get the index within the XSSFWorkbook (sequence within the collection of Font objects)
+ *
+ * @return unique index number of the underlying record this Font represents (probably you don't care
+ * unless you're comparing which one is which)
+ */
+ public short getIndex();
+
+ public void setBoldweight(short boldweight);
+
+ public short getBoldweight();
+
+
+}
\ No newline at end of file
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+
+package org.apache.poi.ss.usermodel;
+
+
+/**
+ * Charset represents the basic set of characters associated with a font (that it can display), and
+ * corresponds to the ANSI codepage (8-bit or DBCS) of that character set used by a given language.
+ *
+ * @author Gisella Bronzetti
+ */
+public enum FontCharset {
+
+ ANSI(0),
+ DEFAULT(1),
+ SYMBOL(2),
+ MAC(77),
+ SHIFTJIS(128),
+ HANGEUL(129),
+ JOHAB(130),
+ GB2312(134),
+ CHINESEBIG5(136),
+ GREEK(161),
+ TURKISH(162),
+ VIETNAMESE(163),
+ HEBREW(177),
+ ARABIC(178),
+ BALTIC(186),
+ RUSSIAN(204),
+ THAI(222),
+ EASTEUROPE(238),
+ OEM(255);
+
+
+ private int charset;
+
+ private FontCharset(int value){
+ charset = value;
+ }
+
+ /**
+ * Returns value of this charset
+ *
+ * @return value of this charset
+ */
+ public int getValue(){
+ return charset;
+ }
+
+ private static FontCharset[] _table = new FontCharset[256];
+ static {
+ for (FontCharset c : values()) {
+ _table[c.getValue()] = c;
+ }
+ }
+
+ public static FontCharset valueOf(int value){
+ return _table[value];
+ }
+}
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+
+package org.apache.poi.ss.usermodel;
+
+
+/**
+ * The font family this font belongs to. A font family is a set of fonts having common stroke width and serif
+ * characteristics. The font name overrides when there are conflicting values.
+ *
+ * @author Gisella Bronzetti
+ */
+public enum FontFamily {
+
+ NOT_APPLICABLE(0),
+ ROMAN(1),
+ SWISS(2),
+ MODERN(3),
+ SCRIPT(4),
+ DECORATIVE(5);
+
+ private int family;
+
+ private FontFamily(int value) {
+ family = value;
+ }
+
+ /**
+ * Returns index of this font family
+ *
+ * @return index of this font family
+ */
+ public int getValue() {
+ return family;
+ }
+
+ private static FontFamily[] _table = new FontFamily[6];
+
+ static {
+ for (FontFamily c : values()) {
+ _table[c.getValue()] = c;
+ }
+ }
+
+ public static FontFamily valueOf(int family) {
+ return _table[family];
+ }
+}
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+
+package org.apache.poi.ss.usermodel;
+
+
+/**
+ * Defines the font scheme to which this font belongs.
+ * When a font definition is part of a theme definition, then the font is categorized as either a major or minor font scheme component.
+ * When a new theme is chosen, every font that is part of a theme definition is updated to use the new major or minor font definition for that
+ * theme.
+ * Usually major fonts are used for styles like headings, and minor fonts are used for body & paragraph text.
+ *
+ * @author Gisella Bronzetti
+ */
+public enum FontScheme {
+
+
+ NONE(1),
+ MAJOR(2),
+ MINOR(3);
+
+ private int value;
+
+ private FontScheme(int val) {
+ value = val;
+ }
+
+ public int getValue() {
+ return value;
+ }
+
+ private static FontScheme[] _table = new FontScheme[4];
+ static {
+ for (FontScheme c : values()) {
+ _table[c.getValue()] = c;
+ }
+ }
+
+ public static FontScheme valueOf(int value){
+ return _table[value];
+ }
+}
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+
+package org.apache.poi.ss.usermodel;
+
+/**
+ * the different types of possible underline formatting
+ *
+ * @author Gisella Bronzetti
+ */
+public enum FontUnderline {
+
+ /**
+ * Single-line underlining under each character in the cell.
+ * The underline is drawn through the descenders of
+ * characters such as g and p..
+ */
+ SINGLE(1),
+
+ /**
+ * Double-line underlining under each character in the
+ * cell. underlines are drawn through the descenders of
+ * characters such as g and p.
+ */
+ DOUBLE(2),
+
+ /**
+ * Single-line accounting underlining under each
+ * character in the cell. The underline is drawn under the
+ * descenders of characters such as g and p.
+ */
+ SINGLE_ACCOUNTING(3),
+
+ /**
+ * Double-line accounting underlining under each
+ * character in the cell. The underlines are drawn under
+ * the descenders of characters such as g and p.
+ */
+ DOUBLE_ACCOUNTING(4),
+
+ /**
+ * No underline.
+ */
+ NONE(5);
+
+ private int value;
+
+
+ private FontUnderline(int val) {
+ value = val;
+ }
+
+ public int getValue() {
+ return value;
+ }
+
+ public byte getByteValue() {
+ switch (this) {
+ case DOUBLE:
+ return Font.U_DOUBLE;
+ case DOUBLE_ACCOUNTING:
+ return Font.U_DOUBLE_ACCOUNTING;
+ case SINGLE_ACCOUNTING:
+ return Font.U_SINGLE_ACCOUNTING;
+ case NONE:
+ return Font.U_NONE;
+ case SINGLE:
+ return Font.U_SINGLE;
+ default:
+ return Font.U_SINGLE;
+ }
+ }
+
+ private static FontUnderline[] _table = new FontUnderline[6];
+ static {
+ for (FontUnderline c : values()) {
+ _table[c.getValue()] = c;
+ }
+ }
+
+ public static FontUnderline valueOf(int value){
+ return _table[value];
+ }
+
+ public static FontUnderline valueOf(byte value){
+ FontUnderline val;
+ switch (value) {
+ case Font.U_DOUBLE:
+ val = FontUnderline.DOUBLE;
+ break;
+ case Font.U_DOUBLE_ACCOUNTING:
+ val = FontUnderline.DOUBLE_ACCOUNTING;
+ break;
+ case Font.U_SINGLE_ACCOUNTING:
+ val = FontUnderline.SINGLE_ACCOUNTING;
+ break;
+ case Font.U_SINGLE:
+ val = FontUnderline.SINGLE;
+ break;
+ default:
+ val = FontUnderline.NONE;
+ break;
+ }
+ return val;
+ }
+
+}
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+
+package org.apache.poi.ss.usermodel;
+
+/**
+ * Common definition of a HSSF or XSSF page footer.
+ * For a list of all the different fields that can be
+ * placed into a footer, such as page number,
+ * bold, underline etc, see
+ * {@link org.apache.poi.hssf.usermodel.HeaderFooter}.
+ */
+public interface Footer extends HeaderFooter {
+ /**
+ * Get the left side of the footer.
+ * @return The string representing the left side.
+ */
+ String getLeft();
+
+ /**
+ * Sets the left string.
+ * @param newLeft The string to set as the left side.
+ */
+ void setLeft(String newLeft);
+
+ /**
+ * Get the center of the footer.
+ * @return The string representing the center.
+ */
+ String getCenter();
+
+ /**
+ * Sets the center string.
+ * @param newCenter The string to set as the center.
+ */
+ void setCenter(String newCenter);
+
+ /**
+ * Get the right side of the footer.
+ * @return The string representing the right side.
+ */
+ String getRight();
+
+ /**
+ * Sets the right string.
+ * @param newRight The string to set as the right side.
+ */
+ void setRight(String newRight);
+}
--- /dev/null
+/* ====================================================================\r
+ Licensed to the Apache Software Foundation (ASF) under one or more\r
+ contributor license agreements. See the NOTICE file distributed with\r
+ this work for additional information regarding copyright ownership.\r
+ The ASF licenses this file to You under the Apache License, Version 2.0\r
+ (the "License"); you may not use this file except in compliance with\r
+ the License. You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+ Unless required by applicable law or agreed to in writing, software\r
+ distributed under the License is distributed on an "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ See the License for the specific language governing permissions and\r
+ limitations under the License.\r
+==================================================================== */\r
+package org.apache.poi.ss.usermodel;\r
+\r
+import java.util.Map;\r
+import java.util.HashMap;\r
+\r
+/**\r
+ * Enumerates error values in SpreadsheetML formula calculations.\r
+ *\r
+ * @author Yegor Kozlov\r
+ */\r
+public enum FormulaError {\r
+ /**\r
+ * Intended to indicate when two areas are required to intersect, but do not.\r
+ * <p>Example:\r
+ * In the case of SUM(B1 C1), the space between B1 and C1 is treated as the binary\r
+ * intersection operator, when a comma was intended. end example]\r
+ * </p>\r
+ */\r
+ NULL(0x00, "#NULL!"),\r
+\r
+ /**\r
+ * Intended to indicate when any number, including zero, is divided by zero.\r
+ * Note: However, any error code divided by zero results in that error code.\r
+ */\r
+ DIV0(0x07, "#DIV/0!"),\r
+\r
+ /**\r
+ * Intended to indicate when an incompatible type argument is passed to a function, or\r
+ * an incompatible type operand is used with an operator.\r
+ * <p>Example:\r
+ * In the case of a function argument, text was expected, but a number was provided\r
+ * </p>\r
+ */\r
+ VALUE(0x0F, "#VALUE!"),\r
+\r
+ /**\r
+ * Intended to indicate when a cell reference is invalid.\r
+ * <p>Example:\r
+ * If a formula contains a reference to a cell, and then the row or column containing that cell is deleted,\r
+ * a #REF! error results. If a worksheet does not support 20,001 columns,\r
+ * OFFSET(A1,0,20000) will result in a #REF! error.\r
+ * </p>\r
+ */\r
+ REF(0x1D, "#REF!"),\r
+\r
+ /**\r
+ * Intended to indicate when what looks like a name is used, but no such name has been defined.\r
+ * <p>Example:\r
+ * XYZ/3, where XYZ is not a defined name. Total is & A10,\r
+ * where neither Total nor is is a defined name. Presumably, "Total is " & A10\r
+ * was intended. SUM(A1C10), where the range A1:C10 was intended.\r
+ * </p>\r
+ */\r
+ NAME(0x1D, "#NAME?"),\r
+\r
+ /**\r
+ * Intended to indicate when an argument to a function has a compatible type, but has a\r
+ * value that is outside the domain over which that function is defined. (This is known as\r
+ * a domain error.)\r
+ * <p>Example:\r
+ * Certain calls to ASIN, ATANH, FACT, and SQRT might result in domain errors.\r
+ * </p>\r
+ * Intended to indicate that the result of a function cannot be represented in a value of\r
+ * the specified type, typically due to extreme magnitude. (This is known as a range\r
+ * error.)\r
+ * <p>Example: FACT(1000) might result in a range error. </p>\r
+ */\r
+ NUM(0x24, "#NUM!"),\r
+\r
+ /**\r
+ * Intended to indicate when a designated value is not available.\r
+ * <p>Example:\r
+ * Some functions, such as SUMX2MY2, perform a series of operations on corresponding\r
+ * elements in two arrays. If those arrays do not have the same number of elements, then\r
+ * for some elements in the longer array, there are no corresponding elements in the\r
+ * shorter one; that is, one or more values in the shorter array are not available.\r
+ * </p>\r
+ * This error value can be produced by calling the function NA\r
+ */\r
+ NA(0x2A, "#N/A");\r
+\r
+ private byte type;\r
+ private String repr;\r
+\r
+ private FormulaError(int type, String repr) {\r
+ this.type = (byte) type;\r
+ this.repr = repr;\r
+ }\r
+\r
+ /**\r
+ * @return numeric code of the error\r
+ */\r
+ public byte getCode() {\r
+ return type;\r
+ }\r
+\r
+ /**\r
+ * @return string representation of the error\r
+ */\r
+ public String getString() {\r
+ return repr;\r
+ }\r
+\r
+ private static Map<String, FormulaError> smap = new HashMap<String, FormulaError>();\r
+ private static Map<Byte, FormulaError> imap = new HashMap<Byte, FormulaError>();\r
+ static{\r
+ for (FormulaError error : values()) {\r
+ imap.put(error.getCode(), error);\r
+ smap.put(error.getString(), error);\r
+ }\r
+ }\r
+\r
+ public static FormulaError forInt(byte type){\r
+ FormulaError err = imap.get(type);\r
+ if(err == null) throw new IllegalArgumentException("Unknown error type: " + type);\r
+ return err;\r
+ }\r
+\r
+ public static FormulaError forString(String code){\r
+ FormulaError err = smap.get(code);\r
+ if(err == null) throw new IllegalArgumentException("Unknown error code: " + code);\r
+ return err;\r
+ }\r
+}\r
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+
+package org.apache.poi.ss.usermodel;
+
+/**
+ * Common definition of a HSSF or XSSF page header.
+ * For a list of all the different fields that can be
+ * placed into a header, such as page number,
+ * bold, underline etc, see
+ * {@link org.apache.poi.hssf.usermodel.HeaderFooter}.
+ */
+public interface Header extends HeaderFooter {
+ /**
+ * Get the left side of the header.
+ *
+ * @return The string representing the left side.
+ */
+ String getLeft();
+
+ /**
+ * Sets the left string.
+ *
+ * @param newLeft The string to set as the left side.
+ */
+ void setLeft(String newLeft);
+
+ /**
+ * Get the center of the header.
+ *
+ * @return The string representing the center.
+ */
+ String getCenter();
+
+ /**
+ * Sets the center string.
+ *
+ * @param newCenter The string to set as the center.
+ */
+ void setCenter(String newCenter);
+
+ /**
+ * Get the right side of the header.
+ *
+ * @return The string representing the right side.
+ */
+ String getRight();
+
+ /**
+ * Sets the right string.
+ *
+ * @param newRight The string to set as the right side.
+ */
+ void setRight(String newRight);
+}
--- /dev/null
+/* ====================================================================\r
+ Licensed to the Apache Software Foundation (ASF) under one or more\r
+ contributor license agreements. See the NOTICE file distributed with\r
+ this work for additional information regarding copyright ownership.\r
+ The ASF licenses this file to You under the Apache License, Version 2.0\r
+ (the "License"); you may not use this file except in compliance with\r
+ the License. You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+ Unless required by applicable law or agreed to in writing, software\r
+ distributed under the License is distributed on an "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ See the License for the specific language governing permissions and\r
+ limitations under the License.\r
+==================================================================== */\r
+\r
+package org.apache.poi.ss.usermodel;\r
+\r
+/**\r
+ * The enumeration value indicating horizontal alignment of a cell,\r
+ * i.e., whether it is aligned general, left, right, horizontally centered, filled (replicated),\r
+ * justified, centered across multiple cells, or distributed.\r
+ */\r
+public enum HorizontalAlignment {\r
+ /**\r
+ * The horizontal alignment is general-aligned. Text data is left-aligned.\r
+ * Numbers, dates, and times are rightaligned. Boolean types are centered.\r
+ * Changing the alignment does not change the type of data.\r
+ */\r
+ GENERAL,\r
+\r
+ /**\r
+ * The horizontal alignment is left-aligned, even in Rightto-Left mode.\r
+ * Aligns contents at the left edge of the cell. If an indent amount is specified, the contents of\r
+ * the cell is indented from the left by the specified number of character spaces. The character spaces are\r
+ * based on the default font and font size for the workbook.\r
+ */\r
+ LEFT,\r
+\r
+ /**\r
+ * The horizontal alignment is centered, meaning the text is centered across the cell.\r
+ */\r
+ CENTER,\r
+\r
+ /**\r
+ * The horizontal alignment is right-aligned, meaning that cell contents are aligned at the right edge of the cell,\r
+ * even in Right-to-Left mode.\r
+ */\r
+ RIGHT,\r
+\r
+ /**\r
+ * Indicates that the value of the cell should be filled\r
+ * across the entire width of the cell. If blank cells to the right also have the fill alignment,\r
+ * they are also filled with the value, using a convention similar to centerContinuous.\r
+ * <p>\r
+ * Additional rules:\r
+ * <ol>\r
+ * <li>Only whole values can be appended, not partial values.</li>\r
+ * <li>The column will not be widened to 'best fit' the filled value</li>\r
+ * <li>If appending an additional occurrence of the value exceeds the boundary of the cell\r
+ * left/right edge, don't append the additional occurrence of the value.</li>\r
+ * <li>The display value of the cell is filled, not the underlying raw number.</li>\r
+ * </ol>\r
+ * </p>\r
+ */\r
+ FILL,\r
+\r
+ /**\r
+ * The horizontal alignment is justified (flush left and right).\r
+ * For each line of text, aligns each line of the wrapped text in a cell to the right and left\r
+ * (except the last line). If no single line of text wraps in the cell, then the text is not justified.\r
+ */\r
+ JUSTIFY,\r
+\r
+ /**\r
+ * The horizontal alignment is centered across multiple cells.\r
+ * The information about how many cells to span is expressed in the Sheet Part,\r
+ * in the row of the cell in question. For each cell that is spanned in the alignment,\r
+ * a cell element needs to be written out, with the same style Id which references the centerContinuous alignment.\r
+ */\r
+ CENTER_SELECTION,\r
+\r
+ /**\r
+ * Indicates that each 'word' in each line of text inside the cell is evenly distributed\r
+ * across the width of the cell, with flush right and left margins.\r
+ * <p>\r
+ * When there is also an indent value to apply, both the left and right side of the cell\r
+ * are padded by the indent value.\r
+ * </p>\r
+ * <p> A 'word' is a set of characters with no space character in them. </p>\r
+ * <p> Two lines inside a cell are separated by a carriage return. </p>\r
+ */\r
+ DISTRIBUTED\r
+}\r
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+package org.apache.poi.ss.usermodel;
+
+/**
+ * Represents an Excel hyperlink.
+ */
+public interface Hyperlink extends org.apache.poi.common.usermodel.Hyperlink {
+ /**
+ * Return the row of the first cell that contains the hyperlink
+ *
+ * @return the 0-based row of the cell that contains the hyperlink
+ */
+ public int getFirstRow();
+
+ /**
+ * Set the row of the first cell that contains the hyperlink
+ *
+ * @param row the 0-based row of the first cell that contains the hyperlink
+ */
+ public void setFirstRow(int row);
+
+ /**
+ * Return the row of the last cell that contains the hyperlink
+ *
+ * @return the 0-based row of the last cell that contains the hyperlink
+ */
+ public int getLastRow();
+
+ /**
+ * Set the row of the last cell that contains the hyperlink
+ *
+ * @param row the 0-based row of the last cell that contains the hyperlink
+ */
+ public void setLastRow(int row);
+
+ /**
+ * Return the column of the first cell that contains the hyperlink
+ *
+ * @return the 0-based column of the first cell that contains the hyperlink
+ */
+ public int getFirstColumn();
+
+ /**
+ * Set the column of the first cell that contains the hyperlink
+ *
+ * @param col the 0-based column of the first cell that contains the hyperlink
+ */
+ public void setFirstColumn(int col);
+
+ /**
+ * Return the column of the last cell that contains the hyperlink
+ *
+ * @return the 0-based column of the last cell that contains the hyperlink
+ */
+ public int getLastColumn();
+
+ /**
+ * Set the column of the last cell that contains the hyperlink
+ *
+ * @param col the 0-based column of the last cell that contains the hyperlink
+ */
+ public void setLastColumn(int col);
+}
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+
+package org.apache.poi.ss.usermodel;
+
+/**
+ * A deprecated indexing scheme for colours that is still required for some records, and for backwards
+ * compatibility with OLE2 formats.
+ *
+ * <p>
+ * Each element corresponds to a color index (zero-based). When using the default indexed color palette,
+ * the values are not written out, but instead are implied. When the color palette has been modified from default,
+ * then the entire color palette is used.
+ * </p>
+ *
+ * @author Yegor Kozlov
+ */
+public enum IndexedColors {
+
+ BLACK(8),
+ WHITE(9),
+ RED(10),
+ BRIGHT_GREEN(11),
+ BLUE(12),
+ YELLOW(13),
+ PINK(14),
+ TURQUOISE(15),
+ DARK_RED(16),
+ GREEN(17),
+ DARK_BLUE(18),
+ DARK_YELLOW(19),
+ VIOLET(20),
+ TEAL(21),
+ GREY_25_PERCENT(22),
+ GREY_50_PERCENT(23),
+ CORNFLOWER_BLUE(24),
+ MAROON(25),
+ LEMON_CHIFFON(26),
+ ORCHID(28),
+ CORAL(29),
+ ROYAL_BLUE(30),
+ LIGHT_CORNFLOWER_BLUE(31),
+ SKY_BLUE(40),
+ LIGHT_TURQUOISE(41),
+ LIGHT_GREEN(42),
+ LIGHT_YELLOW(43),
+ PALE_BLUE(44),
+ ROSE(45),
+ LAVENDER(46),
+ TAN(47),
+ LIGHT_BLUE(48),
+ AQUA(49),
+ LIME(50),
+ GOLD(51),
+ LIGHT_ORANGE(52),
+ ORANGE(53),
+ BLUE_GREY(54),
+ GREY_40_PERCENT(55),
+ DARK_TEAL(56),
+ SEA_GREEN(57),
+ DARK_GREEN(58),
+ OLIVE_GREEN(59),
+ BROWN(60),
+ PLUM(61),
+ INDIGO(62),
+ GREY_80_PERCENT(63),
+ AUTOMATIC(64);
+
+ private int index;
+
+ IndexedColors(int idx){
+ index = idx;
+ }
+
+ /**
+ * Returns index of this color
+ *
+ * @return index of this color
+ */
+ public short getIndex(){
+ return (short)index;
+ }
+}
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+
+package org.apache.poi.ss.usermodel;
+
+/**
+ * Represents a defined name for a range of cells.
+ * <p>
+ * A name is a meaningful shorthand that makes it easier to understand the purpose of a
+ * cell reference, constant or a formula.
+ * </p>
+ * Examples:
+ * <pre><blockquote>
+ * Sheet sheet = workbook.createSheet("Loan Calculator");
+ * Name name;
+ *
+ * name = workbook.createName();
+ * name.setNameName("Interest_Rate");
+ * name.setRefersToFormula("'Loan Calculator'!$E$5");
+ *
+ * name = wb.createName();
+ * name.setNameName("Loan_Amount");
+ * name.setRefersToFormula("'Loan Calculator'!$E$4");
+ *
+ * name = wb.createName();
+ * name.setNameName("Number_of_Payments");
+ * name.setRefersToFormula("'Loan Calculator'!$E$10");
+ *
+ * name = wb.createName();
+ * name.setNameName("Monthly_Payment");
+ * name.setRefersToFormula("-PMT(Interest_Rate/12,Number_of_Payments,Loan_Amount)");
+ *
+ * name = wb.createName();
+ * name.setNameName("Values_Entered");
+ * name.setRefersToFormula("IF(Loan_Amount*Interest_Rate>0,1,0)");
+ *
+ * </blockquote></pre>
+ */
+public interface Name {
+
+ /**
+ * Get the sheets name which this named range is referenced to
+ *
+ * @return sheet name, which this named range refered to
+ */
+ String getSheetName();
+
+ /**
+ * Gets the name of the named range
+ *
+ * @return named range name
+ */
+ String getNameName();
+
+ /**
+ * Sets the name of the named range
+ *
+ * <p>The following is a list of syntax rules that you need to be aware of when you create and edit names.</p>
+ * <ul>
+ * <li><strong>Valid characters</strong>
+ * The first character of a name must be a letter, an underscore character (_), or a backslash (\).
+ * Remaining characters in the name can be letters, numbers, periods, and underscore characters.
+ * </li>
+ * <li><strong>Cell references disallowed</strong>
+ * Names cannot be the same as a cell reference, such as Z$100 or R1C1.</li>
+ * <li><strong>Spaces are not valid</strong>
+ * Spaces are not allowed as part of a name. Use the underscore character (_) and period (.) as word separators, such as, Sales_Tax or First.Quarter.
+ * </li>
+ * <li><strong>Name length</strong>
+ * A name can contain up to 255 characters.
+ * </li>
+ * <li><strong>Case sensitivity</strong>
+ * Names can contain uppercase and lowercase letters.
+ * </li>
+ * </ul>
+ * <p>
+ * A name must always be unique within its scope. POI prevents you from defining a name that is not unique
+ * within its scope. However you can use the same name in different scopes. Example:
+ * <pre><blockquote>
+ * //by default names are workbook-global
+ * Name name;
+ * name = workbook.createName();
+ * name.setNameName("sales_08");
+ *
+ * name = workbook.createName();
+ * name.setNameName("sales_08"); //will throw an exception: "The workbook already contains this name (case-insensitive)"
+ *
+ * //create sheet-level name
+ * name = workbook.createName();
+ * name.setSheetIndex(0); //the scope of the name is the first sheet
+ * name.setNameName("sales_08"); //ok
+ *
+ * name = workbook.createName();
+ * name.setSheetIndex(0);
+ * name.setNameName("sales_08"); //will throw an exception: "The sheet already contains this name (case-insensitive)"
+ *
+ * </blockquote></pre>
+ * </p>
+ * @param name named range name to set
+ * @throws IllegalArgumentException if the name is invalid or the already exists within its scope (case-insensitive)
+ */
+ void setNameName(String name);
+
+ /**
+ * Returns the formula that the name is defined to refer to.
+ *
+ * @return the reference for this name, <code>null</code> if it has not been set yet. Never empty string
+ * @see #setRefersToFormula(String)
+ */
+ String getRefersToFormula();
+
+ /**
+ * Sets the formula that the name is defined to refer to. The following are representative examples:
+ *
+ * <ul>
+ * <li><code>'My Sheet'!$A$3</code></li>
+ * <li><code>8.3</code></li>
+ * <li><code>HR!$A$1:$Z$345</code></li>
+ * <li><code>SUM(Sheet1!A1,Sheet2!B2)</li>
+ * <li><code>-PMT(Interest_Rate/12,Number_of_Payments,Loan_Amount)</li>
+ * </ul>
+ *
+ * @param formulaText the reference for this name
+ * @throws IllegalArgumentException if the specified formulaText is unparsable
+ */
+ void setRefersToFormula(String formulaText);
+
+ /**
+ * Checks if this name is a function name
+ *
+ * @return true if this name is a function name
+ */
+ boolean isFunctionName();
+
+ /**
+ * Checks if this name points to a cell that no longer exists
+ *
+ * @return <code>true</code> if the name refers to a deleted cell, <code>false</code> otherwise
+ */
+ boolean isDeleted();
+
+ /**
+ * Tell Excel that this name applies to the worksheet with the specified index instead of the entire workbook.
+ *
+ * @param sheetId the sheet index this name applies to, -1 unsets this property making the name workbook-global
+ * @throws IllegalArgumentException if the sheet index is invalid.
+ */
+ public void setSheetIndex(int sheetId);
+
+ /**
+ * Returns the sheet index this name applies to.
+ *
+ * @return the sheet index this name applies to, -1 if this name applies to the entire workbook
+ */
+ public int getSheetIndex();
+
+ /**
+ * Returns the comment the user provided when the name was created.
+ *
+ * @return the user comment for this named range
+ */
+ public String getComment();
+
+ /**
+ * Sets the comment the user provided when the name was created.
+ *
+ * @param comment the user comment for this named range
+ */
+ public void setComment(String comment);
+}
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+
+package org.apache.poi.ss.usermodel;
+
+/**
+ * Specifies printed page order.
+ *
+ * @author Gisella Bronzetti
+ */
+public enum PageOrder {
+
+ /**
+ * Order pages vertically first, then move horizontally.
+ */
+ DOWN_THEN_OVER(1),
+ /**
+ * Order pages horizontally first, then move vertically
+ */
+ OVER_THEN_DOWN(2);
+
+
+ private int order;
+
+
+ private PageOrder(int order) {
+ this.order = order;
+ }
+
+ public int getValue() {
+ return order;
+ }
+
+
+ private static PageOrder[] _table = new PageOrder[3];
+ static {
+ for (PageOrder c : values()) {
+ _table[c.getValue()] = c;
+ }
+ }
+
+ public static PageOrder valueOf(int value){
+ return _table[value];
+ }
+}
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+
+package org.apache.poi.ss.usermodel;
+
+/**
+ * The enumeration value indicating the possible paper size for a sheet
+ *
+ * @author Daniele Montagni
+ */
+public enum PaperSize {
+ LETTER_PAPER,
+ LETTER_SMALL_PAPER,
+ TABLOID_PAPER,
+ LEDGER_PAPER,
+ LEGAL_PAPER,
+ STATEMENT_PAPER,
+ EXECUTIVE_PAPER,
+ A3_PAPER,
+ A4_PAPER,
+ A4_SMALL_PAPER,
+ A5_PAPER,
+ B4_PAPER,
+ B5_PAPER,
+ FOLIO_PAPER,
+ QUARTO_PAPER,
+ STANDARD_PAPER_10_14,
+ STANDARD_PAPER_11_17;
+}
--- /dev/null
+/* ====================================================================\r
+ Licensed to the Apache Software Foundation (ASF) under one or more\r
+ contributor license agreements. See the NOTICE file distributed with\r
+ this work for additional information regarding copyright ownership.\r
+ The ASF licenses this file to You under the Apache License, Version 2.0\r
+ (the "License"); you may not use this file except in compliance with\r
+ the License. You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+ Unless required by applicable law or agreed to in writing, software\r
+ distributed under the License is distributed on an "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ See the License for the specific language governing permissions and\r
+ limitations under the License.\r
+==================================================================== */\r
+package org.apache.poi.ss.usermodel;\r
+\r
+/**\r
+ * Repersents a picture in a SpreadsheetML document\r
+ *\r
+ * @author Yegor Kozlov\r
+ */\r
+public interface Picture {\r
+\r
+ /**\r
+ * Reset the image to the original size.\r
+ */\r
+ void resize();\r
+\r
+ /**\r
+ * Reset the image to the original size.\r
+ *\r
+ * @param scale the amount by which image dimensions are multiplied relative to the original size.\r
+ * <code>resize(1.0)</code> sets the original size, <code>resize(0.5)</code> resize to 50% of the original,\r
+ * <code>resize(2.0)</code> resizes to 200% of the original.\r
+ */\r
+ void resize(double scale);\r
+\r
+ ClientAnchor getPreferredSize();\r
+\r
+}\r
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+
+package org.apache.poi.ss.usermodel;
+
+public interface PictureData {
+
+ /**
+ * Gets the picture data.
+ *
+ * @return the picture data.
+ */
+ byte[] getData();
+
+ /**
+ * Suggests a file extension for this image.
+ *
+ * @return the file extension.
+ */
+ String suggestFileExtension();
+
+}
\ No newline at end of file
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+
+package org.apache.poi.ss.usermodel;
+
+/**
+ * These enumerations specify how cell comments shall be displayed for paper printing purposes.
+ *
+ * @author Gisella Bronzetti
+ */
+public enum PrintCellComments {
+
+ /**
+ * Do not print cell comments.
+ */
+ NONE(1),
+ /**
+ * Print cell comments as displayed.
+ */
+ AS_DISPLAYED(2),
+ /**
+ * Print cell comments at end of document.
+ */
+ AT_END(3);
+
+
+ private int comments;
+
+ private PrintCellComments(int comments) {
+ this.comments = comments;
+ }
+
+ public int getValue() {
+ return comments;
+ }
+
+ private static PrintCellComments[] _table = new PrintCellComments[4];
+ static {
+ for (PrintCellComments c : values()) {
+ _table[c.getValue()] = c;
+ }
+ }
+
+ public static PrintCellComments valueOf(int value){
+ return _table[value];
+ }
+}
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+
+package org.apache.poi.ss.usermodel;
+
+/**
+ * The enumeration value indicating the print orientation for a sheet.
+ *
+ * @author Gisella Bronzetti
+ */
+public enum PrintOrientation {
+
+ /**
+ * orientation not specified
+ */
+ DEFAULT(1),
+ /**
+ * portrait orientation
+ */
+ PORTRAIT(2),
+ /**
+ * landscape orientations
+ */
+ LANDSCAPE(3);
+
+
+ private int orientation;
+
+ private PrintOrientation(int orientation) {
+ this.orientation = orientation;
+ }
+
+
+ public int getValue() {
+ return orientation;
+ }
+
+
+ private static PrintOrientation[] _table = new PrintOrientation[4];
+ static {
+ for (PrintOrientation c : values()) {
+ _table[c.getValue()] = c;
+ }
+ }
+
+ public static PrintOrientation valueOf(int value){
+ return _table[value];
+ }
+}
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+
+package org.apache.poi.ss.usermodel;
+
+public interface PrintSetup {
+
+ public static final short LETTER_PAPERSIZE = 1;
+
+ public static final short LEGAL_PAPERSIZE = 5;
+
+ public static final short EXECUTIVE_PAPERSIZE = 7;
+
+ public static final short A4_PAPERSIZE = 9;
+
+ public static final short A5_PAPERSIZE = 11;
+
+ public static final short ENVELOPE_10_PAPERSIZE = 20;
+
+ public static final short ENVELOPE_DL_PAPERSIZE = 27;
+
+ public static final short ENVELOPE_CS_PAPERSIZE = 28;
+
+ public static final short ENVELOPE_MONARCH_PAPERSIZE = 37;
+
+ /**
+ * Set the paper size.
+ * @param size the paper size.
+ */
+ void setPaperSize(short size);
+
+ /**
+ * Set the scale.
+ * @param scale the scale to use
+ */
+ void setScale(short scale);
+
+ /**
+ * Set the page numbering start.
+ * @param start the page numbering start
+ */
+ void setPageStart(short start);
+
+ /**
+ * Set the number of pages wide to fit the sheet in
+ * @param width the number of pages
+ */
+ void setFitWidth(short width);
+
+ /**
+ * Set the number of pages high to fit the sheet in
+ * @param height the number of pages
+ */
+ void setFitHeight(short height);
+
+ /**
+ * Set whether to go left to right or top down in ordering
+ * @param ltor left to right
+ */
+ void setLeftToRight(boolean ltor);
+
+ /**
+ * Set whether to print in landscape
+ * @param ls landscape
+ */
+ void setLandscape(boolean ls);
+
+ /**
+ * Valid settings. I'm not for sure.
+ * @param valid Valid
+ */
+ void setValidSettings(boolean valid);
+
+ /**
+ * Set whether it is black and white
+ * @param mono Black and white
+ */
+ void setNoColor(boolean mono);
+
+ /**
+ * Set whether it is in draft mode
+ * @param d draft
+ */
+ void setDraft(boolean d);
+
+ /**
+ * Print the include notes
+ * @param printnotes print the notes
+ */
+ void setNotes(boolean printnotes);
+
+ /**
+ * Set no orientation. ?
+ * @param orientation Orientation.
+ */
+ void setNoOrientation(boolean orientation);
+
+ /**
+ * Set whether to use page start
+ * @param page Use page start
+ */
+ void setUsePage(boolean page);
+
+ /**
+ * Sets the horizontal resolution.
+ * @param resolution horizontal resolution
+ */
+ void setHResolution(short resolution);
+
+ /**
+ * Sets the vertical resolution.
+ * @param resolution vertical resolution
+ */
+ void setVResolution(short resolution);
+
+ /**
+ * Sets the header margin.
+ * @param headermargin header margin
+ */
+ void setHeaderMargin(double headermargin);
+
+ /**
+ * Sets the footer margin.
+ * @param footermargin footer margin
+ */
+ void setFooterMargin(double footermargin);
+
+ /**
+ * Sets the number of copies.
+ * @param copies number of copies
+ */
+ void setCopies(short copies);
+
+ /**
+ * Returns the paper size.
+ * @return paper size
+ */
+ short getPaperSize();
+
+ /**
+ * Returns the scale.
+ * @return scale
+ */
+ short getScale();
+
+ /**
+ * Returns the page start.
+ * @return page start
+ */
+ short getPageStart();
+
+ /**
+ * Returns the number of pages wide to fit sheet in.
+ * @return number of pages wide to fit sheet in
+ */
+ short getFitWidth();
+
+ /**
+ * Returns the number of pages high to fit the sheet in.
+ * @return number of pages high to fit the sheet in
+ */
+ short getFitHeight();
+
+ /**
+ * Returns the left to right print order.
+ * @return left to right print order
+ */
+ boolean getLeftToRight();
+
+ /**
+ * Returns the landscape mode.
+ * @return landscape mode
+ */
+ boolean getLandscape();
+
+ /**
+ * Returns the valid settings.
+ * @return valid settings
+ */
+ boolean getValidSettings();
+
+ /**
+ * Returns the black and white setting.
+ * @return black and white setting
+ */
+ boolean getNoColor();
+
+ /**
+ * Returns the draft mode.
+ * @return draft mode
+ */
+ boolean getDraft();
+
+ /**
+ * Returns the print notes.
+ * @return print notes
+ */
+ boolean getNotes();
+
+ /**
+ * Returns the no orientation.
+ * @return no orientation
+ */
+ boolean getNoOrientation();
+
+ /**
+ * Returns the use page numbers.
+ * @return use page numbers
+ */
+ boolean getUsePage();
+
+ /**
+ * Returns the horizontal resolution.
+ * @return horizontal resolution
+ */
+ short getHResolution();
+
+ /**
+ * Returns the vertical resolution.
+ * @return vertical resolution
+ */
+ short getVResolution();
+
+ /**
+ * Returns the header margin.
+ * @return header margin
+ */
+ double getHeaderMargin();
+
+ /**
+ * Returns the footer margin.
+ * @return footer margin
+ */
+ double getFooterMargin();
+
+ /**
+ * Returns the number of copies.
+ * @return number of copies
+ */
+ short getCopies();
+
+}
\ No newline at end of file
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+
+package org.apache.poi.ss.usermodel;
+
+/**
+ * Rich text unicode string. These strings can have fonts
+ * applied to arbitary parts of the string.
+ *
+ * @author Glen Stampoultzis (glens at apache.org)
+ * @author Jason Height (jheight at apache.org)
+ */
+public interface RichTextString {
+
+ /**
+ * Applies a font to the specified characters of a string.
+ *
+ * @param startIndex The start index to apply the font to (inclusive)
+ * @param endIndex The end index to apply the font to (exclusive)
+ * @param fontIndex The font to use.
+ */
+ void applyFont(int startIndex, int endIndex, short fontIndex);
+
+ /**
+ * Applies a font to the specified characters of a string.
+ *
+ * @param startIndex The start index to apply the font to (inclusive)
+ * @param endIndex The end index to apply to font to (exclusive)
+ * @param font The index of the font to use.
+ */
+ void applyFont(int startIndex, int endIndex, Font font);
+
+ /**
+ * Sets the font of the entire string.
+ * @param font The font to use.
+ */
+ void applyFont(Font font);
+
+ /**
+ * Removes any formatting that may have been applied to the string.
+ */
+ void clearFormatting();
+
+ /**
+ * Returns the plain string representation.
+ */
+ String getString();
+
+ /**
+ * @return the number of characters in the font.
+ */
+ int length();
+
+ /**
+ * @return The number of formatting runs used.
+ *
+ */
+ int numFormattingRuns();
+
+ /**
+ * The index within the string to which the specified formatting run applies.
+ * @param index the index of the formatting run
+ * @return the index within the string.
+ */
+ int getIndexOfFormattingRun(int index);
+
+ /**
+ * Applies the specified font to the entire string.
+ *
+ * @param fontIndex the font to apply.
+ */
+ void applyFont(short fontIndex);
+
+}
\ No newline at end of file
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+
+package org.apache.poi.ss.usermodel;
+
+import java.lang.Iterable;
+import java.util.Iterator;
+
+/**
+ * High level representation of a row of a spreadsheet.
+ */
+public interface Row extends Iterable<Cell> {
+
+ /**
+ * Use this to create new cells within the row and return it.
+ * <p>
+ * The cell that is returned is a {@link Cell#CELL_TYPE_BLANK}. The type can be changed
+ * either through calling <code>setCellValue</code> or <code>setCellType</code>.
+ *
+ * @param column - the column number this cell represents
+ * @return Cell a high level representation of the created cell.
+ * @throws IllegalArgumentException if columnIndex < 0 or greater than the maximum number of supported columns
+ * (255 for *.xls, 1048576 for *.xlsx)
+ */
+ Cell createCell(int column);
+
+ /**
+ * Use this to create new cells within the row and return it.
+ * <p>
+ * The cell that is returned is a {@link Cell#CELL_TYPE_BLANK}. The type can be changed
+ * either through calling setCellValue or setCellType.
+ *
+ * @param column - the column number this cell represents
+ * @return Cell a high level representation of the created cell.
+ * @throws IllegalArgumentException if columnIndex < 0 or greate than a maximum number of supported columns
+ * (255 for *.xls, 1048576 for *.xlsx)
+ */
+ Cell createCell(int column, int type);
+
+ /**
+ * Remove the Cell from this row.
+ *
+ * @param cell the cell to remove
+ */
+ void removeCell(Cell cell);
+
+ /**
+ * Set the row number of this row.
+ *
+ * @param rowNum the row number (0-based)
+ * @throws IllegalArgumentException if rowNum < 0
+ */
+ void setRowNum(int rowNum);
+
+ /**
+ * Get row number this row represents
+ *
+ * @return the row number (0 based)
+ */
+ int getRowNum();
+
+ /**
+ * Get the cell representing a given column (logical cell) 0-based. If you
+ * ask for a cell that is not defined....you get a null.
+ *
+ * @param cellnum 0 based column number
+ * @return Cell representing that column or null if undefined.
+ * @see #getCell(int, org.apache.poi.ss.usermodel.Row.MissingCellPolicy)
+ */
+ Cell getCell(int cellnum);
+
+ /**
+ * Returns the cell at the given (0 based) index, with the specified {@link org.apache.poi.ss.usermodel.Row.MissingCellPolicy}
+ *
+ * @return the cell at the given (0 based) index
+ * @throws IllegalArgumentException if cellnum < 0 or the specified MissingCellPolicy is invalid
+ * @see Row#RETURN_NULL_AND_BLANK
+ * @see Row#RETURN_BLANK_AS_NULL
+ * @see Row#CREATE_NULL_AS_BLANK
+ */
+ Cell getCell(int cellnum, MissingCellPolicy policy);
+
+ /**
+ * Get the number of the first cell contained in this row.
+ *
+ * @return short representing the first logical cell in the row,
+ * or -1 if the row does not contain any cells.
+ */
+ short getFirstCellNum();
+
+ /**
+ * Gets the index of the last cell contained in this row <b>PLUS ONE</b>. The result also
+ * happens to be the 1-based column number of the last cell. This value can be used as a
+ * standard upper bound when iterating over cells:
+ * <pre>
+ * short minColIx = row.getFirstCellNum();
+ * short maxColIx = row.getLastCellNum();
+ * for(short colIx=minColIx; colIx<maxColIx; colIx++) {
+ * Cell cell = row.getCell(colIx);
+ * if(cell == null) {
+ * continue;
+ * }
+ * //... do something with cell
+ * }
+ * </pre>
+ *
+ * @return short representing the last logical cell in the row <b>PLUS ONE</b>,
+ * or -1 if the row does not contain any cells.
+ */
+ short getLastCellNum();
+
+ /**
+ * Gets the number of defined cells (NOT number of cells in the actual row!).
+ * That is to say if only columns 0,4,5 have values then there would be 3.
+ *
+ * @return int representing the number of defined cells in the row.
+ */
+ int getPhysicalNumberOfCells();
+
+ /**
+ * Set the row's height or set to ff (-1) for undefined/default-height. Set the height in "twips" or
+ * 1/20th of a point.
+ *
+ * @param height rowheight or 0xff for undefined (use sheet default)
+ */
+ void setHeight(short height);
+
+ /**
+ * Set whether or not to display this row with 0 height
+ *
+ * @param zHeight height is zero or not.
+ */
+ void setZeroHeight(boolean zHeight);
+
+ /**
+ * Get whether or not to display this row with 0 height
+ *
+ * @return - zHeight height is zero or not.
+ */
+ boolean getZeroHeight();
+
+ /**
+ * Set the row's height in points.
+ *
+ * @param height the height in points. <code>-1</code> resets to the default height
+ */
+ void setHeightInPoints(float height);
+
+ /**
+ * Get the row's height measured in twips (1/20th of a point). If the height is not set, the default worksheet value is returned,
+ * See {@link Sheet#getDefaultRowHeightInPoints()}
+ *
+ * @return row height measured in twips (1/20th of a point)
+ */
+ short getHeight();
+
+ /**
+ * Returns row height measured in point size. If the height is not set, the default worksheet value is returned,
+ * See {@link Sheet#getDefaultRowHeightInPoints()}
+ *
+ * @return row height measured in point size
+ * @see Sheet#getDefaultRowHeightInPoints()
+ */
+ float getHeightInPoints();
+
+ /**
+ * @return Cell iterator of the physically defined cells. Note element 4 may
+ * actually be row cell depending on how many are defined!
+ */
+ Iterator<Cell> cellIterator();
+
+ /**
+ * Returns the Sheet this row belongs to
+ *
+ * @return the Sheet that owns this row
+ */
+ Sheet getSheet();
+
+ /**
+ * Used to specify the different possible policies
+ * if for the case of null and blank cells
+ */
+ public static final class MissingCellPolicy {
+ private static int NEXT_ID = 1;
+ public final int id;
+ private MissingCellPolicy() {
+ this.id = NEXT_ID++;
+ }
+ }
+ /** Missing cells are returned as null, Blank cells are returned as normal */
+ public static final MissingCellPolicy RETURN_NULL_AND_BLANK = new MissingCellPolicy();
+ /** Missing cells are returned as null, as are blank cells */
+ public static final MissingCellPolicy RETURN_BLANK_AS_NULL = new MissingCellPolicy();
+ /** A new, blank cell is created for missing cells. Blank cells are returned as normal */
+ public static final MissingCellPolicy CREATE_NULL_AS_BLANK = new MissingCellPolicy();
+}
--- /dev/null
+/* ====================================================================\r
+ Licensed to the Apache Software Foundation (ASF) under one or more\r
+ contributor license agreements. See the NOTICE file distributed with\r
+ this work for additional information regarding copyright ownership.\r
+ The ASF licenses this file to You under the Apache License, Version 2.0\r
+ (the "License"); you may not use this file except in compliance with\r
+ the License. You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+ Unless required by applicable law or agreed to in writing, software\r
+ distributed under the License is distributed on an "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ See the License for the specific language governing permissions and\r
+ limitations under the License.\r
+==================================================================== */\r
+package org.apache.poi.ss.usermodel;\r
+\r
+/**\r
+ * All known types of automatic shapes in DrawingML\r
+ *\r
+ * @author Yegor Kozlov\r
+ */\r
+public class ShapeTypes {\r
+ public static final int LINE = 1;\r
+ public static final int LINE_INV = 2;\r
+ public static final int TRIANGLE = 3;\r
+ public static final int RT_TRIANGLE = 4;\r
+ public static final int RECT = 5;\r
+ public static final int DIAMOND = 6;\r
+ public static final int PARALLELOGRAM = 7;\r
+ public static final int TRAPEZOID = 8;\r
+ public static final int NON_ISOSCELES_TRAPEZOID = 9;\r
+ public static final int PENTAGON = 10;\r
+ public static final int HEXAGON = 11;\r
+ public static final int HEPTAGON = 12;\r
+ public static final int OCTAGON = 13;\r
+ public static final int DECAGON = 14;\r
+ public static final int DODECAGON = 15;\r
+ public static final int STAR_4 = 16;\r
+ public static final int STAR_5 = 17;\r
+ public static final int STAR_6 = 18;\r
+ public static final int STAR_7 = 19;\r
+ public static final int STAR_8 = 20;\r
+ public static final int STAR_10 = 21;\r
+ public static final int STAR_12 = 22;\r
+ public static final int STAR_16 = 23;\r
+ public static final int STAR_24 = 24;\r
+ public static final int STAR_32 = 25;\r
+ public static final int ROUND_RECT = 26;\r
+ public static final int ROUND_1_RECT = 27;\r
+ public static final int ROUND_2_SAME_RECT = 28;\r
+ public static final int ROUND_2_DIAG_RECT = 29;\r
+ public static final int SNIP_ROUND_RECT = 30;\r
+ public static final int SNIP_1_RECT = 31;\r
+ public static final int SNIP_2_SAME_RECT = 32;\r
+ public static final int SNIP_2_DIAG_RECT = 33;\r
+ public static final int PLAQUE = 34;\r
+ public static final int ELLIPSE = 35;\r
+ public static final int TEARDROP = 36;\r
+ public static final int HOME_PLATE = 37;\r
+ public static final int CHEVRON = 38;\r
+ public static final int PIE_WEDGE = 39;\r
+ public static final int PIE = 40;\r
+ public static final int BLOCK_ARC = 41;\r
+ public static final int DONUT = 42;\r
+ public static final int NO_SMOKING = 43;\r
+ public static final int RIGHT_ARROW = 44;\r
+ public static final int LEFT_ARROW = 45;\r
+ public static final int UP_ARROW = 46;\r
+ public static final int DOWN_ARROW = 47;\r
+ public static final int STRIPED_RIGHT_ARROW = 48;\r
+ public static final int NOTCHED_RIGHT_ARROW = 49;\r
+ public static final int BENT_UP_ARROW = 50;\r
+ public static final int LEFT_RIGHT_ARROW = 51;\r
+ public static final int UP_DOWN_ARROW = 52;\r
+ public static final int LEFT_UP_ARROW = 53;\r
+ public static final int LEFT_RIGHT_UP_ARROW = 54;\r
+ public static final int QUAD_ARROW = 55;\r
+ public static final int LEFT_ARROW_CALLOUT = 56;\r
+ public static final int RIGHT_ARROW_CALLOUT = 57;\r
+ public static final int UP_ARROW_CALLOUT = 58;\r
+ public static final int DOWN_ARROW_CALLOUT = 59;\r
+ public static final int LEFT_RIGHT_ARROW_CALLOUT = 60;\r
+ public static final int UP_DOWN_ARROW_CALLOUT = 61;\r
+ public static final int QUAD_ARROW_CALLOUT = 62;\r
+ public static final int BENT_ARROW = 63;\r
+ public static final int UTURN_ARROW = 64;\r
+ public static final int CIRCULAR_ARROW = 65;\r
+ public static final int LEFT_CIRCULAR_ARROW = 66;\r
+ public static final int LEFT_RIGHT_CIRCULAR_ARROW = 67;\r
+ public static final int CURVED_RIGHT_ARROW = 68;\r
+ public static final int CURVED_LEFT_ARROW = 69;\r
+ public static final int CURVED_UP_ARROW = 70;\r
+ public static final int CURVED_DOWN_ARROW = 71;\r
+ public static final int SWOOSH_ARROW = 72;\r
+ public static final int CUBE = 73;\r
+ public static final int CAN = 74;\r
+ public static final int LIGHTNING_BOLT = 75;\r
+ public static final int HEART = 76;\r
+ public static final int SUN = 77;\r
+ public static final int MOON = 78;\r
+ public static final int SMILEY_FACE = 79;\r
+ public static final int IRREGULAR_SEAL_1 = 80;\r
+ public static final int IRREGULAR_SEAL_2 = 81;\r
+ public static final int FOLDED_CORNER = 82;\r
+ public static final int BEVEL = 83;\r
+ public static final int FRAME = 84;\r
+ public static final int HALF_FRAME = 85;\r
+ public static final int CORNER = 86;\r
+ public static final int DIAG_STRIPE = 87;\r
+ public static final int CHORD = 88;\r
+ public static final int ARC = 89;\r
+ public static final int LEFT_BRACKET = 90;\r
+ public static final int RIGHT_BRACKET = 91;\r
+ public static final int LEFT_BRACE = 92;\r
+ public static final int RIGHT_BRACE = 93;\r
+ public static final int BRACKET_PAIR = 94;\r
+ public static final int BRACE_PAIR = 95;\r
+ public static final int STRAIGHT_CONNECTOR_1 = 96;\r
+ public static final int BENT_CONNECTOR_2 = 97;\r
+ public static final int BENT_CONNECTOR_3 = 98;\r
+ public static final int BENT_CONNECTOR_4 = 99;\r
+ public static final int BENT_CONNECTOR_5 = 100;\r
+ public static final int CURVED_CONNECTOR_2 = 101;\r
+ public static final int CURVED_CONNECTOR_3 = 102;\r
+ public static final int CURVED_CONNECTOR_4 = 103;\r
+ public static final int CURVED_CONNECTOR_5 = 104;\r
+ public static final int CALLOUT_1 = 105;\r
+ public static final int CALLOUT_2 = 106;\r
+ public static final int CALLOUT_3 = 107;\r
+ public static final int ACCENT_CALLOUT_1 = 108;\r
+ public static final int ACCENT_CALLOUT_2 = 109;\r
+ public static final int ACCENT_CALLOUT_3 = 110;\r
+ public static final int BORDER_CALLOUT_1 = 111;\r
+ public static final int BORDER_CALLOUT_2 = 112;\r
+ public static final int BORDER_CALLOUT_3 = 113;\r
+ public static final int ACCENT_BORDER_CALLOUT_1 = 114;\r
+ public static final int ACCENT_BORDER_CALLOUT_2 = 115;\r
+ public static final int ACCENT_BORDER_CALLOUT_3 = 116;\r
+ public static final int WEDGE_RECT_CALLOUT = 117;\r
+ public static final int WEDGE_ROUND_RECT_CALLOUT = 118;\r
+ public static final int WEDGE_ELLIPSE_CALLOUT = 119;\r
+ public static final int CLOUD_CALLOUT = 120;\r
+ public static final int CLOUD = 121;\r
+ public static final int RIBBON = 122;\r
+ public static final int RIBBON_2 = 123;\r
+ public static final int ELLIPSE_RIBBON = 124;\r
+ public static final int ELLIPSE_RIBBON_2 = 125;\r
+ public static final int LEFT_RIGHT_RIBBON = 126;\r
+ public static final int VERTICAL_SCROLL = 127;\r
+ public static final int HORIZONTAL_SCROLL = 128;\r
+ public static final int WAVE = 129;\r
+ public static final int DOUBLE_WAVE = 130;\r
+ public static final int PLUS = 131;\r
+ public static final int FLOW_CHART_PROCESS = 132;\r
+ public static final int FLOW_CHART_DECISION = 133;\r
+ public static final int FLOW_CHART_INPUT_OUTPUT = 134;\r
+ public static final int FLOW_CHART_PREDEFINED_PROCESS = 135;\r
+ public static final int FLOW_CHART_INTERNAL_STORAGE = 136;\r
+ public static final int FLOW_CHART_DOCUMENT = 137;\r
+ public static final int FLOW_CHART_MULTIDOCUMENT = 138;\r
+ public static final int FLOW_CHART_TERMINATOR = 139;\r
+ public static final int FLOW_CHART_PREPARATION = 140;\r
+ public static final int FLOW_CHART_MANUAL_INPUT = 141;\r
+ public static final int FLOW_CHART_MANUAL_OPERATION = 142;\r
+ public static final int FLOW_CHART_CONNECTOR = 143;\r
+ public static final int FLOW_CHART_PUNCHED_CARD = 144;\r
+ public static final int FLOW_CHART_PUNCHED_TAPE = 145;\r
+ public static final int FLOW_CHART_SUMMING_JUNCTION = 146;\r
+ public static final int FLOW_CHART_OR = 147;\r
+ public static final int FLOW_CHART_COLLATE = 148;\r
+ public static final int FLOW_CHART_SORT = 149;\r
+ public static final int FLOW_CHART_EXTRACT = 150;\r
+ public static final int FLOW_CHART_MERGE = 151;\r
+ public static final int FLOW_CHART_OFFLINE_STORAGE = 152;\r
+ public static final int FLOW_CHART_ONLINE_STORAGE = 153;\r
+ public static final int FLOW_CHART_MAGNETIC_TAPE = 154;\r
+ public static final int FLOW_CHART_MAGNETIC_DISK = 155;\r
+ public static final int FLOW_CHART_MAGNETIC_DRUM = 156;\r
+ public static final int FLOW_CHART_DISPLAY = 157;\r
+ public static final int FLOW_CHART_DELAY = 158;\r
+ public static final int FLOW_CHART_ALTERNATE_PROCESS = 159;\r
+ public static final int FLOW_CHART_OFFPAGE_CONNECTOR = 160;\r
+ public static final int ACTION_BUTTON_BLANK = 161;\r
+ public static final int ACTION_BUTTON_HOME = 162;\r
+ public static final int ACTION_BUTTON_HELP = 163;\r
+ public static final int ACTION_BUTTON_INFORMATION = 164;\r
+ public static final int ACTION_BUTTON_FORWARD_NEXT = 165;\r
+ public static final int ACTION_BUTTON_BACK_PREVIOUS = 166;\r
+ public static final int ACTION_BUTTON_END = 167;\r
+ public static final int ACTION_BUTTON_BEGINNING = 168;\r
+ public static final int ACTION_BUTTON_RETURN = 169;\r
+ public static final int ACTION_BUTTON_DOCUMENT = 170;\r
+ public static final int ACTION_BUTTON_SOUND = 171;\r
+ public static final int ACTION_BUTTON_MOVIE = 172;\r
+ public static final int GEAR_6 = 173;\r
+ public static final int GEAR_9 = 174;\r
+ public static final int FUNNEL = 175;\r
+ public static final int MATH_PLUS = 176;\r
+ public static final int MATH_MINUS = 177;\r
+ public static final int MATH_MULTIPLY = 178;\r
+ public static final int MATH_DIVIDE = 179;\r
+ public static final int MATH_EQUAL = 180;\r
+ public static final int MATH_NOT_EQUAL = 181;\r
+ public static final int CORNER_TABS = 182;\r
+ public static final int SQUARE_TABS = 183;\r
+ public static final int PLAQUE_TABS = 184;\r
+ public static final int CHART_X = 185;\r
+ public static final int CHART_STAR = 186;\r
+ public static final int CHART_PLUS = 187;\r
+}\r
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+
+package org.apache.poi.ss.usermodel;
+
+import java.util.Iterator;
+
+import org.apache.poi.hssf.util.PaneInformation;
+import org.apache.poi.ss.util.CellRangeAddress;
+
+/**
+ * High level representation of a Excel worksheet.
+ *
+ * <p>
+ * Sheets are the central structures within a workbook, and are where a user does most of his spreadsheet work.
+ * The most common type of sheet is the worksheet, which is represented as a grid of cells. Worksheet cells can
+ * contain text, numbers, dates, and formulas. Cells can also be formatted.
+ * </p>
+ */
+public interface Sheet extends Iterable<Row> {
+
+ /* Constants for margins */
+ public static final short LeftMargin = 0;
+
+ public static final short RightMargin = 1;
+
+ public static final short TopMargin = 2;
+
+ public static final short BottomMargin = 3;
+
+ public static final short HeaderMargin = 4;
+
+ public static final short FooterMargin = 5;
+
+ public static final byte PANE_LOWER_RIGHT = (byte) 0;
+
+ public static final byte PANE_UPPER_RIGHT = (byte) 1;
+
+ public static final byte PANE_LOWER_LEFT = (byte) 2;
+
+ public static final byte PANE_UPPER_LEFT = (byte) 3;
+
+ /**
+ * Create a new row within the sheet and return the high level representation
+ *
+ * @param rownum row number
+ * @return high level Row object representing a row in the sheet
+ * @see #removeRow(Row)
+ */
+ Row createRow(int rownum);
+
+ /**
+ * Remove a row from this sheet. All cells contained in the row are removed as well
+ *
+ * @param row representing a row to remove.
+ */
+ void removeRow(Row row);
+
+ /**
+ * Returns the logical row (not physical) 0-based. If you ask for a row that is not
+ * defined you get a null. This is to say row 4 represents the fifth row on a sheet.
+ *
+ * @param rownum row to get (0-based)
+ * @return Row representing the rownumber or null if its not defined on the sheet
+ */
+ Row getRow(int rownum);
+
+ /**
+ * Returns the number of physically defined rows (NOT the number of rows in the sheet)
+ *
+ * @return the number of physically defined rows in this sheet
+ */
+ int getPhysicalNumberOfRows();
+
+ /**
+ * Gets the first row on the sheet
+ *
+ * @return the number of the first logical row on the sheet (0-based)
+ */
+ int getFirstRowNum();
+
+ /**
+ * Gets the last row on the sheet
+ *
+ * @return last row contained n this sheet (0-based)
+ */
+ int getLastRowNum();
+
+ /**
+ * Get the visibility state for a given column
+ *
+ * @param columnIndex - the column to get (0-based)
+ * @param hidden - the visiblity state of the column
+ */
+ void setColumnHidden(int columnIndex, boolean hidden);
+
+ /**
+ * Get the hidden state for a given column
+ *
+ * @param columnIndex - the column to set (0-based)
+ * @return hidden - <code>false</code> if the column is visible
+ */
+ boolean isColumnHidden(int columnIndex);
+
+ /**
+ * Set the width (in units of 1/256th of a character width)
+ * <p>
+ * The maximum column width for an individual cell is 255 characters.
+ * This value represents the number of characters that can be displayed
+ * in a cell that is formatted with the standard font.
+ * </p>
+ *
+ * @param columnIndex - the column to set (0-based)
+ * @param width - the width in units of 1/256th of a character width
+ */
+ void setColumnWidth(int columnIndex, int width);
+
+ /**
+ * get the width (in units of 1/256th of a character width )
+ * @param columnIndex - the column to set (0-based)
+ * @return width - the width in units of 1/256th of a character width
+ */
+ int getColumnWidth(int columnIndex);
+
+ /**
+ * Set the default column width for the sheet (if the columns do not define their own width)
+ * in characters
+ *
+ * @param width default column width measured in characters
+ */
+ void setDefaultColumnWidth(int width);
+
+ /**
+ * Get the default column width for the sheet (if the columns do not define their own width)
+ * in characters
+ *
+ * @return default column width measured in characters
+ */
+ int getDefaultColumnWidth();
+
+ /**
+ * Get the default row height for the sheet (if the rows do not define their own height) in
+ * twips (1/20 of a point)
+ *
+ * @return default row height measured in twips (1/20 of a point)
+ */
+ short getDefaultRowHeight();
+
+ /**
+ * Get the default row height for the sheet (if the rows do not define their own height) in
+ * points.
+ *
+ * @return default row height in points
+ */
+ float getDefaultRowHeightInPoints();
+
+ /**
+ * Set the default row height for the sheet (if the rows do not define their own height) in
+ * twips (1/20 of a point)
+ *
+ * @param height default row height measured in twips (1/20 of a point)
+ */
+ void setDefaultRowHeight(short height);
+
+ /**
+ * Set the default row height for the sheet (if the rows do not define their own height) in
+ * points
+ * @param height default row height
+ */
+ void setDefaultRowHeightInPoints(float height);
+
+ /**
+ * Returns the CellStyle that applies to the given
+ * (0 based) column, or null if no style has been
+ * set for that column
+ */
+ public CellStyle getColumnStyle(int column);
+
+ /**
+ * Sets the CellStyle that applies to the given
+ * (0 based) column.
+ */
+// public CellStyle setColumnStyle(int column, CellStyle style);
+
+ /**
+ * Adds a merged region of cells (hence those cells form one)
+ *
+ * @param region (rowfrom/colfrom-rowto/colto) to merge
+ * @return index of this region
+ */
+ int addMergedRegion(CellRangeAddress region);
+
+ /**
+ * Determines whether the output is vertically centered on the page.
+ *
+ * @param value true to vertically center, false otherwise.
+ */
+ void setVerticallyCenter(boolean value);
+
+ /**
+ * Determines whether the output is horizontally centered on the page.
+ *
+ * @param value true to horizontally center, false otherwise.
+ */
+ void setHorizontallyCenter(boolean value);
+
+ /**
+ * Determine whether printed output for this sheet will be horizontally centered.
+ */
+
+ boolean getHorizontallyCenter();
+
+ /**
+ * Determine whether printed output for this sheet will be vertically centered.
+ */
+ boolean getVerticallyCenter();
+
+ /**
+ * Removes a merged region of cells (hence letting them free)
+ *
+ * @param index of the region to unmerge
+ */
+ void removeMergedRegion(int index);
+
+ /**
+ * Returns the number of merged regions
+ *
+ * @return number of merged regions
+ */
+ int getNumMergedRegions();
+
+ /**
+ * Returns the merged region at the specified index
+ *
+ * @return the merged region at the specified index
+ */
+ public CellRangeAddress getMergedRegion(int index);
+
+ /**
+ * Returns an iterator of the physical rows
+ *
+ * @return an iterator of the PHYSICAL rows. Meaning the 3rd element may not
+ * be the third row if say for instance the second row is undefined.
+ */
+ Iterator<Row> rowIterator();
+
+ /**
+ * Flag indicating whether the sheet displays Automatic Page Breaks.
+ *
+ * @param value <code>true</code> if the sheet displays Automatic Page Breaks.
+ */
+ void setAutobreaks(boolean value);
+
+ /**
+ * Set whether to display the guts or not
+ *
+ * @param value - guts or no guts
+ */
+ void setDisplayGuts(boolean value);
+
+ /**
+ * Set whether the window should show 0 (zero) in cells containing zero value.
+ * When false, cells with zero value appear blank instead of showing the number zero.
+ *
+ * @param value whether to display or hide all zero values on the worksheet
+ */
+ void setDisplayZeros(boolean value);
+
+
+ /**
+ * Gets the flag indicating whether the window should show 0 (zero) in cells containing zero value.
+ * When false, cells with zero value appear blank instead of showing the number zero.
+ *
+ * @return whether all zero values on the worksheet are displayed
+ */
+ boolean isDisplayZeros();
+
+ /**
+ * Flag indicating whether the Fit to Page print option is enabled.
+ *
+ * @param value <code>true</code> if the Fit to Page print option is enabled.
+ */
+ void setFitToPage(boolean value);
+
+ /**
+ * Flag indicating whether summary rows appear below detail in an outline, when applying an outline.
+ *
+ * <p>
+ * When true a summary row is inserted below the detailed data being summarized and a
+ * new outline level is established on that row.
+ * </p>
+ * <p>
+ * When false a summary row is inserted above the detailed data being summarized and a new outline level
+ * is established on that row.
+ * </p>
+ * @param value <code>true</code> if row summaries appear below detail in the outline
+ */
+ void setRowSumsBelow(boolean value);
+
+ /**
+ * Flag indicating whether summary columns appear to the right of detail in an outline, when applying an outline.
+ *
+ * <p>
+ * When true a summary column is inserted to the right of the detailed data being summarized
+ * and a new outline level is established on that column.
+ * </p>
+ * <p>
+ * When false a summary column is inserted to the left of the detailed data being
+ * summarized and a new outline level is established on that column.
+ * </p>
+ * @param value <code>true</code> if col summaries appear right of the detail in the outline
+ */
+ void setRowSumsRight(boolean value);
+
+ /**
+ * Flag indicating whether the sheet displays Automatic Page Breaks.
+ *
+ * @return <code>true</code> if the sheet displays Automatic Page Breaks.
+ */
+ boolean getAutobreaks();
+
+ /**
+ * Get whether to display the guts or not,
+ * default value is true
+ *
+ * @return boolean - guts or no guts
+ */
+ boolean getDisplayGuts();
+
+ /**
+ * Flag indicating whether the Fit to Page print option is enabled.
+ *
+ * @return <code>true</code> if the Fit to Page print option is enabled.
+ */
+ boolean getFitToPage();
+
+ /**
+ * Flag indicating whether summary rows appear below detail in an outline, when applying an outline.
+ *
+ * <p>
+ * When true a summary row is inserted below the detailed data being summarized and a
+ * new outline level is established on that row.
+ * </p>
+ * <p>
+ * When false a summary row is inserted above the detailed data being summarized and a new outline level
+ * is established on that row.
+ * </p>
+ * @return <code>true</code> if row summaries appear below detail in the outline
+ */
+ boolean getRowSumsBelow();
+
+ /**
+ * Flag indicating whether summary columns appear to the right of detail in an outline, when applying an outline.
+ *
+ * <p>
+ * When true a summary column is inserted to the right of the detailed data being summarized
+ * and a new outline level is established on that column.
+ * </p>
+ * <p>
+ * When false a summary column is inserted to the left of the detailed data being
+ * summarized and a new outline level is established on that column.
+ * </p>
+ * @return <code>true</code> if col summaries appear right of the detail in the outline
+ */
+ boolean getRowSumsRight();
+
+ /**
+ * Gets the flag indicating whether this sheet displays the lines
+ * between rows and columns to make editing and reading easier.
+ *
+ * @return <code>true</code> if this sheet displays gridlines.
+ * @see #isPrintGridlines() to check if printing of gridlines is turned on or off
+ */
+ boolean isPrintGridlines();
+
+ /**
+ * Sets the flag indicating whether this sheet should display the lines
+ * between rows and columns to make editing and reading easier.
+ * To turn printing of gridlines use {@link #setPrintGridlines(boolean)}
+ *
+ *
+ * @param show <code>true</code> if this sheet should display gridlines.
+ * @see #setPrintGridlines(boolean)
+ */
+ void setPrintGridlines(boolean show);
+
+ /**
+ * Gets the print setup object.
+ *
+ * @return The user model for the print setup object.
+ */
+ PrintSetup getPrintSetup();
+
+ /**
+ * Gets the user model for the default document header.
+ * <p>
+ * Note that XSSF offers more kinds of document headers than HSSF does
+ * </p>
+ * @return the document header.
+ */
+ Header getHeader();
+
+ /**
+ * Gets the user model for the default document footer.
+ * Note that XSSF offers more kinds of document footers than HSSF does.
+ *
+ * @return the document footer.
+ */
+ Footer getFooter();
+
+ /**
+ * Sets a flag indicating whether this sheet is selected.
+ *<p>
+ * Note: multiple sheets can be selected, but only one sheet can be active at one time.
+ *</p>
+ * @param value <code>true</code> if this sheet is selected
+ * @see Workbook#setActiveSheet(int)
+ */
+ void setSelected(boolean value);
+
+ /**
+ * Gets the size of the margin in inches.
+ *
+ * @param margin which margin to get
+ * @return the size of the margin
+ */
+ double getMargin(short margin);
+
+ /**
+ * Sets the size of the margin in inches.
+ *
+ * @param margin which margin to get
+ * @param size the size of the margin
+ */
+ void setMargin(short margin, double size);
+
+ /**
+ * Answer whether protection is enabled or disabled
+ *
+ * @return true => protection enabled; false => protection disabled
+ */
+ boolean getProtect();
+
+ /**
+ * Answer whether scenario protection is enabled or disabled
+ *
+ * @return true => protection enabled; false => protection disabled
+ */
+ boolean getScenarioProtect();
+
+ /**
+ * Sets the zoom magnication for the sheet. The zoom is expressed as a
+ * fraction. For example to express a zoom of 75% use 3 for the numerator
+ * and 4 for the denominator.
+ *
+ * @param numerator The numerator for the zoom magnification.
+ * @param denominator The denominator for the zoom magnification.
+ */
+ void setZoom(int numerator, int denominator);
+
+ /**
+ * The top row in the visible view when the sheet is
+ * first viewed after opening it in a viewer
+ *
+ * @return short indicating the rownum (0 based) of the top row
+ */
+ short getTopRow();
+
+ /**
+ * The left col in the visible view when the sheet is
+ * first viewed after opening it in a viewer
+ *
+ * @return short indicating the rownum (0 based) of the top row
+ */
+ short getLeftCol();
+
+ /**
+ * Sets desktop window pane display area, when the
+ * file is first opened in a viewer.
+ *
+ * @param toprow the top row to show in desktop window pane
+ * @param leftcol the left column to show in desktop window pane
+ */
+ void showInPane(short toprow, short leftcol);
+
+ /**
+ * Shifts rows between startRow and endRow n number of rows.
+ * If you use a negative number, it will shift rows up.
+ * Code ensures that rows don't wrap around.
+ *
+ * Calls shiftRows(startRow, endRow, n, false, false);
+ *
+ * <p>
+ * Additionally shifts merged regions that are completely defined in these
+ * rows (ie. merged 2 cells on a row to be shifted).
+ * @param startRow the row to start shifting
+ * @param endRow the row to end shifting
+ * @param n the number of rows to shift
+ */
+ void shiftRows(int startRow, int endRow, int n);
+
+ /**
+ * Shifts rows between startRow and endRow n number of rows.
+ * If you use a negative number, it will shift rows up.
+ * Code ensures that rows don't wrap around
+ *
+ * <p>
+ * Additionally shifts merged regions that are completely defined in these
+ * rows (ie. merged 2 cells on a row to be shifted).
+ * <p>
+ * @param startRow the row to start shifting
+ * @param endRow the row to end shifting
+ * @param n the number of rows to shift
+ * @param copyRowHeight whether to copy the row height during the shift
+ * @param resetOriginalRowHeight whether to set the original row's height to the default
+ */
+ void shiftRows(int startRow, int endRow, int n, boolean copyRowHeight, boolean resetOriginalRowHeight);
+
+ /**
+ * Creates a split (freezepane). Any existing freezepane or split pane is overwritten.
+ * @param colSplit Horizonatal position of split.
+ * @param rowSplit Vertical position of split.
+ * @param topRow Top row visible in bottom pane
+ * @param leftmostColumn Left column visible in right pane.
+ */
+ void createFreezePane(int colSplit, int rowSplit, int leftmostColumn, int topRow);
+
+ /**
+ * Creates a split (freezepane). Any existing freezepane or split pane is overwritten.
+ * @param colSplit Horizonatal position of split.
+ * @param rowSplit Vertical position of split.
+ */
+ void createFreezePane(int colSplit, int rowSplit);
+
+ /**
+ * Creates a split pane. Any existing freezepane or split pane is overwritten.
+ * @param xSplitPos Horizonatal position of split (in 1/20th of a point).
+ * @param ySplitPos Vertical position of split (in 1/20th of a point).
+ * @param topRow Top row visible in bottom pane
+ * @param leftmostColumn Left column visible in right pane.
+ * @param activePane Active pane. One of: PANE_LOWER_RIGHT,
+ * PANE_UPPER_RIGHT, PANE_LOWER_LEFT, PANE_UPPER_LEFT
+ * @see #PANE_LOWER_LEFT
+ * @see #PANE_LOWER_RIGHT
+ * @see #PANE_UPPER_LEFT
+ * @see #PANE_UPPER_RIGHT
+ */
+ void createSplitPane(int xSplitPos, int ySplitPos, int leftmostColumn, int topRow, int activePane);
+
+ /**
+ * Returns the information regarding the currently configured pane (split or freeze)
+ *
+ * @return null if no pane configured, or the pane information.
+ */
+ PaneInformation getPaneInformation();
+
+ /**
+ * Sets whether the gridlines are shown in a viewer
+ *
+ * @param show whether to show gridlines or not
+ */
+ void setDisplayGridlines(boolean show);
+
+ /**
+ * Returns if gridlines are displayed
+ *
+ * @return whether gridlines are displayed
+ */
+ boolean isDisplayGridlines();
+
+ /**
+ * Sets whether the formulas are shown in a viewer
+ *
+ * @param show whether to show formulas or not
+ */
+ void setDisplayFormulas(boolean show);
+
+ /**
+ * Returns if formulas are displayed
+ *
+ * @return whether formulas are displayed
+ */
+ boolean isDisplayFormulas();
+
+ /**
+ * Sets whether the RowColHeadings are shown in a viewer
+ *
+ * @param show whether to show RowColHeadings or not
+ */
+ void setDisplayRowColHeadings(boolean show);
+
+ /**
+ * Returns if RowColHeadings are displayed.
+ * @return whether RowColHeadings are displayed
+ */
+ boolean isDisplayRowColHeadings();
+
+ /**
+ * Sets a page break at the indicated row
+ * @param row FIXME: Document this!
+ */
+ void setRowBreak(int row);
+
+ /**
+ * Determines if there is a page break at the indicated row
+ * @param row FIXME: Document this!
+ * @return FIXME: Document this!
+ */
+ boolean isRowBroken(int row);
+
+ /**
+ * Removes the page break at the indicated row
+ * @param row
+ */
+ void removeRowBreak(int row);
+
+ /**
+ * Retrieves all the horizontal page breaks
+ * @return all the horizontal page breaks, or null if there are no row page breaks
+ */
+ int[] getRowBreaks();
+
+ /**
+ * Retrieves all the vertical page breaks
+ * @return all the vertical page breaks, or null if there are no column page breaks
+ */
+ int[] getColumnBreaks();
+
+ /**
+ * Sets a page break at the indicated column
+ * @param column
+ */
+ void setColumnBreak(int column);
+
+ /**
+ * Determines if there is a page break at the indicated column
+ * @param column FIXME: Document this!
+ * @return FIXME: Document this!
+ */
+ boolean isColumnBroken(int column);
+
+ /**
+ * Removes a page break at the indicated column
+ * @param column
+ */
+ void removeColumnBreak(int column);
+
+ /**
+ * Expands or collapses a column group.
+ *
+ * @param columnNumber One of the columns in the group.
+ * @param collapsed true = collapse group, false = expand group.
+ */
+ void setColumnGroupCollapsed(int columnNumber, boolean collapsed);
+
+ /**
+ * Create an outline for the provided column range.
+ *
+ * @param fromColumn beginning of the column range.
+ * @param toColumn end of the column range.
+ */
+ void groupColumn(int fromColumn, int toColumn);
+
+ /**
+ * Ungroup a range of columns that were previously groupped
+ *
+ * @param fromColumn start column (0-based)
+ * @param toColumn end column (0-based)
+ */
+ void ungroupColumn(int fromColumn, int toColumn);
+
+ /**
+ * Tie a range of rows together so that they can be collapsed or expanded
+ *
+ * @param fromRow start row (0-based)
+ * @param toRow end row (0-based)
+ */
+ void groupRow(int fromRow, int toRow);
+
+ /**
+ * Ungroup a range of rows that were previously groupped
+ *
+ * @param fromRow start row (0-based)
+ * @param toRow end row (0-based)
+ */
+ void ungroupRow(int fromRow, int toRow);
+
+ /**
+ * Set view state of a groupped range of rows
+ *
+ * @param row start row of a groupped range of rows (0-based)
+ * @param collapse whether to expand/collapse the detail rows
+ */
+ void setRowGroupCollapsed(int row, boolean collapse);
+
+ /**
+ * Sets the default column style for a given column. POI will only apply this style to new cells added to the sheet.
+ *
+ * @param column the column index
+ * @param style the style to set
+ */
+ void setDefaultColumnStyle(int column, CellStyle style);
+
+ /**
+ * Adjusts the column width to fit the contents.
+ *
+ * <p>
+ * This process can be relatively slow on large sheets, so this should
+ * normally only be called once per column, at the end of your
+ * processing.
+ * </p>
+ * You can specify whether the content of merged cells should be considered or ignored.
+ * Default is to ignore merged cells.
+ *
+ * @param column the column index
+ */
+ void autoSizeColumn(int column);
+
+ /**
+ * Adjusts the column width to fit the contents.
+ * <p>
+ * This process can be relatively slow on large sheets, so this should
+ * normally only be called once per column, at the end of your
+ * processing.
+ * </p>
+ * You can specify whether the content of merged cells should be considered or ignored.
+ * Default is to ignore merged cells.
+ *
+ * @param column the column index
+ * @param useMergedCells whether to use the contents of merged cells when calculating the width of the column
+ */
+ void autoSizeColumn(int column, boolean useMergedCells);
+
+ /**
+ * Returns cell comment for the specified row and column
+ *
+ * @return cell comment or <code>null</code> if not found
+ */
+ Comment getCellComment(int row, int column);
+
+ /**
+ * Creates the top-level drawing patriarch.
+ *
+ * @return The new drawing patriarch.
+ */
+ Drawing createDrawingPatriarch();
+
+
+ /**
+ * Return the parent workbook
+ *
+ * @return the parent workbook
+ */
+ Workbook getWorkbook();
+
+ /**
+ * Returns the name of this sheet
+ *
+ * @return the name of this sheet
+ */
+ String getSheetName();
+
+ /**
+ * Note - this is not the same as whether the sheet is focused (isActive)
+ * @return <code>true</code> if this sheet is currently selected
+ */
+ boolean isSelected();
+
+}
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+
+package org.apache.poi.ss.usermodel;
+
+public interface Textbox {
+
+ public final static short OBJECT_TYPE_TEXT = 6;
+
+ /**
+ * @return the rich text string for this textbox.
+ */
+ RichTextString getString();
+
+ /**
+ * @param string Sets the rich text string used by this object.
+ */
+ void setString(RichTextString string);
+
+ /**
+ * @return Returns the left margin within the textbox.
+ */
+ int getMarginLeft();
+
+ /**
+ * Sets the left margin within the textbox.
+ */
+ void setMarginLeft(int marginLeft);
+
+ /**
+ * @return returns the right margin within the textbox.
+ */
+ int getMarginRight();
+
+ /**
+ * Sets the right margin within the textbox.
+ */
+ void setMarginRight(int marginRight);
+
+ /**
+ * @return returns the top margin within the textbox.
+ */
+ int getMarginTop();
+
+ /**
+ * Sets the top margin within the textbox.
+ */
+ void setMarginTop(int marginTop);
+
+ /**
+ * Gets the bottom margin within the textbox.
+ */
+ int getMarginBottom();
+
+ /**
+ * Sets the bottom margin within the textbox.
+ */
+ void setMarginBottom(int marginBottom);
+
+}
\ No newline at end of file
--- /dev/null
+/* ====================================================================\r
+ Licensed to the Apache Software Foundation (ASF) under one or more\r
+ contributor license agreements. See the NOTICE file distributed with\r
+ this work for additional information regarding copyright ownership.\r
+ The ASF licenses this file to You under the Apache License, Version 2.0\r
+ (the "License"); you may not use this file except in compliance with\r
+ the License. You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+ Unless required by applicable law or agreed to in writing, software\r
+ distributed under the License is distributed on an "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ See the License for the specific language governing permissions and\r
+ limitations under the License.\r
+==================================================================== */\r
+\r
+package org.apache.poi.ss.usermodel;\r
+\r
+/**\r
+ * This enumeration value indicates the type of vertical alignment for a cell, i.e.,\r
+ * whether it is aligned top, bottom, vertically centered, justified or distributed.\r
+ */\r
+public enum VerticalAlignment {\r
+ /**\r
+ * The vertical alignment is aligned-to-top.\r
+ */\r
+ TOP,\r
+\r
+ /**\r
+ * The vertical alignment is centered across the height of the cell.\r
+ */\r
+ CENTER,\r
+\r
+ /**\r
+ * The vertical alignment is aligned-to-bottom.\r
+ */\r
+ BOTTOM,\r
+\r
+ /**\r
+ * <p>\r
+ * When text direction is horizontal: the vertical alignment of lines of text is distributed vertically,\r
+ * where each line of text inside the cell is evenly distributed across the height of the cell,\r
+ * with flush top and bottom margins.\r
+ * </p>\r
+ * <p>\r
+ * When text direction is vertical: similar behavior as horizontal justification.\r
+ * The alignment is justified (flush top and bottom in this case). For each line of text, each\r
+ * line of the wrapped text in a cell is aligned to the top and bottom (except the last line).\r
+ * If no single line of text wraps in the cell, then the text is not justified.\r
+ * </p>\r
+ */\r
+ JUSTIFY,\r
+\r
+ /**\r
+ * <p>\r
+ * When text direction is horizontal: the vertical alignment of lines of text is distributed vertically,\r
+ * where each line of text inside the cell is evenly distributed across the height of the cell,\r
+ * with flush top\r
+ * </p>\r
+ * <p>\r
+ * When text direction is vertical: behaves exactly as distributed horizontal alignment.\r
+ * The first words in a line of text (appearing at the top of the cell) are flush\r
+ * with the top edge of the cell, and the last words of a line of text are flush with the bottom edge of the cell,\r
+ * and the line of text is distributed evenly from top to bottom.\r
+ * </p>\r
+ */\r
+ DISTRIBUTED\r
+}\r
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+
+package org.apache.poi.ss.usermodel;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.List;
+
+import org.apache.poi.ss.usermodel.Row.MissingCellPolicy;
+
+/**
+ * High level representation of a Excel workbook. This is the first object most users
+ * will construct whether they are reading or writing a workbook. It is also the
+ * top level object for creating new sheets/etc.
+ */
+public interface Workbook {
+
+ /** Extended windows meta file */
+ public static final int PICTURE_TYPE_EMF = 2;
+
+ /** Windows Meta File */
+ public static final int PICTURE_TYPE_WMF = 3;
+
+ /** Mac PICT format */
+ public static final int PICTURE_TYPE_PICT = 4;
+
+ /** JPEG format */
+ public static final int PICTURE_TYPE_JPEG = 5;
+
+ /** PNG format */
+ public static final int PICTURE_TYPE_PNG = 6;
+
+ /** Device independent bitmap */
+ public static final int PICTURE_TYPE_DIB = 7;
+
+ /**
+ * Convenience method to get the active sheet. The active sheet is is the sheet
+ * which is currently displayed when the workbook is viewed in Excel.
+ * 'Selected' sheet(s) is a distinct concept.
+ *
+ * @return the index of the active sheet (0-based)
+ */
+ int getActiveSheetIndex();
+
+ /**
+ * Convenience method to set the active sheet. The active sheet is is the sheet
+ * which is currently displayed when the workbook is viewed in Excel.
+ * 'Selected' sheet(s) is a distinct concept.
+ *
+ * @param sheetIndex index of the active sheet (0-based)
+ */
+ void setActiveSheet(int sheetIndex);
+
+ /**
+ * Gets the first tab that is displayed in the list of tabs in excel.
+ *
+ * @return the first tab that to display in the list of tabs (0-based).
+ */
+ int getFirstVisibleTab();
+
+ /**
+ * Sets the first tab that is displayed in the list of tabs in excel.
+ *
+ * @param sheetIndex the first tab that to display in the list of tabs (0-based)
+ */
+ void setFirstVisibleTab(int sheetIndex);
+
+ /**
+ * Sets the order of appearance for a given sheet.
+ *
+ * @param sheetname the name of the sheet to reorder
+ * @param pos the position that we want to insert the sheet into (0 based)
+ */
+ void setSheetOrder(String sheetname, int pos);
+
+ /**
+ * Sets the tab whose data is actually seen when the sheet is opened.
+ * This may be different from the "selected sheet" since excel seems to
+ * allow you to show the data of one sheet when another is seen "selected"
+ * in the tabs (at the bottom).
+ *
+ * @see Sheet#setSelected(boolean)
+ * @param index the index of the sheet to select (0 based)
+ */
+ void setSelectedTab(int index);
+
+ /**
+ * Set the sheet name.
+ *
+ * @param sheet number (0 based)
+ * @throws IllegalArgumentException if the name is greater than 31 chars or contains <code>/\?*[]</code>
+ */
+ void setSheetName(int sheet, String name);
+
+ /**
+ * Set the sheet name
+ *
+ * @param sheet sheet number (0 based)
+ * @return Sheet name
+ */
+ String getSheetName(int sheet);
+
+ /**
+ * Returns the index of the sheet by his name
+ *
+ * @param name the sheet name
+ * @return index of the sheet (0 based)
+ */
+ int getSheetIndex(String name);
+
+ /**
+ * Returns the index of the given sheet
+ *
+ * @param sheet the sheet to look up
+ * @return index of the sheet (0 based)
+ */
+ int getSheetIndex(Sheet sheet);
+
+ /**
+ * Sreate an Sheet for this Workbook, adds it to the sheets and returns
+ * the high level representation. Use this to create new sheets.
+ *
+ * @return Sheet representing the new sheet.
+ */
+ Sheet createSheet();
+
+ /**
+ * Create an Sheet for this Workbook, adds it to the sheets and returns
+ * the high level representation. Use this to create new sheets.
+ *
+ * @param sheetname sheetname to set for the sheet.
+ * @return Sheet representing the new sheet.
+ * @throws IllegalArgumentException if the name is greater than 31 chars or contains <code>/\?*[]</code>
+ */
+ Sheet createSheet(String sheetname);
+
+ /**
+ * Create an Sheet from an existing sheet in the Workbook.
+ *
+ * @return Sheet representing the cloned sheet.
+ */
+ Sheet cloneSheet(int sheetNum);
+
+
+ /**
+ * Get the number of spreadsheets in the workbook
+ *
+ * @return the number of sheets
+ */
+ int getNumberOfSheets();
+
+ /**
+ * Get the Sheet object at the given index.
+ *
+ * @param index of the sheet number (0-based physical & logical)
+ * @return Sheet at the provided index
+ */
+ Sheet getSheetAt(int index);
+
+ /**
+ * Get sheet with the given name
+ *
+ * @param name of the sheet
+ * @return Sheet with the name provided or <code>null</code> if it does not exist
+ */
+ Sheet getSheet(String name);
+
+ /**
+ * Removes sheet at the given index
+ *
+ * @param index of the sheet to remove (0-based)
+ */
+ void removeSheetAt(int index);
+
+ /**
+ * Sets the repeating rows and columns for a sheet (as found in
+ * File->PageSetup->Sheet). This is function is included in the workbook
+ * because it creates/modifies name records which are stored at the
+ * workbook level.
+ * <p>
+ * To set just repeating columns:
+ * <pre>
+ * workbook.setRepeatingRowsAndColumns(0,0,1,-1-1);
+ * </pre>
+ * To set just repeating rows:
+ * <pre>
+ * workbook.setRepeatingRowsAndColumns(0,-1,-1,0,4);
+ * </pre>
+ * To remove all repeating rows and columns for a sheet.
+ * <pre>
+ * workbook.setRepeatingRowsAndColumns(0,-1,-1,-1,-1);
+ * </pre>
+ *
+ * @param sheetIndex 0 based index to sheet.
+ * @param startColumn 0 based start of repeating columns.
+ * @param endColumn 0 based end of repeating columns.
+ * @param startRow 0 based start of repeating rows.
+ * @param endRow 0 based end of repeating rows.
+ */
+ void setRepeatingRowsAndColumns(int sheetIndex, int startColumn, int endColumn, int startRow, int endRow);
+
+ /**
+ * Create a new Font and add it to the workbook's font table
+ *
+ * @return new font object
+ */
+ Font createFont();
+
+ /**
+ * Finds a font that matches the one with the supplied attributes
+ *
+ * @return the font with the matched attributes or <code>null</code>
+ */
+ Font findFont(short boldWeight, short color, short fontHeight, String name, boolean italic, boolean strikeout, short typeOffset, byte underline);
+
+ /**
+ * Get the number of fonts in the font table
+ *
+ * @return number of fonts
+ */
+ short getNumberOfFonts();
+
+ /**
+ * Get the font at the given index number
+ *
+ * @param idx index number (0-based)
+ * @return font at the index
+ */
+ Font getFontAt(short idx);
+
+ /**
+ * Create a new Cell style and add it to the workbook's style table
+ *
+ * @return the new Cell Style object
+ */
+ CellStyle createCellStyle();
+
+ /**
+ * Get the number of styles the workbook contains
+ *
+ * @return count of cell styles
+ */
+ short getNumCellStyles();
+
+ /**
+ * Get the cell style object at the given index
+ *
+ * @param idx index within the set of styles (0-based)
+ * @return CellStyle object at the index
+ */
+ CellStyle getCellStyleAt(short idx);
+
+ /**
+ * Write out this workbook to an Outputstream.
+ *
+ * @param stream - the java OutputStream you wish to write to
+ * @exception IOException if anything can't be written.
+ */
+ void write(OutputStream stream) throws IOException;
+
+ /**
+ * Gets the total number of named ranges in the workbook
+ *
+ * @return number of named ranges
+ */
+ int getNumberOfNames();
+
+ /**
+ * Gets the Named range
+ *
+ * @param index position of the named range (0-based)
+ * @return named range high level
+ */
+ Name getNameAt(int index);
+
+ /**
+ * Creates a new named range in this workbook
+ *
+ * @return new named range object
+ */
+ Name createName();
+
+ /**
+ * Gets the named range index by his name
+ * <i>Note:</i>Excel named ranges are case-insensitive and
+ * this method performs a case-insensitive search.
+ *
+ * @param name named range name
+ * @return named range index
+ */
+ int getNameIndex(String name);
+
+ /**
+ * Remove the named range by his index
+ *
+ * @param index named range index (0 based)
+ */
+ void removeName(int index);
+
+ /**
+ * Remove the named range by his name
+ *
+ * @param name named range name
+ */
+ void removeName(String name);
+
+ /**
+ * Sets the printarea for the sheet provided
+ * <p>
+ * i.e. Reference = $A$1:$B$2
+ * @param sheetIndex Zero-based sheet index (0 Represents the first sheet to keep consistent with java)
+ * @param reference Valid name Reference for the Print Area
+ */
+ void setPrintArea(int sheetIndex, String reference);
+
+ /**
+ * For the Convenience of Java Programmers maintaining pointers.
+ * @see #setPrintArea(int, String)
+ * @param sheetIndex Zero-based sheet index (0 = First Sheet)
+ * @param startColumn Column to begin printarea
+ * @param endColumn Column to end the printarea
+ * @param startRow Row to begin the printarea
+ * @param endRow Row to end the printarea
+ */
+ void setPrintArea(int sheetIndex, int startColumn, int endColumn, int startRow, int endRow);
+
+ /**
+ * Retrieves the reference for the printarea of the specified sheet,
+ * the sheet name is appended to the reference even if it was not specified.
+ *
+ * @param sheetIndex Zero-based sheet index (0 Represents the first sheet to keep consistent with java)
+ * @return String Null if no print area has been defined
+ */
+ String getPrintArea(int sheetIndex);
+
+ /**
+ * Delete the printarea for the sheet specified
+ *
+ * @param sheetIndex Zero-based sheet index (0 = First Sheet)
+ */
+ void removePrintArea(int sheetIndex);
+
+ /**
+ * Retrieves the current policy on what to do when
+ * getting missing or blank cells from a row.
+ * <p>
+ * The default is to return blank and null cells.
+ * {@link MissingCellPolicy}
+ * </p>
+ */
+ MissingCellPolicy getMissingCellPolicy();
+
+ /**
+ * Sets the policy on what to do when
+ * getting missing or blank cells from a row.
+ *
+ * This will then apply to all calls to
+ * {@link Row#getCell(int)} }. See
+ * {@link MissingCellPolicy}
+ */
+ void setMissingCellPolicy(MissingCellPolicy missingCellPolicy);
+
+ /**
+ * Returns the instance of DataFormat for this workbook.
+ *
+ * @return the DataFormat object
+ */
+ DataFormat createDataFormat();
+
+ /**
+ * Adds a picture to the workbook.
+ *
+ * @param pictureData The bytes of the picture
+ * @param format The format of the picture.
+ *
+ * @return the index to this picture (1 based).
+ * @see #PICTURE_TYPE_EMF
+ * @see #PICTURE_TYPE_WMF
+ * @see #PICTURE_TYPE_PICT
+ * @see #PICTURE_TYPE_JPEG
+ * @see #PICTURE_TYPE_PNG
+ * @see #PICTURE_TYPE_DIB
+ */
+ int addPicture(byte[] pictureData, int format);
+
+ /**
+ * Gets all pictures from the Workbook.
+ *
+ * @return the list of pictures (a list of {@link PictureData} objects.)
+ */
+ List getAllPictures();
+
+ /**
+ * Returns an object that handles instantiating concrete
+ * classes of the various instances one needs for HSSF and XSSF.
+ */
+ CreationHelper getCreationHelper();
+
+ /**
+ * @return <code>false</code> if this workbook is not visible in the GUI
+ */
+ boolean isHidden();
+
+ /**
+ * @param hiddenFlag pass <code>false</code> to make the workbook visible in the GUI
+ */
+ void setHidden(boolean hiddenFlag);
+
+ /**
+ * Check whether a sheet is hidden.
+ * <p>
+ * Note that a sheet could instead be set to be very hidden, which is different
+ * ({@link #isSheetVeryHidden(int)})
+ * </p>
+ * @param sheetIx Number
+ * @return <code>true</code> if sheet is hidden
+ */
+ boolean isSheetHidden(int sheetIx);
+
+ /**
+ * Check whether a sheet is very hidden.
+ * <p>
+ * This is different from the normal hidden status
+ * ({@link #isSheetHidden(int)})
+ * </p>
+ * @param sheetIx sheet index to check
+ * @return <code>true</code> if sheet is very hidden
+ */
+ boolean isSheetVeryHidden(int sheetIx);
+
+ /**
+ * Hide or unhide a sheet
+ *
+ * @param sheetIx the sheet index (0-based)
+ * @param hidden True to mark the sheet as hidden, false otherwise
+ */
+ void setSheetHidden(int sheetIx, boolean hidden);
+
+ /**
+ * Hide or unhide a sheet.
+ * <pre>
+ * 0 = not hidden
+ * 1 = hidden
+ * 2 = very hidden.
+ * </pre>
+ * @param sheetIx The sheet number
+ * @param hidden 0 for not hidden, 1 for hidden, 2 for very hidden
+ */
+ void setSheetHidden(int sheetIx, int hidden);
+}
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-package org.apache.poi.common.usermodel;
-
-import java.awt.Color;
-
-public interface Fill {
- public Color getColor();
- public void setColor(Color color);
-}
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-package org.apache.poi.common.usermodel;
-
-/**
- * Represents a hyperlink.
- */
-public interface Hyperlink {
- /**
- * Link to a existing file or web page
- */
- public static final int LINK_URL = 1;
-
- /**
- * Link to a place in this document
- */
- public static final int LINK_DOCUMENT = 2;
-
- /**
- * Link to an E-mail address
- */
- public static final int LINK_EMAIL = 3;
-
- /**
- * Link to a file
- */
- public static final int LINK_FILE = 4;
-
-
- /**
- * Hypelink address. Depending on the hyperlink type it can be URL, e-mail, patrh to a file, etc.
- *
- * @return the address of this hyperlink
- */
- public String getAddress();
-
- /**
- * Hypelink address. Depending on the hyperlink type it can be URL, e-mail, patrh to a file, etc.
- *
- * @param address the address of this hyperlink
- */
- public void setAddress(String address);
-
- /**
- * Return text label for this hyperlink
- *
- * @return text to display
- */
- public String getLabel();
-
- /**
- * Sets text label for this hyperlink
- *
- * @param label text label for this hyperlink
- */
- public void setLabel(String label);
-
- /**
- * Return the type of this hyperlink
- *
- * @return the type of this hyperlink
- */
- public int getType();
-}
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-package org.apache.poi.common.usermodel;
-
-public interface LineStyle {
-
-}
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-package org.apache.poi.sl.usermodel;
-
-public interface AutoShape extends SimpleShape {
- public TextRun getTextRun();
-}
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-package org.apache.poi.sl.usermodel;
-
-public interface Background extends Shape {
-
-}
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-package org.apache.poi.sl.usermodel;
-
-public interface Fill extends org.apache.poi.common.usermodel.Fill {
-}
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-package org.apache.poi.sl.usermodel;
-
-public interface FontCollection {
-
-}
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-package org.apache.poi.sl.usermodel;
-
-/**
- * A PowerPoint hyperlink
- */
-public interface Hyperlink extends org.apache.poi.common.usermodel.Hyperlink {
-}
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-package org.apache.poi.sl.usermodel;
-
-public interface Line extends AutoShape {
-
-}
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-package org.apache.poi.sl.usermodel;
-
-public interface LineStyle extends org.apache.poi.common.usermodel.LineStyle {
-}
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-package org.apache.poi.sl.usermodel;
-
-public interface MasterSheet extends Sheet {
-
-}
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-package org.apache.poi.sl.usermodel;
-
-public interface Notes extends Sheet {
- public TextRun getTextRun();
-}
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-package org.apache.poi.sl.usermodel;
-
-public interface Picture extends SimpleShape {
- public PictureData getPictureData();
-}
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-package org.apache.poi.sl.usermodel;
-
-public interface PictureData {
- public int getType();
- public byte[] getUID();
-
- public byte[] getData();
- public void setData(byte[] data);
-}
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-package org.apache.poi.sl.usermodel;
-
-/**
- * Common SlideShow resources, such as fonts, pictures
- * and multimedia data
- */
-public interface Resources {
- public FontCollection getFontCollection();
-
- public PictureData[] getPictureData();
- public int addPictureData(PictureData pict);
-}
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-package org.apache.poi.sl.usermodel;
-
-import java.awt.geom.Rectangle2D;
-
-public interface Shape {
- public int getShapeType();
-
- public Rectangle2D getAnchor();
- public void setAnchor(Rectangle2D anchor);
-
- public void moveTo(float x, float y);
-
- public Shape getParent();
-}
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-package org.apache.poi.sl.usermodel;
-
-public interface ShapeContainer {
- public Shape[] getShapes();
- public void addShape(Shape shape);
- public boolean removeShape(Shape shape);
-}
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-package org.apache.poi.sl.usermodel;
-
-public interface ShapeGroup extends ShapeContainer {
-
-}
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-package org.apache.poi.sl.usermodel;
-
-public interface ShapeTypes {
- public static final int NotPrimitive = 0;
- public static final int Rectangle = 1;
- public static final int RoundRectangle = 2;
- public static final int Ellipse = 3;
- public static final int Diamond = 4;
- public static final int IsocelesTriangle = 5;
- public static final int RightTriangle = 6;
- public static final int Parallelogram = 7;
- public static final int Trapezoid = 8;
- public static final int Hexagon = 9;
- public static final int Octagon = 10;
- public static final int Plus = 11;
- public static final int Star = 12;
- public static final int Arrow = 13;
- public static final int ThickArrow = 14;
- public static final int HomePlate = 15;
- public static final int Cube = 16;
- public static final int Balloon = 17;
- public static final int Seal = 18;
- public static final int Arc = 19;
- public static final int Line = 20;
- public static final int Plaque = 21;
- public static final int Can = 22;
- public static final int Donut = 23;
- public static final int TextSimple = 24;
- public static final int TextOctagon = 25;
- public static final int TextHexagon = 26;
- public static final int TextCurve = 27;
- public static final int TextWave = 28;
- public static final int TextRing = 29;
- public static final int TextOnCurve = 30;
- public static final int TextOnRing = 31;
- public static final int StraightConnector1 = 32;
- public static final int BentConnector2 = 33;
- public static final int BentConnector3 = 34;
- public static final int BentConnector4 = 35;
- public static final int BentConnector5 = 36;
- public static final int CurvedConnector2 = 37;
- public static final int CurvedConnector3 = 38;
- public static final int CurvedConnector4 = 39;
- public static final int CurvedConnector5 = 40;
- public static final int Callout1 = 41;
- public static final int Callout2 = 42;
- public static final int Callout3 = 43;
- public static final int AccentCallout1 = 44;
- public static final int AccentCallout2 = 45;
- public static final int AccentCallout3 = 46;
- public static final int BorderCallout1 = 47;
- public static final int BorderCallout2 = 48;
- public static final int BorderCallout3 = 49;
- public static final int AccentBorderCallout1 = 50;
- public static final int AccentBorderCallout2 = 51;
- public static final int AccentBorderCallout3 = 52;
- public static final int Ribbon = 53;
- public static final int Ribbon2 = 54;
- public static final int Chevron = 55;
- public static final int Pentagon = 56;
- public static final int NoSmoking = 57;
- public static final int Star8 = 58;
- public static final int Star16 = 59;
- public static final int Star32 = 60;
- public static final int WedgeRectCallout = 61;
- public static final int WedgeRRectCallout = 62;
- public static final int WedgeEllipseCallout = 63;
- public static final int Wave = 64;
- public static final int FoldedCorner = 65;
- public static final int LeftArrow = 66;
- public static final int DownArrow = 67;
- public static final int UpArrow = 68;
- public static final int LeftRightArrow = 69;
- public static final int UpDownArrow = 70;
- public static final int IrregularSeal1 = 71;
- public static final int IrregularSeal2 = 72;
- public static final int LightningBolt = 73;
- public static final int Heart = 74;
- public static final int PictureFrame = 75;
- public static final int QuadArrow = 76;
- public static final int LeftArrowCallout = 77;
- public static final int RightArrowCallout = 78;
- public static final int UpArrowCallout = 79;
- public static final int DownArrowCallout = 80;
- public static final int LeftRightArrowCallout = 81;
- public static final int UpDownArrowCallout = 82;
- public static final int QuadArrowCallout = 83;
- public static final int Bevel = 84;
- public static final int LeftBracket = 85;
- public static final int RightBracket = 86;
- public static final int LeftBrace = 87;
- public static final int RightBrace = 88;
- public static final int LeftUpArrow = 89;
- public static final int BentUpArrow = 90;
- public static final int BentArrow = 91;
- public static final int Star24 = 92;
- public static final int StripedRightArrow = 93;
- public static final int NotchedRightArrow = 94;
- public static final int BlockArc = 95;
- public static final int SmileyFace = 96;
- public static final int VerticalScroll = 97;
- public static final int HorizontalScroll = 98;
- public static final int CircularArrow = 99;
- public static final int NotchedCircularArrow = 100;
- public static final int UturnArrow = 101;
- public static final int CurvedRightArrow = 102;
- public static final int CurvedLeftArrow = 103;
- public static final int CurvedUpArrow = 104;
- public static final int CurvedDownArrow = 105;
- public static final int CloudCallout = 106;
- public static final int EllipseRibbon = 107;
- public static final int EllipseRibbon2 = 108;
- public static final int FlowChartProcess = 109;
- public static final int FlowChartDecision = 110;
- public static final int FlowChartInputOutput = 111;
- public static final int FlowChartPredefinedProcess = 112;
- public static final int FlowChartInternalStorage = 113;
- public static final int FlowChartDocument = 114;
- public static final int FlowChartMultidocument = 115;
- public static final int FlowChartTerminator = 116;
- public static final int FlowChartPreparation = 117;
- public static final int FlowChartManualInput = 118;
- public static final int FlowChartManualOperation = 119;
- public static final int FlowChartConnector = 120;
- public static final int FlowChartPunchedCard = 121;
- public static final int FlowChartPunchedTape = 122;
- public static final int FlowChartSummingJunction = 123;
- public static final int FlowChartOr = 124;
- public static final int FlowChartCollate = 125;
- public static final int FlowChartSort = 126;
- public static final int FlowChartExtract = 127;
- public static final int FlowChartMerge = 128;
- public static final int FlowChartOfflineStorage = 129;
- public static final int FlowChartOnlineStorage = 130;
- public static final int FlowChartMagneticTape = 131;
- public static final int FlowChartMagneticDisk = 132;
- public static final int FlowChartMagneticDrum = 133;
- public static final int FlowChartDisplay = 134;
- public static final int FlowChartDelay = 135;
- public static final int TextPlainText = 136;
- public static final int TextStop = 137;
- public static final int TextTriangle = 138;
- public static final int TextTriangleInverted = 139;
- public static final int TextChevron = 140;
- public static final int TextChevronInverted = 141;
- public static final int TextRingInside = 142;
- public static final int TextRingOutside = 143;
- public static final int TextArchUpCurve = 144;
- public static final int TextArchDownCurve = 145;
- public static final int TextCircleCurve = 146;
- public static final int TextButtonCurve = 147;
- public static final int TextArchUpPour = 148;
- public static final int TextArchDownPour = 149;
- public static final int TextCirclePour = 150;
- public static final int TextButtonPour = 151;
- public static final int TextCurveUp = 152;
- public static final int TextCurveDown = 153;
- public static final int TextCascadeUp = 154;
- public static final int TextCascadeDown = 155;
- public static final int TextWave1 = 156;
- public static final int TextWave2 = 157;
- public static final int TextWave3 = 158;
- public static final int TextWave4 = 159;
- public static final int TextInflate = 160;
- public static final int TextDeflate = 161;
- public static final int TextInflateBottom = 162;
- public static final int TextDeflateBottom = 163;
- public static final int TextInflateTop = 164;
- public static final int TextDeflateTop = 165;
- public static final int TextDeflateInflate = 166;
- public static final int TextDeflateInflateDeflate = 167;
- public static final int TextFadeRight = 168;
- public static final int TextFadeLeft = 169;
- public static final int TextFadeUp = 170;
- public static final int TextFadeDown = 171;
- public static final int TextSlantUp = 172;
- public static final int TextSlantDown = 173;
- public static final int TextCanUp = 174;
- public static final int TextCanDown = 175;
- public static final int FlowChartAlternateProcess = 176;
- public static final int FlowChartOffpageConnector = 177;
- public static final int Callout90 = 178;
- public static final int AccentCallout90 = 179;
- public static final int BorderCallout90 = 180;
- public static final int AccentBorderCallout90 = 181;
- public static final int LeftRightUpArrow = 182;
- public static final int Sun = 183;
- public static final int Moon = 184;
- public static final int BracketPair = 185;
- public static final int BracePair = 186;
- public static final int Star4 = 187;
- public static final int DoubleWave = 188;
- public static final int ActionButtonBlank = 189;
- public static final int ActionButtonHome = 190;
- public static final int ActionButtonHelp = 191;
- public static final int ActionButtonInformation = 192;
- public static final int ActionButtonForwardNext = 193;
- public static final int ActionButtonBackPrevious = 194;
- public static final int ActionButtonEnd = 195;
- public static final int ActionButtonBeginning = 196;
- public static final int ActionButtonReturn = 197;
- public static final int ActionButtonDocument = 198;
- public static final int ActionButtonSound = 199;
- public static final int ActionButtonMovie = 200;
- public static final int HostControl = 201;
- public static final int TextBox = 202;
-}
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-package org.apache.poi.sl.usermodel;
-
-/**
- * Common parent of Slides, Notes and Masters
- */
-public interface Sheet extends ShapeContainer {
- public SlideShow getSlideShow();
-
- public MasterSheet getMasterSheet();
-
- public Background getBackground();
-}
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-package org.apache.poi.sl.usermodel;
-
-public interface SimpleShape extends Shape {
- public Fill getFill();
- public LineStyle getLineStyle();
-
- public Hyperlink getHyperlink();
- public void setHyperlink(Hyperlink hyperlink);
-}
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-package org.apache.poi.sl.usermodel;
-
-public interface Slide extends Sheet {
- public Notes getNotes();
- public void setNotes(Notes notes);
-
- public boolean getFollowMasterBackground();
- public void setFollowMasterBackground(boolean follow);
-
- public boolean getFollowMasterColourScheme();
- public void setFollowMasterColourScheme(boolean follow);
-
- public boolean getFollowMasterObjects();
- public void setFollowMasterObjects(boolean follow);
-}
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-package org.apache.poi.sl.usermodel;
-
-import java.io.IOException;
-
-public interface SlideShow {
- public Slide createSlide() throws IOException;
- public MasterSheet createMasterSheet() throws IOException;
-
- public Slide[] getSlides();
- public MasterSheet[] getMasterSheet();
-
- public Resources getResources();
-}
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-package org.apache.poi.sl.usermodel;
-
-public interface TextBox extends AutoShape {
-}
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-package org.apache.poi.sl.usermodel;
-
-/**
- * Some text.
- *
- * TODO - decide on how we do rich text stuff
- */
-public interface TextRun {
- public String getText();
- public void setText(String text);
-
- // TODO - rich text formatting stuff
-}
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-package org.apache.poi.ss.extractor;
-
-/**
- * Common interface for Excel text extractors, covering
- * HSSF and XSSF
- */
-public interface ExcelExtractor {
- /**
- * Should sheet names be included? Default is true
- */
- public void setIncludeSheetNames(boolean includeSheetNames);
-
- /**
- * Should we return the formula itself, and not
- * the result it produces? Default is false
- */
- public void setFormulasNotResults(boolean formulasNotResults);
-
- /**
- * Should cell comments be included? Default is false
- */
- public void setIncludeCellComments(boolean includeCellComments);
-
- /**
- * Retreives the text contents of the file
- */
- public String getText();
-}
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-
-package org.apache.poi.ss.usermodel;
-
-/**
- * The enumeration value indicating the line style of a border in a cell,
- * i.e., whether it is borded dash dot, dash dot dot, dashed, dotted, double, hair, medium,
- * medium dash dot, medium dash dot dot, medium dashed, none, slant dash dot, thick or thin.
- */
- public enum BorderStyle {
-
- /**
- * No border
- */
-
- NONE,
-
- /**
- * Thin border
- */
-
- THIN,
-
- /**
- * Medium border
- */
-
- MEDIUM,
-
- /**
- * dash border
- */
-
- DASHED,
-
- /**
- * dot border
- */
-
- HAIR,
-
- /**
- * Thick border
- */
-
- THICK,
-
- /**
- * double-line border
- */
-
- DOUBLE,
-
- /**
- * hair-line border
- */
-
- DOTTED,
-
- /**
- * Medium dashed border
- */
-
- MEDIUM_DASHED,
-
- /**
- * dash-dot border
- */
-
- DASH_DOT,
-
- /**
- * medium dash-dot border
- */
-
- MEDIUM_DASH_DOT,
-
- /**
- * dash-dot-dot border
- */
-
- DASH_DOT_DOT,
-
- /**
- * medium dash-dot-dot border
- */
-
- MEDIUM_DASH_DOT_DOTC,
-
- /**
- * slanted dash-dot border
- */
-
- SLANTED_DASH_DOT;
-
-}
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-
-package org.apache.poi.ss.usermodel;
-
-import java.util.Calendar;
-import java.util.Date;
-
-/**
- * High level representation of a cell in a row of a spreadsheet.
- * <p>
- * Cells can be numeric, formula-based or string-based (text). The cell type
- * specifies this. String cells cannot conatin numbers and numeric cells cannot
- * contain strings (at least according to our model). Client apps should do the
- * conversions themselves. Formula cells have the formula string, as well as
- * the formula result, which can be numeric or string.
- * </p>
- * <p>
- * Cells should have their number (0 based) before being added to a row.
- * </p>
- */
-public interface Cell {
-
- /**
- * Numeric Cell type (0)
- * @see #setCellType(int)
- * @see #getCellType()
- */
- public final static int CELL_TYPE_NUMERIC = 0;
-
- /**
- * String Cell type (1)
- * @see #setCellType(int)
- * @see #getCellType()
- */
- public final static int CELL_TYPE_STRING = 1;
-
- /**
- * Formula Cell type (2)
- * @see #setCellType(int)
- * @see #getCellType()
- */
- public final static int CELL_TYPE_FORMULA = 2;
-
- /**
- * Blank Cell type (3)
- * @see #setCellType(int)
- * @see #getCellType()
- */
- public final static int CELL_TYPE_BLANK = 3;
-
- /**
- * Boolean Cell type (4)
- * @see #setCellType(int)
- * @see #getCellType()
- */
- public final static int CELL_TYPE_BOOLEAN = 4;
-
- /**
- * Error Cell type (5)
- * @see #setCellType(int)
- * @see #getCellType()
- */
- public final static int CELL_TYPE_ERROR = 5;
-
- /**
- * Returns column index of this cell
- *
- * @return zero-based column index of a column in a sheet.
- */
- int getColumnIndex();
-
- /**
- * Returns row index of a row in the sheet that contains this cell
- *
- * @return zero-based row index of a row in the sheet that contains this cell
- */
- int getRowIndex();
-
- /**
- * Returns the sheet this cell belongs to
- *
- * @return the sheet this cell belongs to
- */
- Sheet getSheet();
-
- /**
- * Returns the Row this cell belongs to
- *
- * @return the Row that owns this cell
- */
- Row getRow();
-
- /**
- * Set the cells type (numeric, formula or string)
- *
- * @throws IllegalArgumentException if the specified cell type is invalid
- * @see #CELL_TYPE_NUMERIC
- * @see #CELL_TYPE_STRING
- * @see #CELL_TYPE_FORMULA
- * @see #CELL_TYPE_BLANK
- * @see #CELL_TYPE_BOOLEAN
- * @see #CELL_TYPE_ERROR
- */
- void setCellType(int cellType);
-
- /**
- * Return the cell type.
- *
- * @return the cell type
- * @see Cell#CELL_TYPE_BLANK
- * @see Cell#CELL_TYPE_NUMERIC
- * @see Cell#CELL_TYPE_STRING
- * @see Cell#CELL_TYPE_FORMULA
- * @see Cell#CELL_TYPE_BOOLEAN
- * @see Cell#CELL_TYPE_ERROR
- */
- int getCellType();
-
- /**
- * Only valid for formula cells
- * @return one of ({@link #CELL_TYPE_NUMERIC}, {@link #CELL_TYPE_STRING},
- * {@link #CELL_TYPE_BOOLEAN}, {@link #CELL_TYPE_ERROR}) depending
- * on the cached value of the formula
- */
- int getCachedFormulaResultType();
-
- /**
- * Set a numeric value for the cell
- *
- * @param value the numeric value to set this cell to. For formulas we'll set the
- * precalculated value, for numerics we'll set its value. For other types we
- * will change the cell to a numeric cell and set its value.
- */
- void setCellValue(double value);
-
- /**
- * Set a boolean value for the cell
- *
- * @param value the boolean value to set this cell to. For formulas we'll set the
- * precalculated value, for booleans we'll set its value. For other types we
- * will change the cell to a boolean cell and set its value.
- */
- void setCellValue(Date value);
-
- /**
- * Set a date value for the cell. Excel treats dates as numeric so you will need to format the cell as
- * a date.
- * <p>
- * This will set the cell value based on the Calendar's timezone. As Excel
- * does not support timezones this means that both 20:00+03:00 and
- * 20:00-03:00 will be reported as the same value (20:00) even that there
- * are 6 hours difference between the two times. This difference can be
- * preserved by using <code>setCellValue(value.getTime())</code> which will
- * automatically shift the times to the default timezone.
- * </p>
- *
- * @param value the date value to set this cell to. For formulas we'll set the
- * precalculated value, for numerics we'll set its value. For othertypes we
- * will change the cell to a numeric cell and set its value.
- */
- void setCellValue(Calendar value);
-
- /**
- * Set a rich string value for the cell.
- *
- * @param value value to set the cell to. For formulas we'll set the formula
- * string, for String cells we'll set its value. For other types we will
- * change the cell to a string cell and set its value.
- * If value is null then we will change the cell to a Blank cell.
- */
- void setCellValue(RichTextString value);
-
- /**
- * Set a string value for the cell.
- *
- * @param value value to set the cell to. For formulas we'll set the formula
- * string, for String cells we'll set its value. For other types we will
- * change the cell to a string cell and set its value.
- * If value is null then we will change the cell to a Blank cell.
- */
- void setCellValue(String value);
-
- /**
- * Sets formula for this cell.
- * <p>
- * Note, this method only sets the formula string and does not calculate the formula value.
- * To set the precalculated value use {@link #setCellValue(double)} or {@link #setCellValue(String)}
- * </p>
- *
- * @param formula the formula to set, e.g. <code>SUM(C4:E4)</code>.
- * If the argument is <code>null</code> then the current formula is removed.
- * @throws IllegalArgumentException if the formula is unparsable
- */
- void setCellFormula(String formula);
-
- /**
- * Return a formula for the cell, for example, <code>SUM(C4:E4)</code>
- *
- * @return a formula for the cell
- * @throws IllegalStateException if the cell type returned by {@link #getCellType()} is not CELL_TYPE_FORMULA
- */
- String getCellFormula();
-
- /**
- * Get the value of the cell as a number.
- * <p>
- * For strings we throw an exception. For blank cells we return a 0.
- * For formulas or error cells we return the precalculated value;
- * </p>
- * @return the value of the cell as a number
- * @throws IllegalStateException if the cell type returned by {@link #getCellType()} is CELL_TYPE_STRING
- * @exception NumberFormatException if the cell value isn't a parsable <code>double</code>.
- * @see DataFormatter for turning this number into a string similar to that which Excel would render this number as.
- */
- double getNumericCellValue();
-
- /**
- * Get the value of the cell as a date.
- * <p>
- * For strings we throw an exception. For blank cells we return a null.
- * </p>
- * @return the value of the cell as a date
- * @throws IllegalStateException if the cell type returned by {@link #getCellType()} is CELL_TYPE_STRING
- * @exception NumberFormatException if the cell value isn't a parsable <code>double</code>.
- * @see DataFormatter for formatting this date into a string similar to how excel does.
- */
- Date getDateCellValue();
-
- /**
- * Get the value of the cell as a XSSFRichTextString
- * <p>
- * For numeric cells we throw an exception. For blank cells we return an empty string.
- * For formula cells we return the pre-calculated value.
- * </p>
- * @return the value of the cell as a XSSFRichTextString
- */
- RichTextString getRichStringCellValue();
-
- /**
- * Get the value of the cell as a string
- * <p>
- * For numeric cells we throw an exception. For blank cells we return an empty string.
- * For formulaCells that are not string Formulas, we return empty String.
- * </p>
- * @return the value of the cell as a string
- */
- String getStringCellValue();
-
- /**
- * Set a boolean value for the cell
- *
- * @param value the boolean value to set this cell to. For formulas we'll set the
- * precalculated value, for booleans we'll set its value. For other types we
- * will change the cell to a boolean cell and set its value.
- */
- void setCellValue(boolean value);
-
- /**
- * Set a error value for the cell
- *
- * @param value the error value to set this cell to. For formulas we'll set the
- * precalculated value , for errors we'll set
- * its value. For other types we will change the cell to an error
- * cell and set its value.
- * @see FormulaError
- */
- void setCellErrorValue(byte value);
-
- /**
- * Get the value of the cell as a boolean.
- * <p>
- * For strings, numbers, and errors, we throw an exception. For blank cells we return a false.
- * </p>
- * @return the value of the cell as a boolean
- * @throws IllegalStateException if the cell type returned by {@link #getCellType()}
- * is not CELL_TYPE_BOOLEAN, CELL_TYPE_BLANK or CELL_TYPE_FORMULA
- */
- boolean getBooleanCellValue();
-
- /**
- * Get the value of the cell as an error code.
- * <p>
- * For strings, numbers, and booleans, we throw an exception.
- * For blank cells we return a 0.
- * </p>
- *
- * @return the value of the cell as an error code
- * @throws IllegalStateException if the cell type returned by {@link #getCellType()} isn't CELL_TYPE_ERROR
- * @see FormulaError for error codes
- */
- byte getErrorCellValue();
-
- /**
- * Set the style for the cell. The style should be an CellStyle created/retreived from
- * the Workbook.
- *
- * @param style reference contained in the workbook.
- * If the value is null then the style information is removed causing the cell to used the default workbook style.
- * @see org.apache.poi.ss.usermodel.Workbook#createCellStyle()
- */
- void setCellStyle(CellStyle style);
-
- /**
- * Return the cell's style.
- *
- * @return the cell's style. Always not-null. Default cell style has zero index and can be obtained as
- * <code>workbook.getCellStyleAt(0)</code>
- * @see Workbook#getCellStyleAt(short)
- */
- CellStyle getCellStyle();
-
- /**
- * Sets this cell as the active cell for the worksheet
- */
- void setAsActiveCell();
-
- /**
- * Assign a comment to this cell
- *
- * @param comment comment associated with this cell
- */
- void setCellComment(Comment comment);
-
- /**
- * Returns comment associated with this cell
- *
- * @return comment associated with this cell or <code>null</code> if not found
- */
- Comment getCellComment();
-
- /**
- * Returns hyperlink associated with this cell
- *
- * @return hyperlink associated with this cell or <code>null</code> if not found
- */
- Hyperlink getHyperlink();
-
- /**
- * Assign a hypelrink to this cell
- *
- * @param link hypelrink associated with this cell
- */
- void setHyperlink(Hyperlink link);
-}
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-
-package org.apache.poi.ss.usermodel;
-
-public interface CellStyle {
-
- /**
- * general (normal) horizontal alignment
- */
-
- public final static short ALIGN_GENERAL = 0x0;
-
- /**
- * left-justified horizontal alignment
- */
-
- public final static short ALIGN_LEFT = 0x1;
-
- /**
- * center horizontal alignment
- */
-
- public final static short ALIGN_CENTER = 0x2;
-
- /**
- * right-justified horizontal alignment
- */
-
- public final static short ALIGN_RIGHT = 0x3;
-
- /**
- * fill? horizontal alignment
- */
-
- public final static short ALIGN_FILL = 0x4;
-
- /**
- * justified horizontal alignment
- */
-
- public final static short ALIGN_JUSTIFY = 0x5;
-
- /**
- * center-selection? horizontal alignment
- */
-
- public final static short ALIGN_CENTER_SELECTION = 0x6;
-
- /**
- * top-aligned vertical alignment
- */
-
- public final static short VERTICAL_TOP = 0x0;
-
- /**
- * center-aligned vertical alignment
- */
-
- public final static short VERTICAL_CENTER = 0x1;
-
- /**
- * bottom-aligned vertical alignment
- */
-
- public final static short VERTICAL_BOTTOM = 0x2;
-
- /**
- * vertically justified vertical alignment
- */
-
- public final static short VERTICAL_JUSTIFY = 0x3;
-
- /**
- * No border
- */
-
- public final static short BORDER_NONE = 0x0;
-
- /**
- * Thin border
- */
-
- public final static short BORDER_THIN = 0x1;
-
- /**
- * Medium border
- */
-
- public final static short BORDER_MEDIUM = 0x2;
-
- /**
- * dash border
- */
-
- public final static short BORDER_DASHED = 0x3;
-
- /**
- * dot border
- */
-
- public final static short BORDER_HAIR = 0x4;
-
- /**
- * Thick border
- */
-
- public final static short BORDER_THICK = 0x5;
-
- /**
- * double-line border
- */
-
- public final static short BORDER_DOUBLE = 0x6;
-
- /**
- * hair-line border
- */
-
- public final static short BORDER_DOTTED = 0x7;
-
- /**
- * Medium dashed border
- */
-
- public final static short BORDER_MEDIUM_DASHED = 0x8;
-
- /**
- * dash-dot border
- */
-
- public final static short BORDER_DASH_DOT = 0x9;
-
- /**
- * medium dash-dot border
- */
-
- public final static short BORDER_MEDIUM_DASH_DOT = 0xA;
-
- /**
- * dash-dot-dot border
- */
-
- public final static short BORDER_DASH_DOT_DOT = 0xB;
-
- /**
- * medium dash-dot-dot border
- */
-
- public final static short BORDER_MEDIUM_DASH_DOT_DOT = 0xC;
-
- /**
- * slanted dash-dot border
- */
-
- public final static short BORDER_SLANTED_DASH_DOT = 0xD;
-
- /** No background */
- public final static short NO_FILL = 0;
-
- /** Solidly filled */
- public final static short SOLID_FOREGROUND = 1;
-
- /** Small fine dots */
- public final static short FINE_DOTS = 2;
-
- /** Wide dots */
- public final static short ALT_BARS = 3;
-
- /** Sparse dots */
- public final static short SPARSE_DOTS = 4;
-
- /** Thick horizontal bands */
- public final static short THICK_HORZ_BANDS = 5;
-
- /** Thick vertical bands */
- public final static short THICK_VERT_BANDS = 6;
-
- /** Thick backward facing diagonals */
- public final static short THICK_BACKWARD_DIAG = 7;
-
- /** Thick forward facing diagonals */
- public final static short THICK_FORWARD_DIAG = 8;
-
- /** Large spots */
- public final static short BIG_SPOTS = 9;
-
- /** Brick-like layout */
- public final static short BRICKS = 10;
-
- /** Thin horizontal bands */
- public final static short THIN_HORZ_BANDS = 11;
-
- /** Thin vertical bands */
- public final static short THIN_VERT_BANDS = 12;
-
- /** Thin backward diagonal */
- public final static short THIN_BACKWARD_DIAG = 13;
-
- /** Thin forward diagonal */
- public final static short THIN_FORWARD_DIAG = 14;
-
- /** Squares */
- public final static short SQUARES = 15;
-
- /** Diamonds */
- public final static short DIAMONDS = 16;
-
- /** Less Dots */
- public final static short LESS_DOTS = 17;
-
- /** Least Dots */
- public final static short LEAST_DOTS = 18;
-
- /**
- * get the index within the Workbook (sequence within the collection of ExtnededFormat objects)
- * @return unique index number of the underlying record this style represents (probably you don't care
- * unless you're comparing which one is which)
- */
-
- short getIndex();
-
- /**
- * set the data format (must be a valid format)
- * @see DataFormat
- */
-
- void setDataFormat(short fmt);
-
- /**
- * get the index of the format
- * @see DataFormat
- */
- short getDataFormat();
-
- /**
- * Get the format string
- */
- public String getDataFormatString();
-
- /**
- * set the font for this style
- * @param font a font object created or retreived from the Workbook object
- * @see Workbook#createFont()
- * @see Workbook#getFontAt(short)
- */
-
- void setFont(Font font);
-
- /**
- * gets the index of the font for this style
- * @see Workbook#getFontAt(short)
- */
- short getFontIndex();
-
- /**
- * set the cell's using this style to be hidden
- * @param hidden - whether the cell using this style should be hidden
- */
-
- void setHidden(boolean hidden);
-
- /**
- * get whether the cell's using this style are to be hidden
- * @return hidden - whether the cell using this style should be hidden
- */
-
- boolean getHidden();
-
- /**
- * set the cell's using this style to be locked
- * @param locked - whether the cell using this style should be locked
- */
-
- void setLocked(boolean locked);
-
- /**
- * get whether the cell's using this style are to be locked
- * @return hidden - whether the cell using this style should be locked
- */
-
- boolean getLocked();
-
- /**
- * set the type of horizontal alignment for the cell
- * @param align - the type of alignment
- * @see #ALIGN_GENERAL
- * @see #ALIGN_LEFT
- * @see #ALIGN_CENTER
- * @see #ALIGN_RIGHT
- * @see #ALIGN_FILL
- * @see #ALIGN_JUSTIFY
- * @see #ALIGN_CENTER_SELECTION
- */
-
- void setAlignment(short align);
-
- /**
- * get the type of horizontal alignment for the cell
- * @return align - the type of alignment
- * @see #ALIGN_GENERAL
- * @see #ALIGN_LEFT
- * @see #ALIGN_CENTER
- * @see #ALIGN_RIGHT
- * @see #ALIGN_FILL
- * @see #ALIGN_JUSTIFY
- * @see #ALIGN_CENTER_SELECTION
- */
-
- short getAlignment();
-
- /**
- * Set whether the text should be wrapped.
- * Setting this flag to <code>true</code> make all content visible
- * whithin a cell by displaying it on multiple lines
- *
- * @param wrapped wrap text or not
- */
-
- void setWrapText(boolean wrapped);
-
- /**
- * get whether the text should be wrapped
- * @return wrap text or not
- */
-
- boolean getWrapText();
-
- /**
- * set the type of vertical alignment for the cell
- * @param align the type of alignment
- * @see #VERTICAL_TOP
- * @see #VERTICAL_CENTER
- * @see #VERTICAL_BOTTOM
- * @see #VERTICAL_JUSTIFY
- */
-
- void setVerticalAlignment(short align);
-
- /**
- * get the type of vertical alignment for the cell
- * @return align the type of alignment
- * @see #VERTICAL_TOP
- * @see #VERTICAL_CENTER
- * @see #VERTICAL_BOTTOM
- * @see #VERTICAL_JUSTIFY
- */
-
- short getVerticalAlignment();
-
- /**
- * set the degree of rotation for the text in the cell
- * @param rotation degrees (between -90 and 90 degrees)
- */
-
- void setRotation(short rotation);
-
- /**
- * get the degree of rotation for the text in the cell
- * @return rotation degrees (between -90 and 90 degrees)
- */
-
- short getRotation();
-
- /**
- * set the number of spaces to indent the text in the cell
- * @param indent - number of spaces
- */
-
- void setIndention(short indent);
-
- /**
- * get the number of spaces to indent the text in the cell
- * @return indent - number of spaces
- */
-
- short getIndention();
-
- /**
- * set the type of border to use for the left border of the cell
- * @param border type
- * @see #BORDER_NONE
- * @see #BORDER_THIN
- * @see #BORDER_MEDIUM
- * @see #BORDER_DASHED
- * @see #BORDER_DOTTED
- * @see #BORDER_THICK
- * @see #BORDER_DOUBLE
- * @see #BORDER_HAIR
- * @see #BORDER_MEDIUM_DASHED
- * @see #BORDER_DASH_DOT
- * @see #BORDER_MEDIUM_DASH_DOT
- * @see #BORDER_DASH_DOT_DOT
- * @see #BORDER_MEDIUM_DASH_DOT_DOT
- * @see #BORDER_SLANTED_DASH_DOT
- */
-
- void setBorderLeft(short border);
-
- /**
- * get the type of border to use for the left border of the cell
- * @return border type
- * @see #BORDER_NONE
- * @see #BORDER_THIN
- * @see #BORDER_MEDIUM
- * @see #BORDER_DASHED
- * @see #BORDER_DOTTED
- * @see #BORDER_THICK
- * @see #BORDER_DOUBLE
- * @see #BORDER_HAIR
- * @see #BORDER_MEDIUM_DASHED
- * @see #BORDER_DASH_DOT
- * @see #BORDER_MEDIUM_DASH_DOT
- * @see #BORDER_DASH_DOT_DOT
- * @see #BORDER_MEDIUM_DASH_DOT_DOT
- * @see #BORDER_SLANTED_DASH_DOT
- */
-
- short getBorderLeft();
-
- /**
- * set the type of border to use for the right border of the cell
- * @param border type
- * @see #BORDER_NONE
- * @see #BORDER_THIN
- * @see #BORDER_MEDIUM
- * @see #BORDER_DASHED
- * @see #BORDER_DOTTED
- * @see #BORDER_THICK
- * @see #BORDER_DOUBLE
- * @see #BORDER_HAIR
- * @see #BORDER_MEDIUM_DASHED
- * @see #BORDER_DASH_DOT
- * @see #BORDER_MEDIUM_DASH_DOT
- * @see #BORDER_DASH_DOT_DOT
- * @see #BORDER_MEDIUM_DASH_DOT_DOT
- * @see #BORDER_SLANTED_DASH_DOT
- */
-
- void setBorderRight(short border);
-
- /**
- * get the type of border to use for the right border of the cell
- * @return border type
- * @see #BORDER_NONE
- * @see #BORDER_THIN
- * @see #BORDER_MEDIUM
- * @see #BORDER_DASHED
- * @see #BORDER_DOTTED
- * @see #BORDER_THICK
- * @see #BORDER_DOUBLE
- * @see #BORDER_HAIR
- * @see #BORDER_MEDIUM_DASHED
- * @see #BORDER_DASH_DOT
- * @see #BORDER_MEDIUM_DASH_DOT
- * @see #BORDER_DASH_DOT_DOT
- * @see #BORDER_MEDIUM_DASH_DOT_DOT
- * @see #BORDER_SLANTED_DASH_DOT
- */
-
- short getBorderRight();
-
- /**
- * set the type of border to use for the top border of the cell
- * @param border type
- * @see #BORDER_NONE
- * @see #BORDER_THIN
- * @see #BORDER_MEDIUM
- * @see #BORDER_DASHED
- * @see #BORDER_DOTTED
- * @see #BORDER_THICK
- * @see #BORDER_DOUBLE
- * @see #BORDER_HAIR
- * @see #BORDER_MEDIUM_DASHED
- * @see #BORDER_DASH_DOT
- * @see #BORDER_MEDIUM_DASH_DOT
- * @see #BORDER_DASH_DOT_DOT
- * @see #BORDER_MEDIUM_DASH_DOT_DOT
- * @see #BORDER_SLANTED_DASH_DOT
- */
-
- void setBorderTop(short border);
-
- /**
- * get the type of border to use for the top border of the cell
- * @return border type
- * @see #BORDER_NONE
- * @see #BORDER_THIN
- * @see #BORDER_MEDIUM
- * @see #BORDER_DASHED
- * @see #BORDER_DOTTED
- * @see #BORDER_THICK
- * @see #BORDER_DOUBLE
- * @see #BORDER_HAIR
- * @see #BORDER_MEDIUM_DASHED
- * @see #BORDER_DASH_DOT
- * @see #BORDER_MEDIUM_DASH_DOT
- * @see #BORDER_DASH_DOT_DOT
- * @see #BORDER_MEDIUM_DASH_DOT_DOT
- * @see #BORDER_SLANTED_DASH_DOT
- */
-
- short getBorderTop();
-
- /**
- * set the type of border to use for the bottom border of the cell
- * @param border type
- * @see #BORDER_NONE
- * @see #BORDER_THIN
- * @see #BORDER_MEDIUM
- * @see #BORDER_DASHED
- * @see #BORDER_DOTTED
- * @see #BORDER_THICK
- * @see #BORDER_DOUBLE
- * @see #BORDER_HAIR
- * @see #BORDER_MEDIUM_DASHED
- * @see #BORDER_DASH_DOT
- * @see #BORDER_MEDIUM_DASH_DOT
- * @see #BORDER_DASH_DOT_DOT
- * @see #BORDER_MEDIUM_DASH_DOT_DOT
- * @see #BORDER_SLANTED_DASH_DOT
- */
-
- void setBorderBottom(short border);
-
- /**
- * get the type of border to use for the bottom border of the cell
- * @return border type
- * @see #BORDER_NONE
- * @see #BORDER_THIN
- * @see #BORDER_MEDIUM
- * @see #BORDER_DASHED
- * @see #BORDER_DOTTED
- * @see #BORDER_THICK
- * @see #BORDER_DOUBLE
- * @see #BORDER_HAIR
- * @see #BORDER_MEDIUM_DASHED
- * @see #BORDER_DASH_DOT
- * @see #BORDER_MEDIUM_DASH_DOT
- * @see #BORDER_DASH_DOT_DOT
- * @see #BORDER_MEDIUM_DASH_DOT_DOT
- * @see #BORDER_SLANTED_DASH_DOT
- */
- short getBorderBottom();
-
- /**
- * set the color to use for the left border
- * @param color The index of the color definition
- */
- void setLeftBorderColor(short color);
-
- /**
- * get the color to use for the left border
- */
- short getLeftBorderColor();
-
- /**
- * set the color to use for the right border
- * @param color The index of the color definition
- */
- void setRightBorderColor(short color);
-
- /**
- * get the color to use for the left border
- * @return the index of the color definition
- */
- short getRightBorderColor();
-
- /**
- * set the color to use for the top border
- * @param color The index of the color definition
- */
- void setTopBorderColor(short color);
-
- /**
- * get the color to use for the top border
- * @return hhe index of the color definition
- */
- short getTopBorderColor();
-
- /**
- * set the color to use for the bottom border
- * @param color The index of the color definition
- */
- void setBottomBorderColor(short color);
-
- /**
- * get the color to use for the left border
- * @return the index of the color definition
- */
- short getBottomBorderColor();
-
- /**
- * setting to one fills the cell with the foreground color... No idea about
- * other values
- *
- * @see #NO_FILL
- * @see #SOLID_FOREGROUND
- * @see #FINE_DOTS
- * @see #ALT_BARS
- * @see #SPARSE_DOTS
- * @see #THICK_HORZ_BANDS
- * @see #THICK_VERT_BANDS
- * @see #THICK_BACKWARD_DIAG
- * @see #THICK_FORWARD_DIAG
- * @see #BIG_SPOTS
- * @see #BRICKS
- * @see #THIN_HORZ_BANDS
- * @see #THIN_VERT_BANDS
- * @see #THIN_BACKWARD_DIAG
- * @see #THIN_FORWARD_DIAG
- * @see #SQUARES
- * @see #DIAMONDS
- *
- * @param fp fill pattern (set to 1 to fill w/foreground color)
- */
- void setFillPattern(short fp);
-
- /**
- * get the fill pattern (??) - set to 1 to fill with foreground color
- * @return fill pattern
- */
-
- short getFillPattern();
-
- /**
- * set the background fill color.
- *
- * @param bg color
- */
-
- void setFillBackgroundColor(short bg);
-
- /**
- * get the background fill color
- * @return fill color
- */
- short getFillBackgroundColor();
-
- /**
- * set the foreground fill color
- * <i>Note: Ensure Foreground color is set prior to background color.</i>
- * @param bg color
- */
- void setFillForegroundColor(short bg);
-
- /**
- * get the foreground fill color
- * @return fill color
- */
- short getFillForegroundColor();
-
- /**
- * Clones all the style information from another
- * CellStyle, onto this one. This
- * CellStyle will then have all the same
- * properties as the source, but the two may
- * be edited independently.
- * Any stylings on this CellStyle will be lost!
- *
- * The source CellStyle could be from another
- * Workbook if you like. This allows you to
- * copy styles from one Workbook to another.
- *
- * However, both of the CellStyles will need
- * to be of the same type (HSSFCellStyle or
- * XSSFCellStyle)
- */
- public void cloneStyleFrom(CellStyle source);
-}
+++ /dev/null
-/* ====================================================================\r
- Licensed to the Apache Software Foundation (ASF) under one or more\r
- contributor license agreements. See the NOTICE file distributed with\r
- this work for additional information regarding copyright ownership.\r
- The ASF licenses this file to You under the Apache License, Version 2.0\r
- (the "License"); you may not use this file except in compliance with\r
- the License. You may obtain a copy of the License at\r
-\r
- http://www.apache.org/licenses/LICENSE-2.0\r
-\r
- Unless required by applicable law or agreed to in writing, software\r
- distributed under the License is distributed on an "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- See the License for the specific language governing permissions and\r
- limitations under the License.\r
-==================================================================== */\r
-package org.apache.poi.ss.usermodel;\r
-\r
-/**\r
- * A client anchor is attached to an excel worksheet. It anchors against a\r
- * top-left and bottom-right cell.\r
- *\r
- * @author Yegor Kozlov\r
- */\r
-public interface ClientAnchor {\r
- /**\r
- * Move and Resize With Anchor Cells\r
- * <p>\r
- * Specifies that the current drawing shall move and\r
- * resize to maintain its row and column anchors (i.e. the\r
- * object is anchored to the actual from and to row and column)\r
- * </p>\r
- */\r
- public static final int MOVE_AND_RESIZE = 0;\r
-\r
- /**\r
- * Move With Cells but Do Not Resize\r
- * <p>\r
- * Specifies that the current drawing shall move with its\r
- * row and column (i.e. the object is anchored to the\r
- * actual from row and column), but that the size shall remain absolute.\r
- * </p>\r
- * <p>\r
- * If additional rows/columns are added between the from and to locations of the drawing,\r
- * the drawing shall move its to anchors as needed to maintain this same absolute size.\r
- * </p>\r
- */\r
- public static final int MOVE_DONT_RESIZE = 2;\r
-\r
- /**\r
- * Do Not Move or Resize With Underlying Rows/Columns\r
- * <p>\r
- * Specifies that the current start and end positions shall\r
- * be maintained with respect to the distances from the\r
- * absolute start point of the worksheet.\r
- * </p>\r
- * <p>\r
- * If additional rows/columns are added before the\r
- * drawing, the drawing shall move its anchors as needed\r
- * to maintain this same absolute position.\r
- * </p>\r
- */\r
- public static final int DONT_MOVE_AND_RESIZE = 3;\r
-\r
- /**\r
- * Returns the column (0 based) of the first cell.\r
- *\r
- * @return 0-based column of the first cell.\r
- */\r
- public short getCol1();\r
-\r
- /**\r
- * Sets the column (0 based) of the first cell.\r
- *\r
- * @param col1 0-based column of the first cell.\r
- */\r
- public void setCol1(int col1);\r
-\r
- /**\r
- * Returns the column (0 based) of the second cell.\r
- *\r
- * @return 0-based column of the second cell.\r
- */\r
- public short getCol2();\r
-\r
- /**\r
- * Returns the column (0 based) of the second cell.\r
- *\r
- * @param col2 0-based column of the second cell.\r
- */\r
- public void setCol2(int col2);\r
-\r
- /**\r
- * Returns the row (0 based) of the first cell.\r
- *\r
- * @return 0-based row of the first cell.\r
- */\r
- public int getRow1();\r
-\r
- /**\r
- * Returns the row (0 based) of the first cell.\r
- *\r
- * @param row1 0-based row of the first cell.\r
- */\r
- public void setRow1(int row1);\r
-\r
- /**\r
- * Returns the row (0 based) of the second cell.\r
- *\r
- * @return 0-based row of the second cell.\r
- */\r
- public int getRow2();\r
-\r
- /**\r
- * Returns the row (0 based) of the first cell.\r
- *\r
- * @param row2 0-based row of the first cell.\r
- */\r
- public void setRow2(int row2);\r
-\r
- /**\r
- * Returns the x coordinate within the first cell\r
- *\r
- * @return the x coordinate within the first cell\r
- */\r
- public int getDx1();\r
-\r
- /**\r
- * Sets the x coordinate within the first cell\r
- *\r
- * @param dx1 the x coordinate within the first cell\r
- */\r
- public void setDx1(int dx1);\r
-\r
- /**\r
- * Returns the y coordinate within the first cell\r
- *\r
- * @return the y coordinate within the first cell\r
- */\r
- public int getDy1();\r
-\r
- /**\r
- * Sets the y coordinate within the first cell\r
- *\r
- * @param dy1 the y coordinate within the first cell\r
- */\r
- public void setDy1(int dy1);\r
-\r
- /**\r
- * Sets the y coordinate within the second cell\r
- *\r
- * @return the y coordinate within the second cell\r
- */\r
- public int getDy2();\r
-\r
- /**\r
- * Sets the y coordinate within the second cell\r
- *\r
- * @param dy2 the y coordinate within the second cell\r
- */\r
- public void setDy2(int dy2);\r
-\r
- /**\r
- * Returns the x coordinate within the second cell\r
- *\r
- * @return the x coordinate within the second cell\r
- */\r
- public int getDx2();\r
-\r
- /**\r
- * Sets the x coordinate within the second cell\r
- *\r
- * @param dx2 the x coordinate within the second cell\r
- */\r
- public void setDx2(int dx2);\r
-\r
-\r
- /**\r
- * Sets the anchor type\r
- * <p>\r
- * 0 = Move and size with Cells, 2 = Move but don't size with cells, 3 = Don't move or size with cells.\r
- * </p>\r
- * @param anchorType the anchor type\r
- * @see #MOVE_AND_RESIZE\r
- * @see #MOVE_DONT_RESIZE\r
- * @see #DONT_MOVE_AND_RESIZE\r
- */\r
- public void setAnchorType( int anchorType );\r
-\r
- /**\r
- * Gets the anchor type\r
- * <p>\r
- * 0 = Move and size with Cells, 2 = Move but don't size with cells, 3 = Don't move or size with cells.\r
- * </p>\r
- * @return the anchor type\r
- * @see #MOVE_AND_RESIZE\r
- * @see #MOVE_DONT_RESIZE\r
- * @see #DONT_MOVE_AND_RESIZE\r
- */\r
- public int getAnchorType();\r
-\r
-}\r
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-
-package org.apache.poi.ss.usermodel;
-
-public interface Comment {
-
- /**
- * Returns whether this comment is visible.
- *
- * @param visible <code>true</code> if the comment is visible, <code>false</code> otherwise
- */
- void setVisible(boolean visible);
-
- /**
- * Sets whether this comment is visible.
- *
- * @return <code>true</code> if the comment is visible, <code>false</code> otherwise
- */
- boolean isVisible();
-
- /**
- * Return the row of the cell that contains the comment
- *
- * @return the 0-based row of the cell that contains the comment
- */
- int getRow();
-
- /**
- * Set the row of the cell that contains the comment
- *
- * @param row the 0-based row of the cell that contains the comment
- */
- void setRow(int row);
-
- /**
- * Return the column of the cell that contains the comment
- *
- * @return the 0-based column of the cell that contains the comment
- */
- int getColumn();
-
- /**
- * Set the column of the cell that contains the comment
- *
- * @param col the 0-based column of the cell that contains the comment
- */
- void setColumn(short col);
-
- /**
- * Name of the original comment author
- *
- * @return the name of the original author of the comment
- */
- String getAuthor();
-
- /**
- * Name of the original comment author
- *
- * @param author the name of the original author of the comment
- */
- void setAuthor(String author);
-
- /**
- * Fetches the rich text string of the comment
- */
- public RichTextString getString();
-
- /**
- * Sets the rich text string used by this comment.
- *
- * @param string Sets the rich text string used by this object.
- */
- void setString(RichTextString string);
-
-}
\ No newline at end of file
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-package org.apache.poi.ss.usermodel;
-
-/**
- * An object that handles instantiating concrete
- * classes of the various instances one needs for
- * HSSF and XSSF.
- * Works around a major shortcoming in Java, where we
- * can't have static methods on interfaces or abstract
- * classes.
- * This allows you to get the appropriate class for
- * a given interface, without you having to worry
- * about if you're dealing with HSSF or XSSF, despite
- * Java being quite rubbish.
- */
-public interface CreationHelper {
- /**
- * Creates a new RichTextString instance
- * @param text The text to initialise the RichTextString with
- */
- RichTextString createRichTextString(String text);
-
- /**
- * Creates a new DataFormat instance
- */
- DataFormat createDataFormat();
-
- /**
- * Creates a new Hyperlink, of the given type
- */
- Hyperlink createHyperlink(int type);
-
- /**
- * Creates FormulaEvaluator - an object that evaluates formula cells.
- *
- * @return a FormulaEvaluator instance
- */
- FormulaEvaluator createFormulaEvaluator();
-
- ClientAnchor createClientAnchor();
-}
\ No newline at end of file
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-
-package org.apache.poi.ss.usermodel;
-
-public interface DataFormat {
- /**
- * get the format index that matches the given format string.
- * Creates a new format if one is not found. Aliases text to the proper format.
- * @param format string matching a built in format
- * @return index of format.
- */
- short getFormat(String format);
-
- /**
- * get the format string that matches the given format index
- * @param index of a format
- * @return string represented at index of format or null if there is not a format at that index
- */
- String getFormat(short index);
-}
\ No newline at end of file
+++ /dev/null
-/* ====================================================================\r
- Licensed to the Apache Software Foundation (ASF) under one or more\r
- contributor license agreements. See the NOTICE file distributed with\r
- this work for additional information regarding copyright ownership.\r
- The ASF licenses this file to You under the Apache License, Version 2.0\r
- (the "License"); you may not use this file except in compliance with\r
- the License. You may obtain a copy of the License at\r
-\r
- http://www.apache.org/licenses/LICENSE-2.0\r
-\r
- Unless required by applicable law or agreed to in writing, software\r
- distributed under the License is distributed on an "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- See the License for the specific language governing permissions and\r
- limitations under the License.\r
-==================================================================== */\r
-package org.apache.poi.ss.usermodel;\r
-\r
-/**\r
- * @author Yegor Kozlov\r
- */\r
-public interface Drawing {\r
- Picture createPicture(ClientAnchor anchor, int pictureIndex);\r
-}\r
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-
-package org.apache.poi.ss.usermodel;
-
-/**
- * The enumeration value indicating the style of fill pattern being used for a cell format.
- *
- */
-public enum FillPatternType {
-
- /** No background */
- NO_FILL,
-
- /** Solidly filled */
- SOLID_FOREGROUND,
-
- /** Small fine dots */
- FINE_DOTS,
-
- /** Wide dots */
- ALT_BARS,
-
- /** Sparse dots */
- SPARSE_DOTS,
-
- /** Thick horizontal bands */
- THICK_HORZ_BANDS,
-
- /** Thick vertical bands */
- THICK_VERT_BANDS,
-
- /** Thick backward facing diagonals */
- THICK_BACKWARD_DIAG,
-
- /** Thick forward facing diagonals */
- THICK_FORWARD_DIAG,
-
- /** Large spots */
- BIG_SPOTS,
-
- /** Brick-like layout */
- BRICKS,
-
- /** Thin horizontal bands */
- THIN_HORZ_BANDS,
-
- /** Thin vertical bands */
- THIN_VERT_BANDS,
-
- /** Thin backward diagonal */
- THIN_BACKWARD_DIAG,
-
- /** Thin forward diagonal */
- THIN_FORWARD_DIAG,
-
- /** Squares */
- SQUARES,
-
- /** Diamonds */
- DIAMONDS,
-
- /** Less Dots */
- LESS_DOTS,
-
- /** Least Dots */
- LEAST_DOTS;
-
-}
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-
-package org.apache.poi.ss.usermodel;
-
-
-public interface Font {
- /**
- * Normal boldness (not bold)
- */
-
- public final static short BOLDWEIGHT_NORMAL = 0x190;
-
- /**
- * Bold boldness (bold)
- */
-
- public final static short BOLDWEIGHT_BOLD = 0x2bc;
-
- /**
- * normal type of black color.
- */
-
- public final static short COLOR_NORMAL = 0x7fff;
-
- /**
- * Dark Red color
- */
-
- public final static short COLOR_RED = 0xa;
-
- /**
- * no type offsetting (not super or subscript)
- */
-
- public final static short SS_NONE = 0;
-
- /**
- * superscript
- */
-
- public final static short SS_SUPER = 1;
-
- /**
- * subscript
- */
-
- public final static short SS_SUB = 2;
-
- /**
- * not underlined
- */
-
- public final static byte U_NONE = 0;
-
- /**
- * single (normal) underline
- */
-
- public final static byte U_SINGLE = 1;
-
- /**
- * double underlined
- */
-
- public final static byte U_DOUBLE = 2;
-
- /**
- * accounting style single underline
- */
-
- public final static byte U_SINGLE_ACCOUNTING = 0x21;
-
- /**
- * accounting style double underline
- */
-
- public final static byte U_DOUBLE_ACCOUNTING = 0x22;
-
- /**
- * ANSI character set
- */
- public final static byte ANSI_CHARSET = 0;
-
- /**
- * Default character set.
- */
- public final static byte DEFAULT_CHARSET = 1;
-
- /**
- * Symbol character set
- */
- public final static byte SYMBOL_CHARSET = 2;
-
- /**
- * set the name for the font (i.e. Arial)
- * @param name String representing the name of the font to use
- */
-
- void setFontName(String name);
-
- /**
- * get the name for the font (i.e. Arial)
- * @return String representing the name of the font to use
- */
-
- String getFontName();
-
- /**
- * set the font height in unit's of 1/20th of a point. Maybe you might want to
- * use the setFontHeightInPoints which matches to the familiar 10, 12, 14 etc..
- * @param height height in 1/20ths of a point
- * @see #setFontHeightInPoints(short)
- */
-
- void setFontHeight(short height);
-
- /**
- * set the font height
- * @param height height in the familiar unit of measure - points
- * @see #setFontHeight(short)
- */
-
- void setFontHeightInPoints(short height);
-
- /**
- * get the font height in unit's of 1/20th of a point. Maybe you might want to
- * use the getFontHeightInPoints which matches to the familiar 10, 12, 14 etc..
- * @return short - height in 1/20ths of a point
- * @see #getFontHeightInPoints()
- */
-
- short getFontHeight();
-
- /**
- * get the font height
- * @return short - height in the familiar unit of measure - points
- * @see #getFontHeight()
- */
-
- short getFontHeightInPoints();
-
- /**
- * set whether to use italics or not
- * @param italic italics or not
- */
-
- void setItalic(boolean italic);
-
- /**
- * get whether to use italics or not
- * @return italics or not
- */
-
- boolean getItalic();
-
- /**
- * set whether to use a strikeout horizontal line through the text or not
- * @param strikeout or not
- */
-
- void setStrikeout(boolean strikeout);
-
- /**
- * get whether to use a strikeout horizontal line through the text or not
- * @return strikeout or not
- */
-
- boolean getStrikeout();
-
- /**
- * set the color for the font
- * @param color to use
- * @see #COLOR_NORMAL Note: Use this rather than HSSFColor.AUTOMATIC for default font color
- * @see #COLOR_RED
- */
-
- void setColor(short color);
-
- /**
- * get the color for the font
- * @return color to use
- * @see #COLOR_NORMAL
- * @see #COLOR_RED
- * @see org.apache.poi.hssf.usermodel.HSSFPalette#getColor(short)
- */
- short getColor();
-
- /**
- * set normal,super or subscript.
- * @param offset type to use (none,super,sub)
- * @see #SS_NONE
- * @see #SS_SUPER
- * @see #SS_SUB
- */
-
- void setTypeOffset(short offset);
-
- /**
- * get normal,super or subscript.
- * @return offset type to use (none,super,sub)
- * @see #SS_NONE
- * @see #SS_SUPER
- * @see #SS_SUB
- */
-
- short getTypeOffset();
-
- /**
- * set type of text underlining to use
- * @param underline type
- * @see #U_NONE
- * @see #U_SINGLE
- * @see #U_DOUBLE
- * @see #U_SINGLE_ACCOUNTING
- * @see #U_DOUBLE_ACCOUNTING
- */
-
- void setUnderline(byte underline);
-
- /**
- * get type of text underlining to use
- * @return underlining type
- * @see #U_NONE
- * @see #U_SINGLE
- * @see #U_DOUBLE
- * @see #U_SINGLE_ACCOUNTING
- * @see #U_DOUBLE_ACCOUNTING
- */
-
- byte getUnderline();
-
- /**
- * get character-set to use.
- * @return character-set
- * @see #ANSI_CHARSET
- * @see #DEFAULT_CHARSET
- * @see #SYMBOL_CHARSET
- */
- byte getCharSet();
-
- /**
- * set character-set to use.
- * @see #ANSI_CHARSET
- * @see #DEFAULT_CHARSET
- * @see #SYMBOL_CHARSET
- */
- void setCharSet(byte charset);
-
- /**
- * get the index within the XSSFWorkbook (sequence within the collection of Font objects)
- *
- * @return unique index number of the underlying record this Font represents (probably you don't care
- * unless you're comparing which one is which)
- */
- public short getIndex();
-
- public void setBoldweight(short boldweight);
-
- public short getBoldweight();
-
-
-}
\ No newline at end of file
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-
-package org.apache.poi.ss.usermodel;
-
-
-/**
- * Charset represents the basic set of characters associated with a font (that it can display), and
- * corresponds to the ANSI codepage (8-bit or DBCS) of that character set used by a given language.
- *
- * @author Gisella Bronzetti
- */
-public enum FontCharset {
-
- ANSI(0),
- DEFAULT(1),
- SYMBOL(2),
- MAC(77),
- SHIFTJIS(128),
- HANGEUL(129),
- JOHAB(130),
- GB2312(134),
- CHINESEBIG5(136),
- GREEK(161),
- TURKISH(162),
- VIETNAMESE(163),
- HEBREW(177),
- ARABIC(178),
- BALTIC(186),
- RUSSIAN(204),
- THAI(222),
- EASTEUROPE(238),
- OEM(255);
-
-
- private int charset;
-
- private FontCharset(int value){
- charset = value;
- }
-
- /**
- * Returns value of this charset
- *
- * @return value of this charset
- */
- public int getValue(){
- return charset;
- }
-
- private static FontCharset[] _table = new FontCharset[256];
- static {
- for (FontCharset c : values()) {
- _table[c.getValue()] = c;
- }
- }
-
- public static FontCharset valueOf(int value){
- return _table[value];
- }
-}
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-
-package org.apache.poi.ss.usermodel;
-
-
-/**
- * The font family this font belongs to. A font family is a set of fonts having common stroke width and serif
- * characteristics. The font name overrides when there are conflicting values.
- *
- * @author Gisella Bronzetti
- */
-public enum FontFamily {
-
- NOT_APPLICABLE(0),
- ROMAN(1),
- SWISS(2),
- MODERN(3),
- SCRIPT(4),
- DECORATIVE(5);
-
- private int family;
-
- private FontFamily(int value) {
- family = value;
- }
-
- /**
- * Returns index of this font family
- *
- * @return index of this font family
- */
- public int getValue() {
- return family;
- }
-
- private static FontFamily[] _table = new FontFamily[6];
-
- static {
- for (FontFamily c : values()) {
- _table[c.getValue()] = c;
- }
- }
-
- public static FontFamily valueOf(int family) {
- return _table[family];
- }
-}
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-
-package org.apache.poi.ss.usermodel;
-
-
-/**
- * Defines the font scheme to which this font belongs.
- * When a font definition is part of a theme definition, then the font is categorized as either a major or minor font scheme component.
- * When a new theme is chosen, every font that is part of a theme definition is updated to use the new major or minor font definition for that
- * theme.
- * Usually major fonts are used for styles like headings, and minor fonts are used for body & paragraph text.
- *
- * @author Gisella Bronzetti
- */
-public enum FontScheme {
-
-
- NONE(1),
- MAJOR(2),
- MINOR(3);
-
- private int value;
-
- private FontScheme(int val) {
- value = val;
- }
-
- public int getValue() {
- return value;
- }
-
- private static FontScheme[] _table = new FontScheme[4];
- static {
- for (FontScheme c : values()) {
- _table[c.getValue()] = c;
- }
- }
-
- public static FontScheme valueOf(int value){
- return _table[value];
- }
-}
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-
-package org.apache.poi.ss.usermodel;
-
-/**
- * the different types of possible underline formatting
- *
- * @author Gisella Bronzetti
- */
-public enum FontUnderline {
-
- /**
- * Single-line underlining under each character in the cell.
- * The underline is drawn through the descenders of
- * characters such as g and p..
- */
- SINGLE(1),
-
- /**
- * Double-line underlining under each character in the
- * cell. underlines are drawn through the descenders of
- * characters such as g and p.
- */
- DOUBLE(2),
-
- /**
- * Single-line accounting underlining under each
- * character in the cell. The underline is drawn under the
- * descenders of characters such as g and p.
- */
- SINGLE_ACCOUNTING(3),
-
- /**
- * Double-line accounting underlining under each
- * character in the cell. The underlines are drawn under
- * the descenders of characters such as g and p.
- */
- DOUBLE_ACCOUNTING(4),
-
- /**
- * No underline.
- */
- NONE(5);
-
- private int value;
-
-
- private FontUnderline(int val) {
- value = val;
- }
-
- public int getValue() {
- return value;
- }
-
- public byte getByteValue() {
- switch (this) {
- case DOUBLE:
- return Font.U_DOUBLE;
- case DOUBLE_ACCOUNTING:
- return Font.U_DOUBLE_ACCOUNTING;
- case SINGLE_ACCOUNTING:
- return Font.U_SINGLE_ACCOUNTING;
- case NONE:
- return Font.U_NONE;
- case SINGLE:
- return Font.U_SINGLE;
- default:
- return Font.U_SINGLE;
- }
- }
-
- private static FontUnderline[] _table = new FontUnderline[6];
- static {
- for (FontUnderline c : values()) {
- _table[c.getValue()] = c;
- }
- }
-
- public static FontUnderline valueOf(int value){
- return _table[value];
- }
-
- public static FontUnderline valueOf(byte value){
- FontUnderline val;
- switch (value) {
- case Font.U_DOUBLE:
- val = FontUnderline.DOUBLE;
- break;
- case Font.U_DOUBLE_ACCOUNTING:
- val = FontUnderline.DOUBLE_ACCOUNTING;
- break;
- case Font.U_SINGLE_ACCOUNTING:
- val = FontUnderline.SINGLE_ACCOUNTING;
- break;
- case Font.U_SINGLE:
- val = FontUnderline.SINGLE;
- break;
- default:
- val = FontUnderline.NONE;
- break;
- }
- return val;
- }
-
-}
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-
-package org.apache.poi.ss.usermodel;
-
-/**
- * Common definition of a HSSF or XSSF page footer.
- * For a list of all the different fields that can be
- * placed into a footer, such as page number,
- * bold, underline etc, see
- * {@link org.apache.poi.hssf.usermodel.HeaderFooter}.
- */
-public interface Footer extends HeaderFooter {
- /**
- * Get the left side of the footer.
- * @return The string representing the left side.
- */
- String getLeft();
-
- /**
- * Sets the left string.
- * @param newLeft The string to set as the left side.
- */
- void setLeft(String newLeft);
-
- /**
- * Get the center of the footer.
- * @return The string representing the center.
- */
- String getCenter();
-
- /**
- * Sets the center string.
- * @param newCenter The string to set as the center.
- */
- void setCenter(String newCenter);
-
- /**
- * Get the right side of the footer.
- * @return The string representing the right side.
- */
- String getRight();
-
- /**
- * Sets the right string.
- * @param newRight The string to set as the right side.
- */
- void setRight(String newRight);
-}
+++ /dev/null
-/* ====================================================================\r
- Licensed to the Apache Software Foundation (ASF) under one or more\r
- contributor license agreements. See the NOTICE file distributed with\r
- this work for additional information regarding copyright ownership.\r
- The ASF licenses this file to You under the Apache License, Version 2.0\r
- (the "License"); you may not use this file except in compliance with\r
- the License. You may obtain a copy of the License at\r
-\r
- http://www.apache.org/licenses/LICENSE-2.0\r
-\r
- Unless required by applicable law or agreed to in writing, software\r
- distributed under the License is distributed on an "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- See the License for the specific language governing permissions and\r
- limitations under the License.\r
-==================================================================== */\r
-package org.apache.poi.ss.usermodel;\r
-\r
-import java.util.Map;\r
-import java.util.HashMap;\r
-\r
-/**\r
- * Enumerates error values in SpreadsheetML formula calculations.\r
- *\r
- * @author Yegor Kozlov\r
- */\r
-public enum FormulaError {\r
- /**\r
- * Intended to indicate when two areas are required to intersect, but do not.\r
- * <p>Example:\r
- * In the case of SUM(B1 C1), the space between B1 and C1 is treated as the binary\r
- * intersection operator, when a comma was intended. end example]\r
- * </p>\r
- */\r
- NULL(0x00, "#NULL!"),\r
-\r
- /**\r
- * Intended to indicate when any number, including zero, is divided by zero.\r
- * Note: However, any error code divided by zero results in that error code.\r
- */\r
- DIV0(0x07, "#DIV/0!"),\r
-\r
- /**\r
- * Intended to indicate when an incompatible type argument is passed to a function, or\r
- * an incompatible type operand is used with an operator.\r
- * <p>Example:\r
- * In the case of a function argument, text was expected, but a number was provided\r
- * </p>\r
- */\r
- VALUE(0x0F, "#VALUE!"),\r
-\r
- /**\r
- * Intended to indicate when a cell reference is invalid.\r
- * <p>Example:\r
- * If a formula contains a reference to a cell, and then the row or column containing that cell is deleted,\r
- * a #REF! error results. If a worksheet does not support 20,001 columns,\r
- * OFFSET(A1,0,20000) will result in a #REF! error.\r
- * </p>\r
- */\r
- REF(0x1D, "#REF!"),\r
-\r
- /**\r
- * Intended to indicate when what looks like a name is used, but no such name has been defined.\r
- * <p>Example:\r
- * XYZ/3, where XYZ is not a defined name. Total is & A10,\r
- * where neither Total nor is is a defined name. Presumably, "Total is " & A10\r
- * was intended. SUM(A1C10), where the range A1:C10 was intended.\r
- * </p>\r
- */\r
- NAME(0x1D, "#NAME?"),\r
-\r
- /**\r
- * Intended to indicate when an argument to a function has a compatible type, but has a\r
- * value that is outside the domain over which that function is defined. (This is known as\r
- * a domain error.)\r
- * <p>Example:\r
- * Certain calls to ASIN, ATANH, FACT, and SQRT might result in domain errors.\r
- * </p>\r
- * Intended to indicate that the result of a function cannot be represented in a value of\r
- * the specified type, typically due to extreme magnitude. (This is known as a range\r
- * error.)\r
- * <p>Example: FACT(1000) might result in a range error. </p>\r
- */\r
- NUM(0x24, "#NUM!"),\r
-\r
- /**\r
- * Intended to indicate when a designated value is not available.\r
- * <p>Example:\r
- * Some functions, such as SUMX2MY2, perform a series of operations on corresponding\r
- * elements in two arrays. If those arrays do not have the same number of elements, then\r
- * for some elements in the longer array, there are no corresponding elements in the\r
- * shorter one; that is, one or more values in the shorter array are not available.\r
- * </p>\r
- * This error value can be produced by calling the function NA\r
- */\r
- NA(0x2A, "#N/A");\r
-\r
- private byte type;\r
- private String repr;\r
-\r
- private FormulaError(int type, String repr) {\r
- this.type = (byte) type;\r
- this.repr = repr;\r
- }\r
-\r
- /**\r
- * @return numeric code of the error\r
- */\r
- public byte getCode() {\r
- return type;\r
- }\r
-\r
- /**\r
- * @return string representation of the error\r
- */\r
- public String getString() {\r
- return repr;\r
- }\r
-\r
- private static Map<String, FormulaError> smap = new HashMap<String, FormulaError>();\r
- private static Map<Byte, FormulaError> imap = new HashMap<Byte, FormulaError>();\r
- static{\r
- for (FormulaError error : values()) {\r
- imap.put(error.getCode(), error);\r
- smap.put(error.getString(), error);\r
- }\r
- }\r
-\r
- public static FormulaError forInt(byte type){\r
- FormulaError err = imap.get(type);\r
- if(err == null) throw new IllegalArgumentException("Unknown error type: " + type);\r
- return err;\r
- }\r
-\r
- public static FormulaError forString(String code){\r
- FormulaError err = smap.get(code);\r
- if(err == null) throw new IllegalArgumentException("Unknown error code: " + code);\r
- return err;\r
- }\r
-}\r
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-
-package org.apache.poi.ss.usermodel;
-
-/**
- * Common definition of a HSSF or XSSF page header.
- * For a list of all the different fields that can be
- * placed into a header, such as page number,
- * bold, underline etc, see
- * {@link org.apache.poi.hssf.usermodel.HeaderFooter}.
- */
-public interface Header extends HeaderFooter {
- /**
- * Get the left side of the header.
- *
- * @return The string representing the left side.
- */
- String getLeft();
-
- /**
- * Sets the left string.
- *
- * @param newLeft The string to set as the left side.
- */
- void setLeft(String newLeft);
-
- /**
- * Get the center of the header.
- *
- * @return The string representing the center.
- */
- String getCenter();
-
- /**
- * Sets the center string.
- *
- * @param newCenter The string to set as the center.
- */
- void setCenter(String newCenter);
-
- /**
- * Get the right side of the header.
- *
- * @return The string representing the right side.
- */
- String getRight();
-
- /**
- * Sets the right string.
- *
- * @param newRight The string to set as the right side.
- */
- void setRight(String newRight);
-}
+++ /dev/null
-/* ====================================================================\r
- Licensed to the Apache Software Foundation (ASF) under one or more\r
- contributor license agreements. See the NOTICE file distributed with\r
- this work for additional information regarding copyright ownership.\r
- The ASF licenses this file to You under the Apache License, Version 2.0\r
- (the "License"); you may not use this file except in compliance with\r
- the License. You may obtain a copy of the License at\r
-\r
- http://www.apache.org/licenses/LICENSE-2.0\r
-\r
- Unless required by applicable law or agreed to in writing, software\r
- distributed under the License is distributed on an "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- See the License for the specific language governing permissions and\r
- limitations under the License.\r
-==================================================================== */\r
-\r
-package org.apache.poi.ss.usermodel;\r
-\r
-/**\r
- * The enumeration value indicating horizontal alignment of a cell,\r
- * i.e., whether it is aligned general, left, right, horizontally centered, filled (replicated),\r
- * justified, centered across multiple cells, or distributed.\r
- */\r
-public enum HorizontalAlignment {\r
- /**\r
- * The horizontal alignment is general-aligned. Text data is left-aligned.\r
- * Numbers, dates, and times are rightaligned. Boolean types are centered.\r
- * Changing the alignment does not change the type of data.\r
- */\r
- GENERAL,\r
-\r
- /**\r
- * The horizontal alignment is left-aligned, even in Rightto-Left mode.\r
- * Aligns contents at the left edge of the cell. If an indent amount is specified, the contents of\r
- * the cell is indented from the left by the specified number of character spaces. The character spaces are\r
- * based on the default font and font size for the workbook.\r
- */\r
- LEFT,\r
-\r
- /**\r
- * The horizontal alignment is centered, meaning the text is centered across the cell.\r
- */\r
- CENTER,\r
-\r
- /**\r
- * The horizontal alignment is right-aligned, meaning that cell contents are aligned at the right edge of the cell,\r
- * even in Right-to-Left mode.\r
- */\r
- RIGHT,\r
-\r
- /**\r
- * Indicates that the value of the cell should be filled\r
- * across the entire width of the cell. If blank cells to the right also have the fill alignment,\r
- * they are also filled with the value, using a convention similar to centerContinuous.\r
- * <p>\r
- * Additional rules:\r
- * <ol>\r
- * <li>Only whole values can be appended, not partial values.</li>\r
- * <li>The column will not be widened to 'best fit' the filled value</li>\r
- * <li>If appending an additional occurrence of the value exceeds the boundary of the cell\r
- * left/right edge, don't append the additional occurrence of the value.</li>\r
- * <li>The display value of the cell is filled, not the underlying raw number.</li>\r
- * </ol>\r
- * </p>\r
- */\r
- FILL,\r
-\r
- /**\r
- * The horizontal alignment is justified (flush left and right).\r
- * For each line of text, aligns each line of the wrapped text in a cell to the right and left\r
- * (except the last line). If no single line of text wraps in the cell, then the text is not justified.\r
- */\r
- JUSTIFY,\r
-\r
- /**\r
- * The horizontal alignment is centered across multiple cells.\r
- * The information about how many cells to span is expressed in the Sheet Part,\r
- * in the row of the cell in question. For each cell that is spanned in the alignment,\r
- * a cell element needs to be written out, with the same style Id which references the centerContinuous alignment.\r
- */\r
- CENTER_SELECTION,\r
-\r
- /**\r
- * Indicates that each 'word' in each line of text inside the cell is evenly distributed\r
- * across the width of the cell, with flush right and left margins.\r
- * <p>\r
- * When there is also an indent value to apply, both the left and right side of the cell\r
- * are padded by the indent value.\r
- * </p>\r
- * <p> A 'word' is a set of characters with no space character in them. </p>\r
- * <p> Two lines inside a cell are separated by a carriage return. </p>\r
- */\r
- DISTRIBUTED\r
-}\r
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-package org.apache.poi.ss.usermodel;
-
-/**
- * Represents an Excel hyperlink.
- */
-public interface Hyperlink extends org.apache.poi.common.usermodel.Hyperlink {
- /**
- * Return the row of the first cell that contains the hyperlink
- *
- * @return the 0-based row of the cell that contains the hyperlink
- */
- public int getFirstRow();
-
- /**
- * Set the row of the first cell that contains the hyperlink
- *
- * @param row the 0-based row of the first cell that contains the hyperlink
- */
- public void setFirstRow(int row);
-
- /**
- * Return the row of the last cell that contains the hyperlink
- *
- * @return the 0-based row of the last cell that contains the hyperlink
- */
- public int getLastRow();
-
- /**
- * Set the row of the last cell that contains the hyperlink
- *
- * @param row the 0-based row of the last cell that contains the hyperlink
- */
- public void setLastRow(int row);
-
- /**
- * Return the column of the first cell that contains the hyperlink
- *
- * @return the 0-based column of the first cell that contains the hyperlink
- */
- public int getFirstColumn();
-
- /**
- * Set the column of the first cell that contains the hyperlink
- *
- * @param col the 0-based column of the first cell that contains the hyperlink
- */
- public void setFirstColumn(int col);
-
- /**
- * Return the column of the last cell that contains the hyperlink
- *
- * @return the 0-based column of the last cell that contains the hyperlink
- */
- public int getLastColumn();
-
- /**
- * Set the column of the last cell that contains the hyperlink
- *
- * @param col the 0-based column of the last cell that contains the hyperlink
- */
- public void setLastColumn(int col);
-}
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-
-package org.apache.poi.ss.usermodel;
-
-/**
- * A deprecated indexing scheme for colours that is still required for some records, and for backwards
- * compatibility with OLE2 formats.
- *
- * <p>
- * Each element corresponds to a color index (zero-based). When using the default indexed color palette,
- * the values are not written out, but instead are implied. When the color palette has been modified from default,
- * then the entire color palette is used.
- * </p>
- *
- * @author Yegor Kozlov
- */
-public enum IndexedColors {
-
- BLACK(8),
- WHITE(9),
- RED(10),
- BRIGHT_GREEN(11),
- BLUE(12),
- YELLOW(13),
- PINK(14),
- TURQUOISE(15),
- DARK_RED(16),
- GREEN(17),
- DARK_BLUE(18),
- DARK_YELLOW(19),
- VIOLET(20),
- TEAL(21),
- GREY_25_PERCENT(22),
- GREY_50_PERCENT(23),
- CORNFLOWER_BLUE(24),
- MAROON(25),
- LEMON_CHIFFON(26),
- ORCHID(28),
- CORAL(29),
- ROYAL_BLUE(30),
- LIGHT_CORNFLOWER_BLUE(31),
- SKY_BLUE(40),
- LIGHT_TURQUOISE(41),
- LIGHT_GREEN(42),
- LIGHT_YELLOW(43),
- PALE_BLUE(44),
- ROSE(45),
- LAVENDER(46),
- TAN(47),
- LIGHT_BLUE(48),
- AQUA(49),
- LIME(50),
- GOLD(51),
- LIGHT_ORANGE(52),
- ORANGE(53),
- BLUE_GREY(54),
- GREY_40_PERCENT(55),
- DARK_TEAL(56),
- SEA_GREEN(57),
- DARK_GREEN(58),
- OLIVE_GREEN(59),
- BROWN(60),
- PLUM(61),
- INDIGO(62),
- GREY_80_PERCENT(63),
- AUTOMATIC(64);
-
- private int index;
-
- IndexedColors(int idx){
- index = idx;
- }
-
- /**
- * Returns index of this color
- *
- * @return index of this color
- */
- public short getIndex(){
- return (short)index;
- }
-}
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-
-package org.apache.poi.ss.usermodel;
-
-/**
- * Represents a defined name for a range of cells.
- * <p>
- * A name is a meaningful shorthand that makes it easier to understand the purpose of a
- * cell reference, constant or a formula.
- * </p>
- * Examples:
- * <pre><blockquote>
- * Sheet sheet = workbook.createSheet("Loan Calculator");
- * Name name;
- *
- * name = workbook.createName();
- * name.setNameName("Interest_Rate");
- * name.setRefersToFormula("'Loan Calculator'!$E$5");
- *
- * name = wb.createName();
- * name.setNameName("Loan_Amount");
- * name.setRefersToFormula("'Loan Calculator'!$E$4");
- *
- * name = wb.createName();
- * name.setNameName("Number_of_Payments");
- * name.setRefersToFormula("'Loan Calculator'!$E$10");
- *
- * name = wb.createName();
- * name.setNameName("Monthly_Payment");
- * name.setRefersToFormula("-PMT(Interest_Rate/12,Number_of_Payments,Loan_Amount)");
- *
- * name = wb.createName();
- * name.setNameName("Values_Entered");
- * name.setRefersToFormula("IF(Loan_Amount*Interest_Rate>0,1,0)");
- *
- * </blockquote></pre>
- */
-public interface Name {
-
- /**
- * Get the sheets name which this named range is referenced to
- *
- * @return sheet name, which this named range refered to
- */
- String getSheetName();
-
- /**
- * Gets the name of the named range
- *
- * @return named range name
- */
- String getNameName();
-
- /**
- * Sets the name of the named range
- *
- * <p>The following is a list of syntax rules that you need to be aware of when you create and edit names.</p>
- * <ul>
- * <li><strong>Valid characters</strong>
- * The first character of a name must be a letter, an underscore character (_), or a backslash (\).
- * Remaining characters in the name can be letters, numbers, periods, and underscore characters.
- * </li>
- * <li><strong>Cell references disallowed</strong>
- * Names cannot be the same as a cell reference, such as Z$100 or R1C1.</li>
- * <li><strong>Spaces are not valid</strong>
- * Spaces are not allowed as part of a name. Use the underscore character (_) and period (.) as word separators, such as, Sales_Tax or First.Quarter.
- * </li>
- * <li><strong>Name length</strong>
- * A name can contain up to 255 characters.
- * </li>
- * <li><strong>Case sensitivity</strong>
- * Names can contain uppercase and lowercase letters.
- * </li>
- * </ul>
- * <p>
- * A name must always be unique within its scope. POI prevents you from defining a name that is not unique
- * within its scope. However you can use the same name in different scopes. Example:
- * <pre><blockquote>
- * //by default names are workbook-global
- * Name name;
- * name = workbook.createName();
- * name.setNameName("sales_08");
- *
- * name = workbook.createName();
- * name.setNameName("sales_08"); //will throw an exception: "The workbook already contains this name (case-insensitive)"
- *
- * //create sheet-level name
- * name = workbook.createName();
- * name.setSheetIndex(0); //the scope of the name is the first sheet
- * name.setNameName("sales_08"); //ok
- *
- * name = workbook.createName();
- * name.setSheetIndex(0);
- * name.setNameName("sales_08"); //will throw an exception: "The sheet already contains this name (case-insensitive)"
- *
- * </blockquote></pre>
- * </p>
- * @param name named range name to set
- * @throws IllegalArgumentException if the name is invalid or the already exists within its scope (case-insensitive)
- */
- void setNameName(String name);
-
- /**
- * Returns the formula that the name is defined to refer to.
- *
- * @return the reference for this name, <code>null</code> if it has not been set yet. Never empty string
- * @see #setRefersToFormula(String)
- */
- String getRefersToFormula();
-
- /**
- * Sets the formula that the name is defined to refer to. The following are representative examples:
- *
- * <ul>
- * <li><code>'My Sheet'!$A$3</code></li>
- * <li><code>8.3</code></li>
- * <li><code>HR!$A$1:$Z$345</code></li>
- * <li><code>SUM(Sheet1!A1,Sheet2!B2)</li>
- * <li><code>-PMT(Interest_Rate/12,Number_of_Payments,Loan_Amount)</li>
- * </ul>
- *
- * @param formulaText the reference for this name
- * @throws IllegalArgumentException if the specified formulaText is unparsable
- */
- void setRefersToFormula(String formulaText);
-
- /**
- * Checks if this name is a function name
- *
- * @return true if this name is a function name
- */
- boolean isFunctionName();
-
- /**
- * Checks if this name points to a cell that no longer exists
- *
- * @return <code>true</code> if the name refers to a deleted cell, <code>false</code> otherwise
- */
- boolean isDeleted();
-
- /**
- * Tell Excel that this name applies to the worksheet with the specified index instead of the entire workbook.
- *
- * @param sheetId the sheet index this name applies to, -1 unsets this property making the name workbook-global
- * @throws IllegalArgumentException if the sheet index is invalid.
- */
- public void setSheetIndex(int sheetId);
-
- /**
- * Returns the sheet index this name applies to.
- *
- * @return the sheet index this name applies to, -1 if this name applies to the entire workbook
- */
- public int getSheetIndex();
-
- /**
- * Returns the comment the user provided when the name was created.
- *
- * @return the user comment for this named range
- */
- public String getComment();
-
- /**
- * Sets the comment the user provided when the name was created.
- *
- * @param comment the user comment for this named range
- */
- public void setComment(String comment);
-}
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-
-package org.apache.poi.ss.usermodel;
-
-/**
- * Specifies printed page order.
- *
- * @author Gisella Bronzetti
- */
-public enum PageOrder {
-
- /**
- * Order pages vertically first, then move horizontally.
- */
- DOWN_THEN_OVER(1),
- /**
- * Order pages horizontally first, then move vertically
- */
- OVER_THEN_DOWN(2);
-
-
- private int order;
-
-
- private PageOrder(int order) {
- this.order = order;
- }
-
- public int getValue() {
- return order;
- }
-
-
- private static PageOrder[] _table = new PageOrder[3];
- static {
- for (PageOrder c : values()) {
- _table[c.getValue()] = c;
- }
- }
-
- public static PageOrder valueOf(int value){
- return _table[value];
- }
-}
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-
-package org.apache.poi.ss.usermodel;
-
-/**
- * The enumeration value indicating the possible paper size for a sheet
- *
- * @author Daniele Montagni
- */
-public enum PaperSize {
- LETTER_PAPER,
- LETTER_SMALL_PAPER,
- TABLOID_PAPER,
- LEDGER_PAPER,
- LEGAL_PAPER,
- STATEMENT_PAPER,
- EXECUTIVE_PAPER,
- A3_PAPER,
- A4_PAPER,
- A4_SMALL_PAPER,
- A5_PAPER,
- B4_PAPER,
- B5_PAPER,
- FOLIO_PAPER,
- QUARTO_PAPER,
- STANDARD_PAPER_10_14,
- STANDARD_PAPER_11_17;
-}
+++ /dev/null
-/* ====================================================================\r
- Licensed to the Apache Software Foundation (ASF) under one or more\r
- contributor license agreements. See the NOTICE file distributed with\r
- this work for additional information regarding copyright ownership.\r
- The ASF licenses this file to You under the Apache License, Version 2.0\r
- (the "License"); you may not use this file except in compliance with\r
- the License. You may obtain a copy of the License at\r
-\r
- http://www.apache.org/licenses/LICENSE-2.0\r
-\r
- Unless required by applicable law or agreed to in writing, software\r
- distributed under the License is distributed on an "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- See the License for the specific language governing permissions and\r
- limitations under the License.\r
-==================================================================== */\r
-package org.apache.poi.ss.usermodel;\r
-\r
-/**\r
- * Repersents a picture in a SpreadsheetML document\r
- *\r
- * @author Yegor Kozlov\r
- */\r
-public interface Picture {\r
-\r
- /**\r
- * Reset the image to the original size.\r
- */\r
- void resize();\r
-\r
- /**\r
- * Reset the image to the original size.\r
- *\r
- * @param scale the amount by which image dimensions are multiplied relative to the original size.\r
- * <code>resize(1.0)</code> sets the original size, <code>resize(0.5)</code> resize to 50% of the original,\r
- * <code>resize(2.0)</code> resizes to 200% of the original.\r
- */\r
- void resize(double scale);\r
-\r
- ClientAnchor getPreferredSize();\r
-\r
-}\r
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-
-package org.apache.poi.ss.usermodel;
-
-public interface PictureData {
-
- /**
- * Gets the picture data.
- *
- * @return the picture data.
- */
- byte[] getData();
-
- /**
- * Suggests a file extension for this image.
- *
- * @return the file extension.
- */
- String suggestFileExtension();
-
-}
\ No newline at end of file
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-
-package org.apache.poi.ss.usermodel;
-
-/**
- * These enumerations specify how cell comments shall be displayed for paper printing purposes.
- *
- * @author Gisella Bronzetti
- */
-public enum PrintCellComments {
-
- /**
- * Do not print cell comments.
- */
- NONE(1),
- /**
- * Print cell comments as displayed.
- */
- AS_DISPLAYED(2),
- /**
- * Print cell comments at end of document.
- */
- AT_END(3);
-
-
- private int comments;
-
- private PrintCellComments(int comments) {
- this.comments = comments;
- }
-
- public int getValue() {
- return comments;
- }
-
- private static PrintCellComments[] _table = new PrintCellComments[4];
- static {
- for (PrintCellComments c : values()) {
- _table[c.getValue()] = c;
- }
- }
-
- public static PrintCellComments valueOf(int value){
- return _table[value];
- }
-}
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-
-package org.apache.poi.ss.usermodel;
-
-/**
- * The enumeration value indicating the print orientation for a sheet.
- *
- * @author Gisella Bronzetti
- */
-public enum PrintOrientation {
-
- /**
- * orientation not specified
- */
- DEFAULT(1),
- /**
- * portrait orientation
- */
- PORTRAIT(2),
- /**
- * landscape orientations
- */
- LANDSCAPE(3);
-
-
- private int orientation;
-
- private PrintOrientation(int orientation) {
- this.orientation = orientation;
- }
-
-
- public int getValue() {
- return orientation;
- }
-
-
- private static PrintOrientation[] _table = new PrintOrientation[4];
- static {
- for (PrintOrientation c : values()) {
- _table[c.getValue()] = c;
- }
- }
-
- public static PrintOrientation valueOf(int value){
- return _table[value];
- }
-}
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-
-package org.apache.poi.ss.usermodel;
-
-public interface PrintSetup {
-
- public static final short LETTER_PAPERSIZE = 1;
-
- public static final short LEGAL_PAPERSIZE = 5;
-
- public static final short EXECUTIVE_PAPERSIZE = 7;
-
- public static final short A4_PAPERSIZE = 9;
-
- public static final short A5_PAPERSIZE = 11;
-
- public static final short ENVELOPE_10_PAPERSIZE = 20;
-
- public static final short ENVELOPE_DL_PAPERSIZE = 27;
-
- public static final short ENVELOPE_CS_PAPERSIZE = 28;
-
- public static final short ENVELOPE_MONARCH_PAPERSIZE = 37;
-
- /**
- * Set the paper size.
- * @param size the paper size.
- */
- void setPaperSize(short size);
-
- /**
- * Set the scale.
- * @param scale the scale to use
- */
- void setScale(short scale);
-
- /**
- * Set the page numbering start.
- * @param start the page numbering start
- */
- void setPageStart(short start);
-
- /**
- * Set the number of pages wide to fit the sheet in
- * @param width the number of pages
- */
- void setFitWidth(short width);
-
- /**
- * Set the number of pages high to fit the sheet in
- * @param height the number of pages
- */
- void setFitHeight(short height);
-
- /**
- * Set whether to go left to right or top down in ordering
- * @param ltor left to right
- */
- void setLeftToRight(boolean ltor);
-
- /**
- * Set whether to print in landscape
- * @param ls landscape
- */
- void setLandscape(boolean ls);
-
- /**
- * Valid settings. I'm not for sure.
- * @param valid Valid
- */
- void setValidSettings(boolean valid);
-
- /**
- * Set whether it is black and white
- * @param mono Black and white
- */
- void setNoColor(boolean mono);
-
- /**
- * Set whether it is in draft mode
- * @param d draft
- */
- void setDraft(boolean d);
-
- /**
- * Print the include notes
- * @param printnotes print the notes
- */
- void setNotes(boolean printnotes);
-
- /**
- * Set no orientation. ?
- * @param orientation Orientation.
- */
- void setNoOrientation(boolean orientation);
-
- /**
- * Set whether to use page start
- * @param page Use page start
- */
- void setUsePage(boolean page);
-
- /**
- * Sets the horizontal resolution.
- * @param resolution horizontal resolution
- */
- void setHResolution(short resolution);
-
- /**
- * Sets the vertical resolution.
- * @param resolution vertical resolution
- */
- void setVResolution(short resolution);
-
- /**
- * Sets the header margin.
- * @param headermargin header margin
- */
- void setHeaderMargin(double headermargin);
-
- /**
- * Sets the footer margin.
- * @param footermargin footer margin
- */
- void setFooterMargin(double footermargin);
-
- /**
- * Sets the number of copies.
- * @param copies number of copies
- */
- void setCopies(short copies);
-
- /**
- * Returns the paper size.
- * @return paper size
- */
- short getPaperSize();
-
- /**
- * Returns the scale.
- * @return scale
- */
- short getScale();
-
- /**
- * Returns the page start.
- * @return page start
- */
- short getPageStart();
-
- /**
- * Returns the number of pages wide to fit sheet in.
- * @return number of pages wide to fit sheet in
- */
- short getFitWidth();
-
- /**
- * Returns the number of pages high to fit the sheet in.
- * @return number of pages high to fit the sheet in
- */
- short getFitHeight();
-
- /**
- * Returns the left to right print order.
- * @return left to right print order
- */
- boolean getLeftToRight();
-
- /**
- * Returns the landscape mode.
- * @return landscape mode
- */
- boolean getLandscape();
-
- /**
- * Returns the valid settings.
- * @return valid settings
- */
- boolean getValidSettings();
-
- /**
- * Returns the black and white setting.
- * @return black and white setting
- */
- boolean getNoColor();
-
- /**
- * Returns the draft mode.
- * @return draft mode
- */
- boolean getDraft();
-
- /**
- * Returns the print notes.
- * @return print notes
- */
- boolean getNotes();
-
- /**
- * Returns the no orientation.
- * @return no orientation
- */
- boolean getNoOrientation();
-
- /**
- * Returns the use page numbers.
- * @return use page numbers
- */
- boolean getUsePage();
-
- /**
- * Returns the horizontal resolution.
- * @return horizontal resolution
- */
- short getHResolution();
-
- /**
- * Returns the vertical resolution.
- * @return vertical resolution
- */
- short getVResolution();
-
- /**
- * Returns the header margin.
- * @return header margin
- */
- double getHeaderMargin();
-
- /**
- * Returns the footer margin.
- * @return footer margin
- */
- double getFooterMargin();
-
- /**
- * Returns the number of copies.
- * @return number of copies
- */
- short getCopies();
-
-}
\ No newline at end of file
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-
-package org.apache.poi.ss.usermodel;
-
-/**
- * Rich text unicode string. These strings can have fonts
- * applied to arbitary parts of the string.
- *
- * @author Glen Stampoultzis (glens at apache.org)
- * @author Jason Height (jheight at apache.org)
- */
-public interface RichTextString {
-
- /**
- * Applies a font to the specified characters of a string.
- *
- * @param startIndex The start index to apply the font to (inclusive)
- * @param endIndex The end index to apply the font to (exclusive)
- * @param fontIndex The font to use.
- */
- void applyFont(int startIndex, int endIndex, short fontIndex);
-
- /**
- * Applies a font to the specified characters of a string.
- *
- * @param startIndex The start index to apply the font to (inclusive)
- * @param endIndex The end index to apply to font to (exclusive)
- * @param font The index of the font to use.
- */
- void applyFont(int startIndex, int endIndex, Font font);
-
- /**
- * Sets the font of the entire string.
- * @param font The font to use.
- */
- void applyFont(Font font);
-
- /**
- * Removes any formatting that may have been applied to the string.
- */
- void clearFormatting();
-
- /**
- * Returns the plain string representation.
- */
- String getString();
-
- /**
- * @return the number of characters in the font.
- */
- int length();
-
- /**
- * @return The number of formatting runs used.
- *
- */
- int numFormattingRuns();
-
- /**
- * The index within the string to which the specified formatting run applies.
- * @param index the index of the formatting run
- * @return the index within the string.
- */
- int getIndexOfFormattingRun(int index);
-
- /**
- * Applies the specified font to the entire string.
- *
- * @param fontIndex the font to apply.
- */
- void applyFont(short fontIndex);
-
-}
\ No newline at end of file
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-
-package org.apache.poi.ss.usermodel;
-
-import java.lang.Iterable;
-import java.util.Iterator;
-
-/**
- * High level representation of a row of a spreadsheet.
- */
-public interface Row extends Iterable<Cell> {
-
- /**
- * Use this to create new cells within the row and return it.
- * <p>
- * The cell that is returned is a {@link Cell#CELL_TYPE_BLANK}. The type can be changed
- * either through calling <code>setCellValue</code> or <code>setCellType</code>.
- *
- * @param column - the column number this cell represents
- * @return Cell a high level representation of the created cell.
- * @throws IllegalArgumentException if columnIndex < 0 or greater than the maximum number of supported columns
- * (255 for *.xls, 1048576 for *.xlsx)
- */
- Cell createCell(int column);
-
- /**
- * Use this to create new cells within the row and return it.
- * <p>
- * The cell that is returned is a {@link Cell#CELL_TYPE_BLANK}. The type can be changed
- * either through calling setCellValue or setCellType.
- *
- * @param column - the column number this cell represents
- * @return Cell a high level representation of the created cell.
- * @throws IllegalArgumentException if columnIndex < 0 or greate than a maximum number of supported columns
- * (255 for *.xls, 1048576 for *.xlsx)
- */
- Cell createCell(int column, int type);
-
- /**
- * Remove the Cell from this row.
- *
- * @param cell the cell to remove
- */
- void removeCell(Cell cell);
-
- /**
- * Set the row number of this row.
- *
- * @param rowNum the row number (0-based)
- * @throws IllegalArgumentException if rowNum < 0
- */
- void setRowNum(int rowNum);
-
- /**
- * Get row number this row represents
- *
- * @return the row number (0 based)
- */
- int getRowNum();
-
- /**
- * Get the cell representing a given column (logical cell) 0-based. If you
- * ask for a cell that is not defined....you get a null.
- *
- * @param cellnum 0 based column number
- * @return Cell representing that column or null if undefined.
- * @see #getCell(int, org.apache.poi.ss.usermodel.Row.MissingCellPolicy)
- */
- Cell getCell(int cellnum);
-
- /**
- * Returns the cell at the given (0 based) index, with the specified {@link org.apache.poi.ss.usermodel.Row.MissingCellPolicy}
- *
- * @return the cell at the given (0 based) index
- * @throws IllegalArgumentException if cellnum < 0 or the specified MissingCellPolicy is invalid
- * @see Row#RETURN_NULL_AND_BLANK
- * @see Row#RETURN_BLANK_AS_NULL
- * @see Row#CREATE_NULL_AS_BLANK
- */
- Cell getCell(int cellnum, MissingCellPolicy policy);
-
- /**
- * Get the number of the first cell contained in this row.
- *
- * @return short representing the first logical cell in the row,
- * or -1 if the row does not contain any cells.
- */
- short getFirstCellNum();
-
- /**
- * Gets the index of the last cell contained in this row <b>PLUS ONE</b>. The result also
- * happens to be the 1-based column number of the last cell. This value can be used as a
- * standard upper bound when iterating over cells:
- * <pre>
- * short minColIx = row.getFirstCellNum();
- * short maxColIx = row.getLastCellNum();
- * for(short colIx=minColIx; colIx<maxColIx; colIx++) {
- * Cell cell = row.getCell(colIx);
- * if(cell == null) {
- * continue;
- * }
- * //... do something with cell
- * }
- * </pre>
- *
- * @return short representing the last logical cell in the row <b>PLUS ONE</b>,
- * or -1 if the row does not contain any cells.
- */
- short getLastCellNum();
-
- /**
- * Gets the number of defined cells (NOT number of cells in the actual row!).
- * That is to say if only columns 0,4,5 have values then there would be 3.
- *
- * @return int representing the number of defined cells in the row.
- */
- int getPhysicalNumberOfCells();
-
- /**
- * Set the row's height or set to ff (-1) for undefined/default-height. Set the height in "twips" or
- * 1/20th of a point.
- *
- * @param height rowheight or 0xff for undefined (use sheet default)
- */
- void setHeight(short height);
-
- /**
- * Set whether or not to display this row with 0 height
- *
- * @param zHeight height is zero or not.
- */
- void setZeroHeight(boolean zHeight);
-
- /**
- * Get whether or not to display this row with 0 height
- *
- * @return - zHeight height is zero or not.
- */
- boolean getZeroHeight();
-
- /**
- * Set the row's height in points.
- *
- * @param height the height in points. <code>-1</code> resets to the default height
- */
- void setHeightInPoints(float height);
-
- /**
- * Get the row's height measured in twips (1/20th of a point). If the height is not set, the default worksheet value is returned,
- * See {@link Sheet#getDefaultRowHeightInPoints()}
- *
- * @return row height measured in twips (1/20th of a point)
- */
- short getHeight();
-
- /**
- * Returns row height measured in point size. If the height is not set, the default worksheet value is returned,
- * See {@link Sheet#getDefaultRowHeightInPoints()}
- *
- * @return row height measured in point size
- * @see Sheet#getDefaultRowHeightInPoints()
- */
- float getHeightInPoints();
-
- /**
- * @return Cell iterator of the physically defined cells. Note element 4 may
- * actually be row cell depending on how many are defined!
- */
- Iterator<Cell> cellIterator();
-
- /**
- * Returns the Sheet this row belongs to
- *
- * @return the Sheet that owns this row
- */
- Sheet getSheet();
-
- /**
- * Used to specify the different possible policies
- * if for the case of null and blank cells
- */
- public static final class MissingCellPolicy {
- private static int NEXT_ID = 1;
- public final int id;
- private MissingCellPolicy() {
- this.id = NEXT_ID++;
- }
- }
- /** Missing cells are returned as null, Blank cells are returned as normal */
- public static final MissingCellPolicy RETURN_NULL_AND_BLANK = new MissingCellPolicy();
- /** Missing cells are returned as null, as are blank cells */
- public static final MissingCellPolicy RETURN_BLANK_AS_NULL = new MissingCellPolicy();
- /** A new, blank cell is created for missing cells. Blank cells are returned as normal */
- public static final MissingCellPolicy CREATE_NULL_AS_BLANK = new MissingCellPolicy();
-}
+++ /dev/null
-/* ====================================================================\r
- Licensed to the Apache Software Foundation (ASF) under one or more\r
- contributor license agreements. See the NOTICE file distributed with\r
- this work for additional information regarding copyright ownership.\r
- The ASF licenses this file to You under the Apache License, Version 2.0\r
- (the "License"); you may not use this file except in compliance with\r
- the License. You may obtain a copy of the License at\r
-\r
- http://www.apache.org/licenses/LICENSE-2.0\r
-\r
- Unless required by applicable law or agreed to in writing, software\r
- distributed under the License is distributed on an "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- See the License for the specific language governing permissions and\r
- limitations under the License.\r
-==================================================================== */\r
-package org.apache.poi.ss.usermodel;\r
-\r
-/**\r
- * All known types of automatic shapes in DrawingML\r
- *\r
- * @author Yegor Kozlov\r
- */\r
-public class ShapeTypes {\r
- public static final int LINE = 1;\r
- public static final int LINE_INV = 2;\r
- public static final int TRIANGLE = 3;\r
- public static final int RT_TRIANGLE = 4;\r
- public static final int RECT = 5;\r
- public static final int DIAMOND = 6;\r
- public static final int PARALLELOGRAM = 7;\r
- public static final int TRAPEZOID = 8;\r
- public static final int NON_ISOSCELES_TRAPEZOID = 9;\r
- public static final int PENTAGON = 10;\r
- public static final int HEXAGON = 11;\r
- public static final int HEPTAGON = 12;\r
- public static final int OCTAGON = 13;\r
- public static final int DECAGON = 14;\r
- public static final int DODECAGON = 15;\r
- public static final int STAR_4 = 16;\r
- public static final int STAR_5 = 17;\r
- public static final int STAR_6 = 18;\r
- public static final int STAR_7 = 19;\r
- public static final int STAR_8 = 20;\r
- public static final int STAR_10 = 21;\r
- public static final int STAR_12 = 22;\r
- public static final int STAR_16 = 23;\r
- public static final int STAR_24 = 24;\r
- public static final int STAR_32 = 25;\r
- public static final int ROUND_RECT = 26;\r
- public static final int ROUND_1_RECT = 27;\r
- public static final int ROUND_2_SAME_RECT = 28;\r
- public static final int ROUND_2_DIAG_RECT = 29;\r
- public static final int SNIP_ROUND_RECT = 30;\r
- public static final int SNIP_1_RECT = 31;\r
- public static final int SNIP_2_SAME_RECT = 32;\r
- public static final int SNIP_2_DIAG_RECT = 33;\r
- public static final int PLAQUE = 34;\r
- public static final int ELLIPSE = 35;\r
- public static final int TEARDROP = 36;\r
- public static final int HOME_PLATE = 37;\r
- public static final int CHEVRON = 38;\r
- public static final int PIE_WEDGE = 39;\r
- public static final int PIE = 40;\r
- public static final int BLOCK_ARC = 41;\r
- public static final int DONUT = 42;\r
- public static final int NO_SMOKING = 43;\r
- public static final int RIGHT_ARROW = 44;\r
- public static final int LEFT_ARROW = 45;\r
- public static final int UP_ARROW = 46;\r
- public static final int DOWN_ARROW = 47;\r
- public static final int STRIPED_RIGHT_ARROW = 48;\r
- public static final int NOTCHED_RIGHT_ARROW = 49;\r
- public static final int BENT_UP_ARROW = 50;\r
- public static final int LEFT_RIGHT_ARROW = 51;\r
- public static final int UP_DOWN_ARROW = 52;\r
- public static final int LEFT_UP_ARROW = 53;\r
- public static final int LEFT_RIGHT_UP_ARROW = 54;\r
- public static final int QUAD_ARROW = 55;\r
- public static final int LEFT_ARROW_CALLOUT = 56;\r
- public static final int RIGHT_ARROW_CALLOUT = 57;\r
- public static final int UP_ARROW_CALLOUT = 58;\r
- public static final int DOWN_ARROW_CALLOUT = 59;\r
- public static final int LEFT_RIGHT_ARROW_CALLOUT = 60;\r
- public static final int UP_DOWN_ARROW_CALLOUT = 61;\r
- public static final int QUAD_ARROW_CALLOUT = 62;\r
- public static final int BENT_ARROW = 63;\r
- public static final int UTURN_ARROW = 64;\r
- public static final int CIRCULAR_ARROW = 65;\r
- public static final int LEFT_CIRCULAR_ARROW = 66;\r
- public static final int LEFT_RIGHT_CIRCULAR_ARROW = 67;\r
- public static final int CURVED_RIGHT_ARROW = 68;\r
- public static final int CURVED_LEFT_ARROW = 69;\r
- public static final int CURVED_UP_ARROW = 70;\r
- public static final int CURVED_DOWN_ARROW = 71;\r
- public static final int SWOOSH_ARROW = 72;\r
- public static final int CUBE = 73;\r
- public static final int CAN = 74;\r
- public static final int LIGHTNING_BOLT = 75;\r
- public static final int HEART = 76;\r
- public static final int SUN = 77;\r
- public static final int MOON = 78;\r
- public static final int SMILEY_FACE = 79;\r
- public static final int IRREGULAR_SEAL_1 = 80;\r
- public static final int IRREGULAR_SEAL_2 = 81;\r
- public static final int FOLDED_CORNER = 82;\r
- public static final int BEVEL = 83;\r
- public static final int FRAME = 84;\r
- public static final int HALF_FRAME = 85;\r
- public static final int CORNER = 86;\r
- public static final int DIAG_STRIPE = 87;\r
- public static final int CHORD = 88;\r
- public static final int ARC = 89;\r
- public static final int LEFT_BRACKET = 90;\r
- public static final int RIGHT_BRACKET = 91;\r
- public static final int LEFT_BRACE = 92;\r
- public static final int RIGHT_BRACE = 93;\r
- public static final int BRACKET_PAIR = 94;\r
- public static final int BRACE_PAIR = 95;\r
- public static final int STRAIGHT_CONNECTOR_1 = 96;\r
- public static final int BENT_CONNECTOR_2 = 97;\r
- public static final int BENT_CONNECTOR_3 = 98;\r
- public static final int BENT_CONNECTOR_4 = 99;\r
- public static final int BENT_CONNECTOR_5 = 100;\r
- public static final int CURVED_CONNECTOR_2 = 101;\r
- public static final int CURVED_CONNECTOR_3 = 102;\r
- public static final int CURVED_CONNECTOR_4 = 103;\r
- public static final int CURVED_CONNECTOR_5 = 104;\r
- public static final int CALLOUT_1 = 105;\r
- public static final int CALLOUT_2 = 106;\r
- public static final int CALLOUT_3 = 107;\r
- public static final int ACCENT_CALLOUT_1 = 108;\r
- public static final int ACCENT_CALLOUT_2 = 109;\r
- public static final int ACCENT_CALLOUT_3 = 110;\r
- public static final int BORDER_CALLOUT_1 = 111;\r
- public static final int BORDER_CALLOUT_2 = 112;\r
- public static final int BORDER_CALLOUT_3 = 113;\r
- public static final int ACCENT_BORDER_CALLOUT_1 = 114;\r
- public static final int ACCENT_BORDER_CALLOUT_2 = 115;\r
- public static final int ACCENT_BORDER_CALLOUT_3 = 116;\r
- public static final int WEDGE_RECT_CALLOUT = 117;\r
- public static final int WEDGE_ROUND_RECT_CALLOUT = 118;\r
- public static final int WEDGE_ELLIPSE_CALLOUT = 119;\r
- public static final int CLOUD_CALLOUT = 120;\r
- public static final int CLOUD = 121;\r
- public static final int RIBBON = 122;\r
- public static final int RIBBON_2 = 123;\r
- public static final int ELLIPSE_RIBBON = 124;\r
- public static final int ELLIPSE_RIBBON_2 = 125;\r
- public static final int LEFT_RIGHT_RIBBON = 126;\r
- public static final int VERTICAL_SCROLL = 127;\r
- public static final int HORIZONTAL_SCROLL = 128;\r
- public static final int WAVE = 129;\r
- public static final int DOUBLE_WAVE = 130;\r
- public static final int PLUS = 131;\r
- public static final int FLOW_CHART_PROCESS = 132;\r
- public static final int FLOW_CHART_DECISION = 133;\r
- public static final int FLOW_CHART_INPUT_OUTPUT = 134;\r
- public static final int FLOW_CHART_PREDEFINED_PROCESS = 135;\r
- public static final int FLOW_CHART_INTERNAL_STORAGE = 136;\r
- public static final int FLOW_CHART_DOCUMENT = 137;\r
- public static final int FLOW_CHART_MULTIDOCUMENT = 138;\r
- public static final int FLOW_CHART_TERMINATOR = 139;\r
- public static final int FLOW_CHART_PREPARATION = 140;\r
- public static final int FLOW_CHART_MANUAL_INPUT = 141;\r
- public static final int FLOW_CHART_MANUAL_OPERATION = 142;\r
- public static final int FLOW_CHART_CONNECTOR = 143;\r
- public static final int FLOW_CHART_PUNCHED_CARD = 144;\r
- public static final int FLOW_CHART_PUNCHED_TAPE = 145;\r
- public static final int FLOW_CHART_SUMMING_JUNCTION = 146;\r
- public static final int FLOW_CHART_OR = 147;\r
- public static final int FLOW_CHART_COLLATE = 148;\r
- public static final int FLOW_CHART_SORT = 149;\r
- public static final int FLOW_CHART_EXTRACT = 150;\r
- public static final int FLOW_CHART_MERGE = 151;\r
- public static final int FLOW_CHART_OFFLINE_STORAGE = 152;\r
- public static final int FLOW_CHART_ONLINE_STORAGE = 153;\r
- public static final int FLOW_CHART_MAGNETIC_TAPE = 154;\r
- public static final int FLOW_CHART_MAGNETIC_DISK = 155;\r
- public static final int FLOW_CHART_MAGNETIC_DRUM = 156;\r
- public static final int FLOW_CHART_DISPLAY = 157;\r
- public static final int FLOW_CHART_DELAY = 158;\r
- public static final int FLOW_CHART_ALTERNATE_PROCESS = 159;\r
- public static final int FLOW_CHART_OFFPAGE_CONNECTOR = 160;\r
- public static final int ACTION_BUTTON_BLANK = 161;\r
- public static final int ACTION_BUTTON_HOME = 162;\r
- public static final int ACTION_BUTTON_HELP = 163;\r
- public static final int ACTION_BUTTON_INFORMATION = 164;\r
- public static final int ACTION_BUTTON_FORWARD_NEXT = 165;\r
- public static final int ACTION_BUTTON_BACK_PREVIOUS = 166;\r
- public static final int ACTION_BUTTON_END = 167;\r
- public static final int ACTION_BUTTON_BEGINNING = 168;\r
- public static final int ACTION_BUTTON_RETURN = 169;\r
- public static final int ACTION_BUTTON_DOCUMENT = 170;\r
- public static final int ACTION_BUTTON_SOUND = 171;\r
- public static final int ACTION_BUTTON_MOVIE = 172;\r
- public static final int GEAR_6 = 173;\r
- public static final int GEAR_9 = 174;\r
- public static final int FUNNEL = 175;\r
- public static final int MATH_PLUS = 176;\r
- public static final int MATH_MINUS = 177;\r
- public static final int MATH_MULTIPLY = 178;\r
- public static final int MATH_DIVIDE = 179;\r
- public static final int MATH_EQUAL = 180;\r
- public static final int MATH_NOT_EQUAL = 181;\r
- public static final int CORNER_TABS = 182;\r
- public static final int SQUARE_TABS = 183;\r
- public static final int PLAQUE_TABS = 184;\r
- public static final int CHART_X = 185;\r
- public static final int CHART_STAR = 186;\r
- public static final int CHART_PLUS = 187;\r
-}\r
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-
-package org.apache.poi.ss.usermodel;
-
-import java.util.Iterator;
-
-import org.apache.poi.hssf.util.PaneInformation;
-import org.apache.poi.ss.util.CellRangeAddress;
-
-/**
- * High level representation of a Excel worksheet.
- *
- * <p>
- * Sheets are the central structures within a workbook, and are where a user does most of his spreadsheet work.
- * The most common type of sheet is the worksheet, which is represented as a grid of cells. Worksheet cells can
- * contain text, numbers, dates, and formulas. Cells can also be formatted.
- * </p>
- */
-public interface Sheet extends Iterable<Row> {
-
- /* Constants for margins */
- public static final short LeftMargin = 0;
-
- public static final short RightMargin = 1;
-
- public static final short TopMargin = 2;
-
- public static final short BottomMargin = 3;
-
- public static final short HeaderMargin = 4;
-
- public static final short FooterMargin = 5;
-
- public static final byte PANE_LOWER_RIGHT = (byte) 0;
-
- public static final byte PANE_UPPER_RIGHT = (byte) 1;
-
- public static final byte PANE_LOWER_LEFT = (byte) 2;
-
- public static final byte PANE_UPPER_LEFT = (byte) 3;
-
- /**
- * Create a new row within the sheet and return the high level representation
- *
- * @param rownum row number
- * @return high level Row object representing a row in the sheet
- * @see #removeRow(Row)
- */
- Row createRow(int rownum);
-
- /**
- * Remove a row from this sheet. All cells contained in the row are removed as well
- *
- * @param row representing a row to remove.
- */
- void removeRow(Row row);
-
- /**
- * Returns the logical row (not physical) 0-based. If you ask for a row that is not
- * defined you get a null. This is to say row 4 represents the fifth row on a sheet.
- *
- * @param rownum row to get (0-based)
- * @return Row representing the rownumber or null if its not defined on the sheet
- */
- Row getRow(int rownum);
-
- /**
- * Returns the number of physically defined rows (NOT the number of rows in the sheet)
- *
- * @return the number of physically defined rows in this sheet
- */
- int getPhysicalNumberOfRows();
-
- /**
- * Gets the first row on the sheet
- *
- * @return the number of the first logical row on the sheet (0-based)
- */
- int getFirstRowNum();
-
- /**
- * Gets the last row on the sheet
- *
- * @return last row contained n this sheet (0-based)
- */
- int getLastRowNum();
-
- /**
- * Get the visibility state for a given column
- *
- * @param columnIndex - the column to get (0-based)
- * @param hidden - the visiblity state of the column
- */
- void setColumnHidden(int columnIndex, boolean hidden);
-
- /**
- * Get the hidden state for a given column
- *
- * @param columnIndex - the column to set (0-based)
- * @return hidden - <code>false</code> if the column is visible
- */
- boolean isColumnHidden(int columnIndex);
-
- /**
- * Set the width (in units of 1/256th of a character width)
- * <p>
- * The maximum column width for an individual cell is 255 characters.
- * This value represents the number of characters that can be displayed
- * in a cell that is formatted with the standard font.
- * </p>
- *
- * @param columnIndex - the column to set (0-based)
- * @param width - the width in units of 1/256th of a character width
- */
- void setColumnWidth(int columnIndex, int width);
-
- /**
- * get the width (in units of 1/256th of a character width )
- * @param columnIndex - the column to set (0-based)
- * @return width - the width in units of 1/256th of a character width
- */
- int getColumnWidth(int columnIndex);
-
- /**
- * Set the default column width for the sheet (if the columns do not define their own width)
- * in characters
- *
- * @param width default column width measured in characters
- */
- void setDefaultColumnWidth(int width);
-
- /**
- * Get the default column width for the sheet (if the columns do not define their own width)
- * in characters
- *
- * @return default column width measured in characters
- */
- int getDefaultColumnWidth();
-
- /**
- * Get the default row height for the sheet (if the rows do not define their own height) in
- * twips (1/20 of a point)
- *
- * @return default row height measured in twips (1/20 of a point)
- */
- short getDefaultRowHeight();
-
- /**
- * Get the default row height for the sheet (if the rows do not define their own height) in
- * points.
- *
- * @return default row height in points
- */
- float getDefaultRowHeightInPoints();
-
- /**
- * Set the default row height for the sheet (if the rows do not define their own height) in
- * twips (1/20 of a point)
- *
- * @param height default row height measured in twips (1/20 of a point)
- */
- void setDefaultRowHeight(short height);
-
- /**
- * Set the default row height for the sheet (if the rows do not define their own height) in
- * points
- * @param height default row height
- */
- void setDefaultRowHeightInPoints(float height);
-
- /**
- * Returns the CellStyle that applies to the given
- * (0 based) column, or null if no style has been
- * set for that column
- */
- public CellStyle getColumnStyle(int column);
-
- /**
- * Sets the CellStyle that applies to the given
- * (0 based) column.
- */
-// public CellStyle setColumnStyle(int column, CellStyle style);
-
- /**
- * Adds a merged region of cells (hence those cells form one)
- *
- * @param region (rowfrom/colfrom-rowto/colto) to merge
- * @return index of this region
- */
- int addMergedRegion(CellRangeAddress region);
-
- /**
- * Determines whether the output is vertically centered on the page.
- *
- * @param value true to vertically center, false otherwise.
- */
- void setVerticallyCenter(boolean value);
-
- /**
- * Determines whether the output is horizontally centered on the page.
- *
- * @param value true to horizontally center, false otherwise.
- */
- void setHorizontallyCenter(boolean value);
-
- /**
- * Determine whether printed output for this sheet will be horizontally centered.
- */
-
- boolean getHorizontallyCenter();
-
- /**
- * Determine whether printed output for this sheet will be vertically centered.
- */
- boolean getVerticallyCenter();
-
- /**
- * Removes a merged region of cells (hence letting them free)
- *
- * @param index of the region to unmerge
- */
- void removeMergedRegion(int index);
-
- /**
- * Returns the number of merged regions
- *
- * @return number of merged regions
- */
- int getNumMergedRegions();
-
- /**
- * Returns the merged region at the specified index
- *
- * @return the merged region at the specified index
- */
- public CellRangeAddress getMergedRegion(int index);
-
- /**
- * Returns an iterator of the physical rows
- *
- * @return an iterator of the PHYSICAL rows. Meaning the 3rd element may not
- * be the third row if say for instance the second row is undefined.
- */
- Iterator<Row> rowIterator();
-
- /**
- * Flag indicating whether the sheet displays Automatic Page Breaks.
- *
- * @param value <code>true</code> if the sheet displays Automatic Page Breaks.
- */
- void setAutobreaks(boolean value);
-
- /**
- * Set whether to display the guts or not
- *
- * @param value - guts or no guts
- */
- void setDisplayGuts(boolean value);
-
- /**
- * Set whether the window should show 0 (zero) in cells containing zero value.
- * When false, cells with zero value appear blank instead of showing the number zero.
- *
- * @param value whether to display or hide all zero values on the worksheet
- */
- void setDisplayZeros(boolean value);
-
-
- /**
- * Gets the flag indicating whether the window should show 0 (zero) in cells containing zero value.
- * When false, cells with zero value appear blank instead of showing the number zero.
- *
- * @return whether all zero values on the worksheet are displayed
- */
- boolean isDisplayZeros();
-
- /**
- * Flag indicating whether the Fit to Page print option is enabled.
- *
- * @param value <code>true</code> if the Fit to Page print option is enabled.
- */
- void setFitToPage(boolean value);
-
- /**
- * Flag indicating whether summary rows appear below detail in an outline, when applying an outline.
- *
- * <p>
- * When true a summary row is inserted below the detailed data being summarized and a
- * new outline level is established on that row.
- * </p>
- * <p>
- * When false a summary row is inserted above the detailed data being summarized and a new outline level
- * is established on that row.
- * </p>
- * @param value <code>true</code> if row summaries appear below detail in the outline
- */
- void setRowSumsBelow(boolean value);
-
- /**
- * Flag indicating whether summary columns appear to the right of detail in an outline, when applying an outline.
- *
- * <p>
- * When true a summary column is inserted to the right of the detailed data being summarized
- * and a new outline level is established on that column.
- * </p>
- * <p>
- * When false a summary column is inserted to the left of the detailed data being
- * summarized and a new outline level is established on that column.
- * </p>
- * @param value <code>true</code> if col summaries appear right of the detail in the outline
- */
- void setRowSumsRight(boolean value);
-
- /**
- * Flag indicating whether the sheet displays Automatic Page Breaks.
- *
- * @return <code>true</code> if the sheet displays Automatic Page Breaks.
- */
- boolean getAutobreaks();
-
- /**
- * Get whether to display the guts or not,
- * default value is true
- *
- * @return boolean - guts or no guts
- */
- boolean getDisplayGuts();
-
- /**
- * Flag indicating whether the Fit to Page print option is enabled.
- *
- * @return <code>true</code> if the Fit to Page print option is enabled.
- */
- boolean getFitToPage();
-
- /**
- * Flag indicating whether summary rows appear below detail in an outline, when applying an outline.
- *
- * <p>
- * When true a summary row is inserted below the detailed data being summarized and a
- * new outline level is established on that row.
- * </p>
- * <p>
- * When false a summary row is inserted above the detailed data being summarized and a new outline level
- * is established on that row.
- * </p>
- * @return <code>true</code> if row summaries appear below detail in the outline
- */
- boolean getRowSumsBelow();
-
- /**
- * Flag indicating whether summary columns appear to the right of detail in an outline, when applying an outline.
- *
- * <p>
- * When true a summary column is inserted to the right of the detailed data being summarized
- * and a new outline level is established on that column.
- * </p>
- * <p>
- * When false a summary column is inserted to the left of the detailed data being
- * summarized and a new outline level is established on that column.
- * </p>
- * @return <code>true</code> if col summaries appear right of the detail in the outline
- */
- boolean getRowSumsRight();
-
- /**
- * Gets the flag indicating whether this sheet displays the lines
- * between rows and columns to make editing and reading easier.
- *
- * @return <code>true</code> if this sheet displays gridlines.
- * @see #isPrintGridlines() to check if printing of gridlines is turned on or off
- */
- boolean isPrintGridlines();
-
- /**
- * Sets the flag indicating whether this sheet should display the lines
- * between rows and columns to make editing and reading easier.
- * To turn printing of gridlines use {@link #setPrintGridlines(boolean)}
- *
- *
- * @param show <code>true</code> if this sheet should display gridlines.
- * @see #setPrintGridlines(boolean)
- */
- void setPrintGridlines(boolean show);
-
- /**
- * Gets the print setup object.
- *
- * @return The user model for the print setup object.
- */
- PrintSetup getPrintSetup();
-
- /**
- * Gets the user model for the default document header.
- * <p>
- * Note that XSSF offers more kinds of document headers than HSSF does
- * </p>
- * @return the document header.
- */
- Header getHeader();
-
- /**
- * Gets the user model for the default document footer.
- * Note that XSSF offers more kinds of document footers than HSSF does.
- *
- * @return the document footer.
- */
- Footer getFooter();
-
- /**
- * Sets a flag indicating whether this sheet is selected.
- *<p>
- * Note: multiple sheets can be selected, but only one sheet can be active at one time.
- *</p>
- * @param value <code>true</code> if this sheet is selected
- * @see Workbook#setActiveSheet(int)
- */
- void setSelected(boolean value);
-
- /**
- * Gets the size of the margin in inches.
- *
- * @param margin which margin to get
- * @return the size of the margin
- */
- double getMargin(short margin);
-
- /**
- * Sets the size of the margin in inches.
- *
- * @param margin which margin to get
- * @param size the size of the margin
- */
- void setMargin(short margin, double size);
-
- /**
- * Answer whether protection is enabled or disabled
- *
- * @return true => protection enabled; false => protection disabled
- */
- boolean getProtect();
-
- /**
- * Answer whether scenario protection is enabled or disabled
- *
- * @return true => protection enabled; false => protection disabled
- */
- boolean getScenarioProtect();
-
- /**
- * Sets the zoom magnication for the sheet. The zoom is expressed as a
- * fraction. For example to express a zoom of 75% use 3 for the numerator
- * and 4 for the denominator.
- *
- * @param numerator The numerator for the zoom magnification.
- * @param denominator The denominator for the zoom magnification.
- */
- void setZoom(int numerator, int denominator);
-
- /**
- * The top row in the visible view when the sheet is
- * first viewed after opening it in a viewer
- *
- * @return short indicating the rownum (0 based) of the top row
- */
- short getTopRow();
-
- /**
- * The left col in the visible view when the sheet is
- * first viewed after opening it in a viewer
- *
- * @return short indicating the rownum (0 based) of the top row
- */
- short getLeftCol();
-
- /**
- * Sets desktop window pane display area, when the
- * file is first opened in a viewer.
- *
- * @param toprow the top row to show in desktop window pane
- * @param leftcol the left column to show in desktop window pane
- */
- void showInPane(short toprow, short leftcol);
-
- /**
- * Shifts rows between startRow and endRow n number of rows.
- * If you use a negative number, it will shift rows up.
- * Code ensures that rows don't wrap around.
- *
- * Calls shiftRows(startRow, endRow, n, false, false);
- *
- * <p>
- * Additionally shifts merged regions that are completely defined in these
- * rows (ie. merged 2 cells on a row to be shifted).
- * @param startRow the row to start shifting
- * @param endRow the row to end shifting
- * @param n the number of rows to shift
- */
- void shiftRows(int startRow, int endRow, int n);
-
- /**
- * Shifts rows between startRow and endRow n number of rows.
- * If you use a negative number, it will shift rows up.
- * Code ensures that rows don't wrap around
- *
- * <p>
- * Additionally shifts merged regions that are completely defined in these
- * rows (ie. merged 2 cells on a row to be shifted).
- * <p>
- * @param startRow the row to start shifting
- * @param endRow the row to end shifting
- * @param n the number of rows to shift
- * @param copyRowHeight whether to copy the row height during the shift
- * @param resetOriginalRowHeight whether to set the original row's height to the default
- */
- void shiftRows(int startRow, int endRow, int n, boolean copyRowHeight, boolean resetOriginalRowHeight);
-
- /**
- * Creates a split (freezepane). Any existing freezepane or split pane is overwritten.
- * @param colSplit Horizonatal position of split.
- * @param rowSplit Vertical position of split.
- * @param topRow Top row visible in bottom pane
- * @param leftmostColumn Left column visible in right pane.
- */
- void createFreezePane(int colSplit, int rowSplit, int leftmostColumn, int topRow);
-
- /**
- * Creates a split (freezepane). Any existing freezepane or split pane is overwritten.
- * @param colSplit Horizonatal position of split.
- * @param rowSplit Vertical position of split.
- */
- void createFreezePane(int colSplit, int rowSplit);
-
- /**
- * Creates a split pane. Any existing freezepane or split pane is overwritten.
- * @param xSplitPos Horizonatal position of split (in 1/20th of a point).
- * @param ySplitPos Vertical position of split (in 1/20th of a point).
- * @param topRow Top row visible in bottom pane
- * @param leftmostColumn Left column visible in right pane.
- * @param activePane Active pane. One of: PANE_LOWER_RIGHT,
- * PANE_UPPER_RIGHT, PANE_LOWER_LEFT, PANE_UPPER_LEFT
- * @see #PANE_LOWER_LEFT
- * @see #PANE_LOWER_RIGHT
- * @see #PANE_UPPER_LEFT
- * @see #PANE_UPPER_RIGHT
- */
- void createSplitPane(int xSplitPos, int ySplitPos, int leftmostColumn, int topRow, int activePane);
-
- /**
- * Returns the information regarding the currently configured pane (split or freeze)
- *
- * @return null if no pane configured, or the pane information.
- */
- PaneInformation getPaneInformation();
-
- /**
- * Sets whether the gridlines are shown in a viewer
- *
- * @param show whether to show gridlines or not
- */
- void setDisplayGridlines(boolean show);
-
- /**
- * Returns if gridlines are displayed
- *
- * @return whether gridlines are displayed
- */
- boolean isDisplayGridlines();
-
- /**
- * Sets whether the formulas are shown in a viewer
- *
- * @param show whether to show formulas or not
- */
- void setDisplayFormulas(boolean show);
-
- /**
- * Returns if formulas are displayed
- *
- * @return whether formulas are displayed
- */
- boolean isDisplayFormulas();
-
- /**
- * Sets whether the RowColHeadings are shown in a viewer
- *
- * @param show whether to show RowColHeadings or not
- */
- void setDisplayRowColHeadings(boolean show);
-
- /**
- * Returns if RowColHeadings are displayed.
- * @return whether RowColHeadings are displayed
- */
- boolean isDisplayRowColHeadings();
-
- /**
- * Sets a page break at the indicated row
- * @param row FIXME: Document this!
- */
- void setRowBreak(int row);
-
- /**
- * Determines if there is a page break at the indicated row
- * @param row FIXME: Document this!
- * @return FIXME: Document this!
- */
- boolean isRowBroken(int row);
-
- /**
- * Removes the page break at the indicated row
- * @param row
- */
- void removeRowBreak(int row);
-
- /**
- * Retrieves all the horizontal page breaks
- * @return all the horizontal page breaks, or null if there are no row page breaks
- */
- int[] getRowBreaks();
-
- /**
- * Retrieves all the vertical page breaks
- * @return all the vertical page breaks, or null if there are no column page breaks
- */
- int[] getColumnBreaks();
-
- /**
- * Sets a page break at the indicated column
- * @param column
- */
- void setColumnBreak(int column);
-
- /**
- * Determines if there is a page break at the indicated column
- * @param column FIXME: Document this!
- * @return FIXME: Document this!
- */
- boolean isColumnBroken(int column);
-
- /**
- * Removes a page break at the indicated column
- * @param column
- */
- void removeColumnBreak(int column);
-
- /**
- * Expands or collapses a column group.
- *
- * @param columnNumber One of the columns in the group.
- * @param collapsed true = collapse group, false = expand group.
- */
- void setColumnGroupCollapsed(int columnNumber, boolean collapsed);
-
- /**
- * Create an outline for the provided column range.
- *
- * @param fromColumn beginning of the column range.
- * @param toColumn end of the column range.
- */
- void groupColumn(int fromColumn, int toColumn);
-
- /**
- * Ungroup a range of columns that were previously groupped
- *
- * @param fromColumn start column (0-based)
- * @param toColumn end column (0-based)
- */
- void ungroupColumn(int fromColumn, int toColumn);
-
- /**
- * Tie a range of rows together so that they can be collapsed or expanded
- *
- * @param fromRow start row (0-based)
- * @param toRow end row (0-based)
- */
- void groupRow(int fromRow, int toRow);
-
- /**
- * Ungroup a range of rows that were previously groupped
- *
- * @param fromRow start row (0-based)
- * @param toRow end row (0-based)
- */
- void ungroupRow(int fromRow, int toRow);
-
- /**
- * Set view state of a groupped range of rows
- *
- * @param row start row of a groupped range of rows (0-based)
- * @param collapse whether to expand/collapse the detail rows
- */
- void setRowGroupCollapsed(int row, boolean collapse);
-
- /**
- * Sets the default column style for a given column. POI will only apply this style to new cells added to the sheet.
- *
- * @param column the column index
- * @param style the style to set
- */
- void setDefaultColumnStyle(int column, CellStyle style);
-
- /**
- * Adjusts the column width to fit the contents.
- *
- * <p>
- * This process can be relatively slow on large sheets, so this should
- * normally only be called once per column, at the end of your
- * processing.
- * </p>
- * You can specify whether the content of merged cells should be considered or ignored.
- * Default is to ignore merged cells.
- *
- * @param column the column index
- */
- void autoSizeColumn(int column);
-
- /**
- * Adjusts the column width to fit the contents.
- * <p>
- * This process can be relatively slow on large sheets, so this should
- * normally only be called once per column, at the end of your
- * processing.
- * </p>
- * You can specify whether the content of merged cells should be considered or ignored.
- * Default is to ignore merged cells.
- *
- * @param column the column index
- * @param useMergedCells whether to use the contents of merged cells when calculating the width of the column
- */
- void autoSizeColumn(int column, boolean useMergedCells);
-
- /**
- * Returns cell comment for the specified row and column
- *
- * @return cell comment or <code>null</code> if not found
- */
- Comment getCellComment(int row, int column);
-
- /**
- * Creates the top-level drawing patriarch.
- *
- * @return The new drawing patriarch.
- */
- Drawing createDrawingPatriarch();
-
-
- /**
- * Return the parent workbook
- *
- * @return the parent workbook
- */
- Workbook getWorkbook();
-
- /**
- * Returns the name of this sheet
- *
- * @return the name of this sheet
- */
- String getSheetName();
-
- /**
- * Note - this is not the same as whether the sheet is focused (isActive)
- * @return <code>true</code> if this sheet is currently selected
- */
- boolean isSelected();
-
-}
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-
-package org.apache.poi.ss.usermodel;
-
-public interface Textbox {
-
- public final static short OBJECT_TYPE_TEXT = 6;
-
- /**
- * @return the rich text string for this textbox.
- */
- RichTextString getString();
-
- /**
- * @param string Sets the rich text string used by this object.
- */
- void setString(RichTextString string);
-
- /**
- * @return Returns the left margin within the textbox.
- */
- int getMarginLeft();
-
- /**
- * Sets the left margin within the textbox.
- */
- void setMarginLeft(int marginLeft);
-
- /**
- * @return returns the right margin within the textbox.
- */
- int getMarginRight();
-
- /**
- * Sets the right margin within the textbox.
- */
- void setMarginRight(int marginRight);
-
- /**
- * @return returns the top margin within the textbox.
- */
- int getMarginTop();
-
- /**
- * Sets the top margin within the textbox.
- */
- void setMarginTop(int marginTop);
-
- /**
- * Gets the bottom margin within the textbox.
- */
- int getMarginBottom();
-
- /**
- * Sets the bottom margin within the textbox.
- */
- void setMarginBottom(int marginBottom);
-
-}
\ No newline at end of file
+++ /dev/null
-/* ====================================================================\r
- Licensed to the Apache Software Foundation (ASF) under one or more\r
- contributor license agreements. See the NOTICE file distributed with\r
- this work for additional information regarding copyright ownership.\r
- The ASF licenses this file to You under the Apache License, Version 2.0\r
- (the "License"); you may not use this file except in compliance with\r
- the License. You may obtain a copy of the License at\r
-\r
- http://www.apache.org/licenses/LICENSE-2.0\r
-\r
- Unless required by applicable law or agreed to in writing, software\r
- distributed under the License is distributed on an "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- See the License for the specific language governing permissions and\r
- limitations under the License.\r
-==================================================================== */\r
-\r
-package org.apache.poi.ss.usermodel;\r
-\r
-/**\r
- * This enumeration value indicates the type of vertical alignment for a cell, i.e.,\r
- * whether it is aligned top, bottom, vertically centered, justified or distributed.\r
- */\r
-public enum VerticalAlignment {\r
- /**\r
- * The vertical alignment is aligned-to-top.\r
- */\r
- TOP,\r
-\r
- /**\r
- * The vertical alignment is centered across the height of the cell.\r
- */\r
- CENTER,\r
-\r
- /**\r
- * The vertical alignment is aligned-to-bottom.\r
- */\r
- BOTTOM,\r
-\r
- /**\r
- * <p>\r
- * When text direction is horizontal: the vertical alignment of lines of text is distributed vertically,\r
- * where each line of text inside the cell is evenly distributed across the height of the cell,\r
- * with flush top and bottom margins.\r
- * </p>\r
- * <p>\r
- * When text direction is vertical: similar behavior as horizontal justification.\r
- * The alignment is justified (flush top and bottom in this case). For each line of text, each\r
- * line of the wrapped text in a cell is aligned to the top and bottom (except the last line).\r
- * If no single line of text wraps in the cell, then the text is not justified.\r
- * </p>\r
- */\r
- JUSTIFY,\r
-\r
- /**\r
- * <p>\r
- * When text direction is horizontal: the vertical alignment of lines of text is distributed vertically,\r
- * where each line of text inside the cell is evenly distributed across the height of the cell,\r
- * with flush top\r
- * </p>\r
- * <p>\r
- * When text direction is vertical: behaves exactly as distributed horizontal alignment.\r
- * The first words in a line of text (appearing at the top of the cell) are flush\r
- * with the top edge of the cell, and the last words of a line of text are flush with the bottom edge of the cell,\r
- * and the line of text is distributed evenly from top to bottom.\r
- * </p>\r
- */\r
- DISTRIBUTED\r
-}\r
+++ /dev/null
-/* ====================================================================
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-==================================================================== */
-
-package org.apache.poi.ss.usermodel;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.List;
-
-import org.apache.poi.ss.usermodel.Row.MissingCellPolicy;
-
-/**
- * High level representation of a Excel workbook. This is the first object most users
- * will construct whether they are reading or writing a workbook. It is also the
- * top level object for creating new sheets/etc.
- */
-public interface Workbook {
-
- /** Extended windows meta file */
- public static final int PICTURE_TYPE_EMF = 2;
-
- /** Windows Meta File */
- public static final int PICTURE_TYPE_WMF = 3;
-
- /** Mac PICT format */
- public static final int PICTURE_TYPE_PICT = 4;
-
- /** JPEG format */
- public static final int PICTURE_TYPE_JPEG = 5;
-
- /** PNG format */
- public static final int PICTURE_TYPE_PNG = 6;
-
- /** Device independent bitmap */
- public static final int PICTURE_TYPE_DIB = 7;
-
- /**
- * Convenience method to get the active sheet. The active sheet is is the sheet
- * which is currently displayed when the workbook is viewed in Excel.
- * 'Selected' sheet(s) is a distinct concept.
- *
- * @return the index of the active sheet (0-based)
- */
- int getActiveSheetIndex();
-
- /**
- * Convenience method to set the active sheet. The active sheet is is the sheet
- * which is currently displayed when the workbook is viewed in Excel.
- * 'Selected' sheet(s) is a distinct concept.
- *
- * @param sheetIndex index of the active sheet (0-based)
- */
- void setActiveSheet(int sheetIndex);
-
- /**
- * Gets the first tab that is displayed in the list of tabs in excel.
- *
- * @return the first tab that to display in the list of tabs (0-based).
- */
- int getFirstVisibleTab();
-
- /**
- * Sets the first tab that is displayed in the list of tabs in excel.
- *
- * @param sheetIndex the first tab that to display in the list of tabs (0-based)
- */
- void setFirstVisibleTab(int sheetIndex);
-
- /**
- * Sets the order of appearance for a given sheet.
- *
- * @param sheetname the name of the sheet to reorder
- * @param pos the position that we want to insert the sheet into (0 based)
- */
- void setSheetOrder(String sheetname, int pos);
-
- /**
- * Sets the tab whose data is actually seen when the sheet is opened.
- * This may be different from the "selected sheet" since excel seems to
- * allow you to show the data of one sheet when another is seen "selected"
- * in the tabs (at the bottom).
- *
- * @see Sheet#setSelected(boolean)
- * @param index the index of the sheet to select (0 based)
- */
- void setSelectedTab(int index);
-
- /**
- * Set the sheet name.
- *
- * @param sheet number (0 based)
- * @throws IllegalArgumentException if the name is greater than 31 chars or contains <code>/\?*[]</code>
- */
- void setSheetName(int sheet, String name);
-
- /**
- * Set the sheet name
- *
- * @param sheet sheet number (0 based)
- * @return Sheet name
- */
- String getSheetName(int sheet);
-
- /**
- * Returns the index of the sheet by his name
- *
- * @param name the sheet name
- * @return index of the sheet (0 based)
- */
- int getSheetIndex(String name);
-
- /**
- * Returns the index of the given sheet
- *
- * @param sheet the sheet to look up
- * @return index of the sheet (0 based)
- */
- int getSheetIndex(Sheet sheet);
-
- /**
- * Sreate an Sheet for this Workbook, adds it to the sheets and returns
- * the high level representation. Use this to create new sheets.
- *
- * @return Sheet representing the new sheet.
- */
- Sheet createSheet();
-
- /**
- * Create an Sheet for this Workbook, adds it to the sheets and returns
- * the high level representation. Use this to create new sheets.
- *
- * @param sheetname sheetname to set for the sheet.
- * @return Sheet representing the new sheet.
- * @throws IllegalArgumentException if the name is greater than 31 chars or contains <code>/\?*[]</code>
- */
- Sheet createSheet(String sheetname);
-
- /**
- * Create an Sheet from an existing sheet in the Workbook.
- *
- * @return Sheet representing the cloned sheet.
- */
- Sheet cloneSheet(int sheetNum);
-
-
- /**
- * Get the number of spreadsheets in the workbook
- *
- * @return the number of sheets
- */
- int getNumberOfSheets();
-
- /**
- * Get the Sheet object at the given index.
- *
- * @param index of the sheet number (0-based physical & logical)
- * @return Sheet at the provided index
- */
- Sheet getSheetAt(int index);
-
- /**
- * Get sheet with the given name
- *
- * @param name of the sheet
- * @return Sheet with the name provided or <code>null</code> if it does not exist
- */
- Sheet getSheet(String name);
-
- /**
- * Removes sheet at the given index
- *
- * @param index of the sheet to remove (0-based)
- */
- void removeSheetAt(int index);
-
- /**
- * Sets the repeating rows and columns for a sheet (as found in
- * File->PageSetup->Sheet). This is function is included in the workbook
- * because it creates/modifies name records which are stored at the
- * workbook level.
- * <p>
- * To set just repeating columns:
- * <pre>
- * workbook.setRepeatingRowsAndColumns(0,0,1,-1-1);
- * </pre>
- * To set just repeating rows:
- * <pre>
- * workbook.setRepeatingRowsAndColumns(0,-1,-1,0,4);
- * </pre>
- * To remove all repeating rows and columns for a sheet.
- * <pre>
- * workbook.setRepeatingRowsAndColumns(0,-1,-1,-1,-1);
- * </pre>
- *
- * @param sheetIndex 0 based index to sheet.
- * @param startColumn 0 based start of repeating columns.
- * @param endColumn 0 based end of repeating columns.
- * @param startRow 0 based start of repeating rows.
- * @param endRow 0 based end of repeating rows.
- */
- void setRepeatingRowsAndColumns(int sheetIndex, int startColumn, int endColumn, int startRow, int endRow);
-
- /**
- * Create a new Font and add it to the workbook's font table
- *
- * @return new font object
- */
- Font createFont();
-
- /**
- * Finds a font that matches the one with the supplied attributes
- *
- * @return the font with the matched attributes or <code>null</code>
- */
- Font findFont(short boldWeight, short color, short fontHeight, String name, boolean italic, boolean strikeout, short typeOffset, byte underline);
-
- /**
- * Get the number of fonts in the font table
- *
- * @return number of fonts
- */
- short getNumberOfFonts();
-
- /**
- * Get the font at the given index number
- *
- * @param idx index number (0-based)
- * @return font at the index
- */
- Font getFontAt(short idx);
-
- /**
- * Create a new Cell style and add it to the workbook's style table
- *
- * @return the new Cell Style object
- */
- CellStyle createCellStyle();
-
- /**
- * Get the number of styles the workbook contains
- *
- * @return count of cell styles
- */
- short getNumCellStyles();
-
- /**
- * Get the cell style object at the given index
- *
- * @param idx index within the set of styles (0-based)
- * @return CellStyle object at the index
- */
- CellStyle getCellStyleAt(short idx);
-
- /**
- * Write out this workbook to an Outputstream.
- *
- * @param stream - the java OutputStream you wish to write to
- * @exception IOException if anything can't be written.
- */
- void write(OutputStream stream) throws IOException;
-
- /**
- * Gets the total number of named ranges in the workbook
- *
- * @return number of named ranges
- */
- int getNumberOfNames();
-
- /**
- * Gets the Named range
- *
- * @param index position of the named range (0-based)
- * @return named range high level
- */
- Name getNameAt(int index);
-
- /**
- * Creates a new named range in this workbook
- *
- * @return new named range object
- */
- Name createName();
-
- /**
- * Gets the named range index by his name
- * <i>Note:</i>Excel named ranges are case-insensitive and
- * this method performs a case-insensitive search.
- *
- * @param name named range name
- * @return named range index
- */
- int getNameIndex(String name);
-
- /**
- * Remove the named range by his index
- *
- * @param index named range index (0 based)
- */
- void removeName(int index);
-
- /**
- * Remove the named range by his name
- *
- * @param name named range name
- */
- void removeName(String name);
-
- /**
- * Sets the printarea for the sheet provided
- * <p>
- * i.e. Reference = $A$1:$B$2
- * @param sheetIndex Zero-based sheet index (0 Represents the first sheet to keep consistent with java)
- * @param reference Valid name Reference for the Print Area
- */
- void setPrintArea(int sheetIndex, String reference);
-
- /**
- * For the Convenience of Java Programmers maintaining pointers.
- * @see #setPrintArea(int, String)
- * @param sheetIndex Zero-based sheet index (0 = First Sheet)
- * @param startColumn Column to begin printarea
- * @param endColumn Column to end the printarea
- * @param startRow Row to begin the printarea
- * @param endRow Row to end the printarea
- */
- void setPrintArea(int sheetIndex, int startColumn, int endColumn, int startRow, int endRow);
-
- /**
- * Retrieves the reference for the printarea of the specified sheet,
- * the sheet name is appended to the reference even if it was not specified.
- *
- * @param sheetIndex Zero-based sheet index (0 Represents the first sheet to keep consistent with java)
- * @return String Null if no print area has been defined
- */
- String getPrintArea(int sheetIndex);
-
- /**
- * Delete the printarea for the sheet specified
- *
- * @param sheetIndex Zero-based sheet index (0 = First Sheet)
- */
- void removePrintArea(int sheetIndex);
-
- /**
- * Retrieves the current policy on what to do when
- * getting missing or blank cells from a row.
- * <p>
- * The default is to return blank and null cells.
- * {@link MissingCellPolicy}
- * </p>
- */
- MissingCellPolicy getMissingCellPolicy();
-
- /**
- * Sets the policy on what to do when
- * getting missing or blank cells from a row.
- *
- * This will then apply to all calls to
- * {@link Row#getCell(int)} }. See
- * {@link MissingCellPolicy}
- */
- void setMissingCellPolicy(MissingCellPolicy missingCellPolicy);
-
- /**
- * Returns the instance of DataFormat for this workbook.
- *
- * @return the DataFormat object
- */
- DataFormat createDataFormat();
-
- /**
- * Adds a picture to the workbook.
- *
- * @param pictureData The bytes of the picture
- * @param format The format of the picture.
- *
- * @return the index to this picture (1 based).
- * @see #PICTURE_TYPE_EMF
- * @see #PICTURE_TYPE_WMF
- * @see #PICTURE_TYPE_PICT
- * @see #PICTURE_TYPE_JPEG
- * @see #PICTURE_TYPE_PNG
- * @see #PICTURE_TYPE_DIB
- */
- int addPicture(byte[] pictureData, int format);
-
- /**
- * Gets all pictures from the Workbook.
- *
- * @return the list of pictures (a list of {@link PictureData} objects.)
- */
- List getAllPictures();
-
- /**
- * Returns an object that handles instantiating concrete
- * classes of the various instances one needs for HSSF and XSSF.
- */
- CreationHelper getCreationHelper();
-
- /**
- * @return <code>false</code> if this workbook is not visible in the GUI
- */
- boolean isHidden();
-
- /**
- * @param hiddenFlag pass <code>false</code> to make the workbook visible in the GUI
- */
- void setHidden(boolean hiddenFlag);
-
- /**
- * Check whether a sheet is hidden.
- * <p>
- * Note that a sheet could instead be set to be very hidden, which is different
- * ({@link #isSheetVeryHidden(int)})
- * </p>
- * @param sheetIx Number
- * @return <code>true</code> if sheet is hidden
- */
- boolean isSheetHidden(int sheetIx);
-
- /**
- * Check whether a sheet is very hidden.
- * <p>
- * This is different from the normal hidden status
- * ({@link #isSheetHidden(int)})
- * </p>
- * @param sheetIx sheet index to check
- * @return <code>true</code> if sheet is very hidden
- */
- boolean isSheetVeryHidden(int sheetIx);
-
- /**
- * Hide or unhide a sheet
- *
- * @param sheetIx the sheet index (0-based)
- * @param hidden True to mark the sheet as hidden, false otherwise
- */
- void setSheetHidden(int sheetIx, boolean hidden);
-
- /**
- * Hide or unhide a sheet.
- * <pre>
- * 0 = not hidden
- * 1 = hidden
- * 2 = very hidden.
- * </pre>
- * @param sheetIx The sheet number
- * @param hidden 0 for not hidden, 1 for hidden, 2 for very hidden
- */
- void setSheetHidden(int sheetIx, int hidden);
-}
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+package org.apache.poi.sl.usermodel;
+
+public interface AutoShape extends SimpleShape {
+ public TextRun getTextRun();
+}
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+package org.apache.poi.sl.usermodel;
+
+public interface Background extends Shape {
+
+}
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+package org.apache.poi.sl.usermodel;
+
+public interface Fill extends org.apache.poi.common.usermodel.Fill {
+}
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+package org.apache.poi.sl.usermodel;
+
+public interface FontCollection {
+
+}
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+package org.apache.poi.sl.usermodel;
+
+/**
+ * A PowerPoint hyperlink
+ */
+public interface Hyperlink extends org.apache.poi.common.usermodel.Hyperlink {
+}
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+package org.apache.poi.sl.usermodel;
+
+public interface Line extends AutoShape {
+
+}
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+package org.apache.poi.sl.usermodel;
+
+public interface LineStyle extends org.apache.poi.common.usermodel.LineStyle {
+}
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+package org.apache.poi.sl.usermodel;
+
+public interface MasterSheet extends Sheet {
+
+}
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+package org.apache.poi.sl.usermodel;
+
+public interface Notes extends Sheet {
+ public TextRun getTextRun();
+}
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+package org.apache.poi.sl.usermodel;
+
+public interface Picture extends SimpleShape {
+ public PictureData getPictureData();
+}
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+package org.apache.poi.sl.usermodel;
+
+public interface PictureData {
+ public int getType();
+ public byte[] getUID();
+
+ public byte[] getData();
+ public void setData(byte[] data);
+}
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+package org.apache.poi.sl.usermodel;
+
+/**
+ * Common SlideShow resources, such as fonts, pictures
+ * and multimedia data
+ */
+public interface Resources {
+ public FontCollection getFontCollection();
+
+ public PictureData[] getPictureData();
+ public int addPictureData(PictureData pict);
+}
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+package org.apache.poi.sl.usermodel;
+
+import java.awt.geom.Rectangle2D;
+
+public interface Shape {
+ public int getShapeType();
+
+ public Rectangle2D getAnchor();
+ public void setAnchor(Rectangle2D anchor);
+
+ public void moveTo(float x, float y);
+
+ public Shape getParent();
+}
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+package org.apache.poi.sl.usermodel;
+
+public interface ShapeContainer {
+ public Shape[] getShapes();
+ public void addShape(Shape shape);
+ public boolean removeShape(Shape shape);
+}
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+package org.apache.poi.sl.usermodel;
+
+public interface ShapeGroup extends ShapeContainer {
+
+}
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+package org.apache.poi.sl.usermodel;
+
+public interface ShapeTypes {
+ public static final int NotPrimitive = 0;
+ public static final int Rectangle = 1;
+ public static final int RoundRectangle = 2;
+ public static final int Ellipse = 3;
+ public static final int Diamond = 4;
+ public static final int IsocelesTriangle = 5;
+ public static final int RightTriangle = 6;
+ public static final int Parallelogram = 7;
+ public static final int Trapezoid = 8;
+ public static final int Hexagon = 9;
+ public static final int Octagon = 10;
+ public static final int Plus = 11;
+ public static final int Star = 12;
+ public static final int Arrow = 13;
+ public static final int ThickArrow = 14;
+ public static final int HomePlate = 15;
+ public static final int Cube = 16;
+ public static final int Balloon = 17;
+ public static final int Seal = 18;
+ public static final int Arc = 19;
+ public static final int Line = 20;
+ public static final int Plaque = 21;
+ public static final int Can = 22;
+ public static final int Donut = 23;
+ public static final int TextSimple = 24;
+ public static final int TextOctagon = 25;
+ public static final int TextHexagon = 26;
+ public static final int TextCurve = 27;
+ public static final int TextWave = 28;
+ public static final int TextRing = 29;
+ public static final int TextOnCurve = 30;
+ public static final int TextOnRing = 31;
+ public static final int StraightConnector1 = 32;
+ public static final int BentConnector2 = 33;
+ public static final int BentConnector3 = 34;
+ public static final int BentConnector4 = 35;
+ public static final int BentConnector5 = 36;
+ public static final int CurvedConnector2 = 37;
+ public static final int CurvedConnector3 = 38;
+ public static final int CurvedConnector4 = 39;
+ public static final int CurvedConnector5 = 40;
+ public static final int Callout1 = 41;
+ public static final int Callout2 = 42;
+ public static final int Callout3 = 43;
+ public static final int AccentCallout1 = 44;
+ public static final int AccentCallout2 = 45;
+ public static final int AccentCallout3 = 46;
+ public static final int BorderCallout1 = 47;
+ public static final int BorderCallout2 = 48;
+ public static final int BorderCallout3 = 49;
+ public static final int AccentBorderCallout1 = 50;
+ public static final int AccentBorderCallout2 = 51;
+ public static final int AccentBorderCallout3 = 52;
+ public static final int Ribbon = 53;
+ public static final int Ribbon2 = 54;
+ public static final int Chevron = 55;
+ public static final int Pentagon = 56;
+ public static final int NoSmoking = 57;
+ public static final int Star8 = 58;
+ public static final int Star16 = 59;
+ public static final int Star32 = 60;
+ public static final int WedgeRectCallout = 61;
+ public static final int WedgeRRectCallout = 62;
+ public static final int WedgeEllipseCallout = 63;
+ public static final int Wave = 64;
+ public static final int FoldedCorner = 65;
+ public static final int LeftArrow = 66;
+ public static final int DownArrow = 67;
+ public static final int UpArrow = 68;
+ public static final int LeftRightArrow = 69;
+ public static final int UpDownArrow = 70;
+ public static final int IrregularSeal1 = 71;
+ public static final int IrregularSeal2 = 72;
+ public static final int LightningBolt = 73;
+ public static final int Heart = 74;
+ public static final int PictureFrame = 75;
+ public static final int QuadArrow = 76;
+ public static final int LeftArrowCallout = 77;
+ public static final int RightArrowCallout = 78;
+ public static final int UpArrowCallout = 79;
+ public static final int DownArrowCallout = 80;
+ public static final int LeftRightArrowCallout = 81;
+ public static final int UpDownArrowCallout = 82;
+ public static final int QuadArrowCallout = 83;
+ public static final int Bevel = 84;
+ public static final int LeftBracket = 85;
+ public static final int RightBracket = 86;
+ public static final int LeftBrace = 87;
+ public static final int RightBrace = 88;
+ public static final int LeftUpArrow = 89;
+ public static final int BentUpArrow = 90;
+ public static final int BentArrow = 91;
+ public static final int Star24 = 92;
+ public static final int StripedRightArrow = 93;
+ public static final int NotchedRightArrow = 94;
+ public static final int BlockArc = 95;
+ public static final int SmileyFace = 96;
+ public static final int VerticalScroll = 97;
+ public static final int HorizontalScroll = 98;
+ public static final int CircularArrow = 99;
+ public static final int NotchedCircularArrow = 100;
+ public static final int UturnArrow = 101;
+ public static final int CurvedRightArrow = 102;
+ public static final int CurvedLeftArrow = 103;
+ public static final int CurvedUpArrow = 104;
+ public static final int CurvedDownArrow = 105;
+ public static final int CloudCallout = 106;
+ public static final int EllipseRibbon = 107;
+ public static final int EllipseRibbon2 = 108;
+ public static final int FlowChartProcess = 109;
+ public static final int FlowChartDecision = 110;
+ public static final int FlowChartInputOutput = 111;
+ public static final int FlowChartPredefinedProcess = 112;
+ public static final int FlowChartInternalStorage = 113;
+ public static final int FlowChartDocument = 114;
+ public static final int FlowChartMultidocument = 115;
+ public static final int FlowChartTerminator = 116;
+ public static final int FlowChartPreparation = 117;
+ public static final int FlowChartManualInput = 118;
+ public static final int FlowChartManualOperation = 119;
+ public static final int FlowChartConnector = 120;
+ public static final int FlowChartPunchedCard = 121;
+ public static final int FlowChartPunchedTape = 122;
+ public static final int FlowChartSummingJunction = 123;
+ public static final int FlowChartOr = 124;
+ public static final int FlowChartCollate = 125;
+ public static final int FlowChartSort = 126;
+ public static final int FlowChartExtract = 127;
+ public static final int FlowChartMerge = 128;
+ public static final int FlowChartOfflineStorage = 129;
+ public static final int FlowChartOnlineStorage = 130;
+ public static final int FlowChartMagneticTape = 131;
+ public static final int FlowChartMagneticDisk = 132;
+ public static final int FlowChartMagneticDrum = 133;
+ public static final int FlowChartDisplay = 134;
+ public static final int FlowChartDelay = 135;
+ public static final int TextPlainText = 136;
+ public static final int TextStop = 137;
+ public static final int TextTriangle = 138;
+ public static final int TextTriangleInverted = 139;
+ public static final int TextChevron = 140;
+ public static final int TextChevronInverted = 141;
+ public static final int TextRingInside = 142;
+ public static final int TextRingOutside = 143;
+ public static final int TextArchUpCurve = 144;
+ public static final int TextArchDownCurve = 145;
+ public static final int TextCircleCurve = 146;
+ public static final int TextButtonCurve = 147;
+ public static final int TextArchUpPour = 148;
+ public static final int TextArchDownPour = 149;
+ public static final int TextCirclePour = 150;
+ public static final int TextButtonPour = 151;
+ public static final int TextCurveUp = 152;
+ public static final int TextCurveDown = 153;
+ public static final int TextCascadeUp = 154;
+ public static final int TextCascadeDown = 155;
+ public static final int TextWave1 = 156;
+ public static final int TextWave2 = 157;
+ public static final int TextWave3 = 158;
+ public static final int TextWave4 = 159;
+ public static final int TextInflate = 160;
+ public static final int TextDeflate = 161;
+ public static final int TextInflateBottom = 162;
+ public static final int TextDeflateBottom = 163;
+ public static final int TextInflateTop = 164;
+ public static final int TextDeflateTop = 165;
+ public static final int TextDeflateInflate = 166;
+ public static final int TextDeflateInflateDeflate = 167;
+ public static final int TextFadeRight = 168;
+ public static final int TextFadeLeft = 169;
+ public static final int TextFadeUp = 170;
+ public static final int TextFadeDown = 171;
+ public static final int TextSlantUp = 172;
+ public static final int TextSlantDown = 173;
+ public static final int TextCanUp = 174;
+ public static final int TextCanDown = 175;
+ public static final int FlowChartAlternateProcess = 176;
+ public static final int FlowChartOffpageConnector = 177;
+ public static final int Callout90 = 178;
+ public static final int AccentCallout90 = 179;
+ public static final int BorderCallout90 = 180;
+ public static final int AccentBorderCallout90 = 181;
+ public static final int LeftRightUpArrow = 182;
+ public static final int Sun = 183;
+ public static final int Moon = 184;
+ public static final int BracketPair = 185;
+ public static final int BracePair = 186;
+ public static final int Star4 = 187;
+ public static final int DoubleWave = 188;
+ public static final int ActionButtonBlank = 189;
+ public static final int ActionButtonHome = 190;
+ public static final int ActionButtonHelp = 191;
+ public static final int ActionButtonInformation = 192;
+ public static final int ActionButtonForwardNext = 193;
+ public static final int ActionButtonBackPrevious = 194;
+ public static final int ActionButtonEnd = 195;
+ public static final int ActionButtonBeginning = 196;
+ public static final int ActionButtonReturn = 197;
+ public static final int ActionButtonDocument = 198;
+ public static final int ActionButtonSound = 199;
+ public static final int ActionButtonMovie = 200;
+ public static final int HostControl = 201;
+ public static final int TextBox = 202;
+}
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+package org.apache.poi.sl.usermodel;
+
+/**
+ * Common parent of Slides, Notes and Masters
+ */
+public interface Sheet extends ShapeContainer {
+ public SlideShow getSlideShow();
+
+ public MasterSheet getMasterSheet();
+
+ public Background getBackground();
+}
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+package org.apache.poi.sl.usermodel;
+
+public interface SimpleShape extends Shape {
+ public Fill getFill();
+ public LineStyle getLineStyle();
+
+ public Hyperlink getHyperlink();
+ public void setHyperlink(Hyperlink hyperlink);
+}
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+package org.apache.poi.sl.usermodel;
+
+public interface Slide extends Sheet {
+ public Notes getNotes();
+ public void setNotes(Notes notes);
+
+ public boolean getFollowMasterBackground();
+ public void setFollowMasterBackground(boolean follow);
+
+ public boolean getFollowMasterColourScheme();
+ public void setFollowMasterColourScheme(boolean follow);
+
+ public boolean getFollowMasterObjects();
+ public void setFollowMasterObjects(boolean follow);
+}
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+package org.apache.poi.sl.usermodel;
+
+import java.io.IOException;
+
+public interface SlideShow {
+ public Slide createSlide() throws IOException;
+ public MasterSheet createMasterSheet() throws IOException;
+
+ public Slide[] getSlides();
+ public MasterSheet[] getMasterSheet();
+
+ public Resources getResources();
+}
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+package org.apache.poi.sl.usermodel;
+
+public interface TextBox extends AutoShape {
+}
--- /dev/null
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+package org.apache.poi.sl.usermodel;
+
+/**
+ * Some text.
+ *
+ * TODO - decide on how we do rich text stuff
+ */
+public interface TextRun {
+ public String getText();
+ public void setText(String text);
+
+ // TODO - rich text formatting stuff
+}