diff options
author | Yegor Kozlov <yegor@apache.org> | 2008-10-28 10:03:51 +0000 |
---|---|---|
committer | Yegor Kozlov <yegor@apache.org> | 2008-10-28 10:03:51 +0000 |
commit | 958a47a45384bd7a43239e5ebe5343599498c82f (patch) | |
tree | 702348dee58ecb6be218606d3dda191af129b016 /src/ooxml/interfaces-jdk15 | |
parent | 8697fdb6d9a42d09034b9006105847e8f478c012 (diff) | |
download | poi-958a47a45384bd7a43239e5ebe5343599498c82f.tar.gz poi-958a47a45384bd7a43239e5ebe5343599498c82f.zip |
1. moved ooxml enums into interfaces-jdk15, they are common and should be in the place as the interfaces 2. removed obsolete and deprecated classes 3. Fixed XSSFWorkbook.cloneSheet. Now it makes a 'true' deep copy of a sheet 4. ooxml has a compile-time dependency on scratchpad, fixed build.xml to reflect that
git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@708497 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/ooxml/interfaces-jdk15')
20 files changed, 1194 insertions, 323 deletions
diff --git a/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/BorderStyle.java b/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/BorderStyle.java new file mode 100755 index 0000000000..7342c52261 --- /dev/null +++ b/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/BorderStyle.java @@ -0,0 +1,111 @@ +/* ==================================================================== + 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; + +} diff --git a/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/CellStyle.java b/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/CellStyle.java index a87ba53338..49e67fcb64 100644 --- a/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/CellStyle.java +++ b/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/CellStyle.java @@ -227,7 +227,7 @@ public interface CellStyle { public final static short LEAST_DOTS = 18; /** - * get the index within the HSSFWorkbook (sequence within the collection of ExtnededFormat objects) + * 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) */ @@ -236,14 +236,14 @@ public interface CellStyle { /** * set the data format (must be a valid format) - * @see org.apache.poi.hssf.usermodel.HSSFDataFormat + * @see DataFormat */ void setDataFormat(short fmt); /** * get the index of the format - * @see org.apache.poi.hssf.usermodel.HSSFDataFormat + * @see DataFormat */ short getDataFormat(); @@ -253,26 +253,17 @@ public interface CellStyle { public String getDataFormatString(); /** - * Get the contents of the format string, by looking up - * the DataFormat against the supplied workbook - * @see org.apache.poi.hssf.usermodel.HSSFDataFormat - * XXX Commented out because it uses internal implementation Workbook class. - * - String getDataFormatString(Workbook workbook); - */ - - /** * set the font for this style - * @param font a font object created or retreived from the HSSFWorkbook object - * @see org.apache.poi.hssf.usermodel.HSSFWorkbook#createFont() - * @see org.apache.poi.hssf.usermodel.HSSFWorkbook#getFontAt(short) + * @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 org.apache.poi.hssf.usermodel.HSSFWorkbook#getFontAt(short) + * @see Workbook#getFontAt(short) */ short getFontIndex(); @@ -571,8 +562,6 @@ public interface CellStyle { /** * get the color to use for the left border - * @see org.apache.poi.hssf.usermodel.HSSFPalette#getColor(short) - * @param color The index of the color definition */ short getLeftBorderColor(); @@ -584,8 +573,7 @@ public interface CellStyle { /** * get the color to use for the left border - * @see org.apache.poi.hssf.usermodel.HSSFPalette#getColor(short) - * @param color The index of the color definition + * @return the index of the color definition */ short getRightBorderColor(); @@ -597,8 +585,7 @@ public interface CellStyle { /** * get the color to use for the top border - * @see org.apache.poi.hssf.usermodel.HSSFPalette#getColor(short) - * @param color The index of the color definition + * @return hhe index of the color definition */ short getTopBorderColor(); @@ -610,8 +597,7 @@ public interface CellStyle { /** * get the color to use for the left border - * @see org.apache.poi.hssf.usermodel.HSSFPalette#getColor(short) - * @param color The index of the color definition + * @return the index of the color definition */ short getBottomBorderColor(); @@ -650,26 +636,6 @@ public interface CellStyle { /** * set the background fill color. - * <p> - * For example: - * <pre> - * cs.setFillPattern(HSSFCellStyle.FINE_DOTS ); - * cs.setFillBackgroundColor(new HSSFColor.RED().getIndex()); - * </pre> - * optionally a Foreground and background fill can be applied: - * <i>Note: Ensure Foreground color is set prior to background</i> - * <pre> - * cs.setFillPattern(HSSFCellStyle.FINE_DOTS ); - * cs.setFillForegroundColor(new HSSFColor.BLUE().getIndex()); - * cs.setFillBackgroundColor(new HSSFColor.RED().getIndex()); - * </pre> - * or, for the special case of SOLID_FILL: - * <pre> - * cs.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND ); - * cs.setFillForegroundColor(new HSSFColor.RED().getIndex()); - * </pre> - * It is necessary to set the fill style in order - * for the color to be shown in the cell. * * @param bg color */ @@ -678,7 +644,6 @@ public interface CellStyle { /** * get the background fill color - * @see org.apache.poi.hssf.usermodel.HSSFPalette#getColor(short) * @return fill color */ short getFillBackgroundColor(); @@ -692,7 +657,6 @@ public interface CellStyle { /** * get the foreground fill color - * @see org.apache.poi.hssf.usermodel.HSSFPalette#getColor(short) * @return fill color */ short getFillForegroundColor(); diff --git a/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/FillPatternType.java b/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/FillPatternType.java new file mode 100755 index 0000000000..25c8495b0e --- /dev/null +++ b/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/FillPatternType.java @@ -0,0 +1,83 @@ +/* ==================================================================== + 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; + +} diff --git a/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/FontCharset.java b/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/FontCharset.java new file mode 100755 index 0000000000..ba06d8cc8f --- /dev/null +++ b/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/FontCharset.java @@ -0,0 +1,75 @@ +/* ==================================================================== + 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]; + } +} diff --git a/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/FontFamily.java b/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/FontFamily.java new file mode 100755 index 0000000000..829246678e --- /dev/null +++ b/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/FontFamily.java @@ -0,0 +1,62 @@ +/* ==================================================================== + 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]; + } +} diff --git a/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/FontScheme.java b/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/FontScheme.java new file mode 100755 index 0000000000..e1b7712309 --- /dev/null +++ b/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/FontScheme.java @@ -0,0 +1,57 @@ +/* ==================================================================== + 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]; + } +} diff --git a/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/FontUndeline.java b/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/FontUndeline.java new file mode 100755 index 0000000000..ec77af9009 --- /dev/null +++ b/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/FontUndeline.java @@ -0,0 +1,123 @@ +/* ==================================================================== + 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.xssf.usermodel; + +import org.apache.poi.ss.usermodel.Font; + +/** + * 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; + } + +} diff --git a/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/HorizontalAlignment.java b/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/HorizontalAlignment.java new file mode 100755 index 0000000000..bcc05d8fbf --- /dev/null +++ b/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/HorizontalAlignment.java @@ -0,0 +1,95 @@ +/* ====================================================================
+ 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 horizontal alignment of a cell,
+ * i.e., whether it is aligned general, left, right, horizontally centered, filled (replicated),
+ * justified, centered across multiple cells, or distributed.
+ */
+public enum HorizontalAlignment {
+ /**
+ * The horizontal alignment is general-aligned. Text data is left-aligned.
+ * Numbers, dates, and times are rightaligned. Boolean types are centered.
+ * Changing the alignment does not change the type of data.
+ */
+ GENERAL,
+
+ /**
+ * The horizontal alignment is left-aligned, even in Rightto-Left mode.
+ * Aligns contents at the left edge of the cell. If an indent amount is specified, the contents of
+ * the cell is indented from the left by the specified number of character spaces. The character spaces are
+ * based on the default font and font size for the workbook.
+ */
+ LEFT,
+
+ /**
+ * The horizontal alignment is centered, meaning the text is centered across the cell.
+ */
+ CENTER,
+
+ /**
+ * The horizontal alignment is right-aligned, meaning that cell contents are aligned at the right edge of the cell,
+ * even in Right-to-Left mode.
+ */
+ RIGHT,
+
+ /**
+ * Indicates that the value of the cell should be filled
+ * across the entire width of the cell. If blank cells to the right also have the fill alignment,
+ * they are also filled with the value, using a convention similar to centerContinuous.
+ * <p>
+ * Additional rules:
+ * <ol>
+ * <li>Only whole values can be appended, not partial values.</li>
+ * <li>The column will not be widened to 'best fit' the filled value</li>
+ * <li>If appending an additional occurrence of the value exceeds the boundary of the cell
+ * left/right edge, don't append the additional occurrence of the value.</li>
+ * <li>The display value of the cell is filled, not the underlying raw number.</li>
+ * </ol>
+ * </p>
+ */
+ FILL,
+
+ /**
+ * The horizontal alignment is justified (flush left and right).
+ * For each line of text, aligns each line of the wrapped text in a cell to the right and left
+ * (except the last line). If no single line of text wraps in the cell, then the text is not justified.
+ */
+ JUSTIFY,
+
+ /**
+ * The horizontal alignment is centered across multiple cells.
+ * The information about how many cells to span is expressed in the Sheet Part,
+ * in the row of the cell in question. For each cell that is spanned in the alignment,
+ * a cell element needs to be written out, with the same style Id which references the centerContinuous alignment.
+ */
+ CENTER_SELECTION,
+
+ /**
+ * Indicates that each 'word' in each line of text inside the cell is evenly distributed
+ * across the width of the cell, with flush right and left margins.
+ * <p>
+ * When there is also an indent value to apply, both the left and right side of the cell
+ * are padded by the indent value.
+ * </p>
+ * <p> A 'word' is a set of characters with no space character in them. </p>
+ * <p> Two lines inside a cell are separated by a carriage return. </p>
+ */
+ DISTRIBUTED
+}
diff --git a/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/IndexedColors.java b/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/IndexedColors.java new file mode 100755 index 0000000000..07237471aa --- /dev/null +++ b/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/IndexedColors.java @@ -0,0 +1,97 @@ +/* ==================================================================== + 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; + } +} diff --git a/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/StylesSource.java b/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/PageOrder.java index f5a9d6deb6..341f2bf72a 100644..100755 --- a/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/StylesSource.java +++ b/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/PageOrder.java @@ -14,17 +14,46 @@ 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 interface StylesSource { - public String getNumberFormatAt(long idx); - public long putNumberFormat(String fmt); - - public Font getFontAt(long idx); - public long putFont(Font font); - - public CellStyle getStyleAt(long idx); - public long putStyle(CellStyle style); + public static PageOrder valueOf(int value){ + return _table[value]; + } } diff --git a/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/Palette.java b/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/Palette.java deleted file mode 100644 index 8a4cf8bb7b..0000000000 --- a/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/Palette.java +++ /dev/null @@ -1,75 +0,0 @@ -/* ==================================================================== - 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 Palette { - - /** - * Retrieves the color at a given index - * - * @param index the palette index, between 0x8 to 0x40 inclusive - * @return the color, or null if the index is not populated - */ - Color getColor(short index); - - /** - * Finds the first occurance of a given color - * - * @param red the RGB red component, between 0 and 255 inclusive - * @param green the RGB green component, between 0 and 255 inclusive - * @param blue the RGB blue component, between 0 and 255 inclusive - * @return the color, or null if the color does not exist in this palette - */ - Color findColor(byte red, byte green, byte blue); - - /** - * Finds the closest matching color in the custom palette. The - * method for finding the distance between the colors is fairly - * primative. - * - * @param red The red component of the color to match. - * @param green The green component of the color to match. - * @param blue The blue component of the color to match. - * @return The closest color or null if there are no custom - * colors currently defined. - */ - Color findSimilarColor(byte red, byte green, byte blue); - - /** - * Sets the color at the given offset - * - * @param index the palette index, between 0x8 to 0x40 inclusive - * @param red the RGB red component, between 0 and 255 inclusive - * @param green the RGB green component, between 0 and 255 inclusive - * @param blue the RGB blue component, between 0 and 255 inclusive - */ - void setColorAtIndex(short index, byte red, byte green, byte blue); - - /** - * Adds a new color into an empty color slot. - * @param red The red component - * @param green The green component - * @param blue The blue component - * - * @return The new custom color. - * - * @throws RuntimeException if there are more more free color indexes. - */ - Color addColor(byte red, byte green, byte blue); - -}
\ No newline at end of file diff --git a/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/CommentsSource.java b/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/PaperSize.java index 34cb1bdf96..cebab20381 100644..100755 --- a/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/CommentsSource.java +++ b/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/PaperSize.java @@ -18,19 +18,26 @@ package org.apache.poi.ss.usermodel; /** - * Allows the getting and saving of cell comments, - * associated with a given sheet. + * The enumeration value indicating the possible paper size for a sheet + * + * @author Daniele Montagni */ -public interface CommentsSource { - public String getAuthor(long authorId); - - public int getNumberOfComments(); - - public int findAuthor(String author); - - public Comment findCellComment(int row, int column); - - public Comment findCellComment(String cellRef); - - public Comment addComment(); +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; } diff --git a/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/Patriarch.java b/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/Patriarch.java deleted file mode 100644 index 9026c99bb7..0000000000 --- a/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/Patriarch.java +++ /dev/null @@ -1,124 +0,0 @@ -/* ==================================================================== - 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.List; - -import org.apache.poi.hssf.usermodel.HSSFAnchor; -import org.apache.poi.hssf.usermodel.HSSFClientAnchor; -import org.apache.poi.hssf.usermodel.HSSFComment; -import org.apache.poi.hssf.usermodel.HSSFPicture; -import org.apache.poi.hssf.usermodel.HSSFPolygon; -import org.apache.poi.hssf.usermodel.HSSFShapeGroup; -import org.apache.poi.hssf.usermodel.HSSFSimpleShape; -import org.apache.poi.hssf.usermodel.HSSFTextbox; - -public interface Patriarch { - - /** - * Creates a new group record stored under this patriarch. - * - * @param anchor the client anchor describes how this group is attached - * to the sheet. - * @return the newly created group. - */ - HSSFShapeGroup createGroup(HSSFClientAnchor anchor); - - /** - * Creates a simple shape. This includes such shapes as lines, rectangles, - * and ovals. - * - * @param anchor the client anchor describes how this group is attached - * to the sheet. - * @return the newly created shape. - */ - HSSFSimpleShape createSimpleShape(HSSFClientAnchor anchor); - - /** - * Creates a picture. - * - * @param anchor the client anchor describes how this group is attached - * to the sheet. - * @return the newly created shape. - */ - HSSFPicture createPicture(HSSFClientAnchor anchor, int pictureIndex); - - /** - * Creates a polygon - * - * @param anchor the client anchor describes how this group is attached - * to the sheet. - * @return the newly created shape. - */ - HSSFPolygon createPolygon(HSSFClientAnchor anchor); - - /** - * Constructs a textbox under the patriarch. - * - * @param anchor the client anchor describes how this group is attached - * to the sheet. - * @return the newly created textbox. - */ - HSSFTextbox createTextbox(HSSFClientAnchor anchor); - - /** - * Constructs a cell comment. - * - * @param anchor the client anchor describes how this comment is attached - * to the sheet. - * @return the newly created comment. - */ - HSSFComment createComment(HSSFAnchor anchor); - - /** - * Returns a list of all shapes contained by the patriarch. - */ - List getChildren(); - - /** - * Total count of all children and their children's children. - */ - int countOfAllChildren(); - - /** - * Sets the coordinate space of this group. All children are contrained - * to these coordinates. - */ - void setCoordinates(int x1, int y1, int x2, int y2); - - /** - * The top left x coordinate of this group. - */ - int getX1(); - - /** - * The top left y coordinate of this group. - */ - int getY1(); - - /** - * The bottom right x coordinate of this group. - */ - int getX2(); - - /** - * The bottom right y coordinate of this group. - */ - int getY2(); - -}
\ No newline at end of file diff --git a/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/PrintCellComments.java b/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/PrintCellComments.java new file mode 100755 index 0000000000..ecbea6dafe --- /dev/null +++ b/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/PrintCellComments.java @@ -0,0 +1,61 @@ +/* ==================================================================== + 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]; + } +} diff --git a/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/PrintOrientation.java b/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/PrintOrientation.java new file mode 100755 index 0000000000..8d5716f31e --- /dev/null +++ b/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/PrintOrientation.java @@ -0,0 +1,63 @@ +/* ==================================================================== + 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]; + } +} diff --git a/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/Row.java b/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/Row.java index 1c2efd0c35..f63ee010b2 100644 --- a/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/Row.java +++ b/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/Row.java @@ -21,10 +21,6 @@ import java.lang.Iterable; import java.util.Iterator; public interface Row extends Iterable<Cell> { - - // used for collections - public final static int INITIAL_CAPACITY = 5; - /** * Use this to create new cells within the row and return it. * <p> diff --git a/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/ShapeTypes.java b/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/ShapeTypes.java new file mode 100755 index 0000000000..ef8409340c --- /dev/null +++ b/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/ShapeTypes.java @@ -0,0 +1,212 @@ +/* ====================================================================
+ 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;
+
+/**
+ * All known types of automatic shapes in DrawingML
+ *
+ * @author Yegor Kozlov
+ */
+public class ShapeTypes {
+ public static final int LINE = 1;
+ public static final int LINE_INV = 2;
+ public static final int TRIANGLE = 3;
+ public static final int RT_TRIANGLE = 4;
+ public static final int RECT = 5;
+ public static final int DIAMOND = 6;
+ public static final int PARALLELOGRAM = 7;
+ public static final int TRAPEZOID = 8;
+ public static final int NON_ISOSCELES_TRAPEZOID = 9;
+ public static final int PENTAGON = 10;
+ public static final int HEXAGON = 11;
+ public static final int HEPTAGON = 12;
+ public static final int OCTAGON = 13;
+ public static final int DECAGON = 14;
+ public static final int DODECAGON = 15;
+ public static final int STAR_4 = 16;
+ public static final int STAR_5 = 17;
+ public static final int STAR_6 = 18;
+ public static final int STAR_7 = 19;
+ public static final int STAR_8 = 20;
+ public static final int STAR_10 = 21;
+ public static final int STAR_12 = 22;
+ public static final int STAR_16 = 23;
+ public static final int STAR_24 = 24;
+ public static final int STAR_32 = 25;
+ public static final int ROUND_RECT = 26;
+ public static final int ROUND_1_RECT = 27;
+ public static final int ROUND_2_SAME_RECT = 28;
+ public static final int ROUND_2_DIAG_RECT = 29;
+ public static final int SNIP_ROUND_RECT = 30;
+ public static final int SNIP_1_RECT = 31;
+ public static final int SNIP_2_SAME_RECT = 32;
+ public static final int SNIP_2_DIAG_RECT = 33;
+ public static final int PLAQUE = 34;
+ public static final int ELLIPSE = 35;
+ public static final int TEARDROP = 36;
+ public static final int HOME_PLATE = 37;
+ public static final int CHEVRON = 38;
+ public static final int PIE_WEDGE = 39;
+ public static final int PIE = 40;
+ public static final int BLOCK_ARC = 41;
+ public static final int DONUT = 42;
+ public static final int NO_SMOKING = 43;
+ public static final int RIGHT_ARROW = 44;
+ public static final int LEFT_ARROW = 45;
+ public static final int UP_ARROW = 46;
+ public static final int DOWN_ARROW = 47;
+ public static final int STRIPED_RIGHT_ARROW = 48;
+ public static final int NOTCHED_RIGHT_ARROW = 49;
+ public static final int BENT_UP_ARROW = 50;
+ public static final int LEFT_RIGHT_ARROW = 51;
+ public static final int UP_DOWN_ARROW = 52;
+ public static final int LEFT_UP_ARROW = 53;
+ public static final int LEFT_RIGHT_UP_ARROW = 54;
+ public static final int QUAD_ARROW = 55;
+ public static final int LEFT_ARROW_CALLOUT = 56;
+ public static final int RIGHT_ARROW_CALLOUT = 57;
+ public static final int UP_ARROW_CALLOUT = 58;
+ public static final int DOWN_ARROW_CALLOUT = 59;
+ public static final int LEFT_RIGHT_ARROW_CALLOUT = 60;
+ public static final int UP_DOWN_ARROW_CALLOUT = 61;
+ public static final int QUAD_ARROW_CALLOUT = 62;
+ public static final int BENT_ARROW = 63;
+ public static final int UTURN_ARROW = 64;
+ public static final int CIRCULAR_ARROW = 65;
+ public static final int LEFT_CIRCULAR_ARROW = 66;
+ public static final int LEFT_RIGHT_CIRCULAR_ARROW = 67;
+ public static final int CURVED_RIGHT_ARROW = 68;
+ public static final int CURVED_LEFT_ARROW = 69;
+ public static final int CURVED_UP_ARROW = 70;
+ public static final int CURVED_DOWN_ARROW = 71;
+ public static final int SWOOSH_ARROW = 72;
+ public static final int CUBE = 73;
+ public static final int CAN = 74;
+ public static final int LIGHTNING_BOLT = 75;
+ public static final int HEART = 76;
+ public static final int SUN = 77;
+ public static final int MOON = 78;
+ public static final int SMILEY_FACE = 79;
+ public static final int IRREGULAR_SEAL_1 = 80;
+ public static final int IRREGULAR_SEAL_2 = 81;
+ public static final int FOLDED_CORNER = 82;
+ public static final int BEVEL = 83;
+ public static final int FRAME = 84;
+ public static final int HALF_FRAME = 85;
+ public static final int CORNER = 86;
+ public static final int DIAG_STRIPE = 87;
+ public static final int CHORD = 88;
+ public static final int ARC = 89;
+ public static final int LEFT_BRACKET = 90;
+ public static final int RIGHT_BRACKET = 91;
+ public static final int LEFT_BRACE = 92;
+ public static final int RIGHT_BRACE = 93;
+ public static final int BRACKET_PAIR = 94;
+ public static final int BRACE_PAIR = 95;
+ public static final int STRAIGHT_CONNECTOR_1 = 96;
+ public static final int BENT_CONNECTOR_2 = 97;
+ public static final int BENT_CONNECTOR_3 = 98;
+ public static final int BENT_CONNECTOR_4 = 99;
+ public static final int BENT_CONNECTOR_5 = 100;
+ public static final int CURVED_CONNECTOR_2 = 101;
+ public static final int CURVED_CONNECTOR_3 = 102;
+ public static final int CURVED_CONNECTOR_4 = 103;
+ public static final int CURVED_CONNECTOR_5 = 104;
+ public static final int CALLOUT_1 = 105;
+ public static final int CALLOUT_2 = 106;
+ public static final int CALLOUT_3 = 107;
+ public static final int ACCENT_CALLOUT_1 = 108;
+ public static final int ACCENT_CALLOUT_2 = 109;
+ public static final int ACCENT_CALLOUT_3 = 110;
+ public static final int BORDER_CALLOUT_1 = 111;
+ public static final int BORDER_CALLOUT_2 = 112;
+ public static final int BORDER_CALLOUT_3 = 113;
+ public static final int ACCENT_BORDER_CALLOUT_1 = 114;
+ public static final int ACCENT_BORDER_CALLOUT_2 = 115;
+ public static final int ACCENT_BORDER_CALLOUT_3 = 116;
+ public static final int WEDGE_RECT_CALLOUT = 117;
+ public static final int WEDGE_ROUND_RECT_CALLOUT = 118;
+ public static final int WEDGE_ELLIPSE_CALLOUT = 119;
+ public static final int CLOUD_CALLOUT = 120;
+ public static final int CLOUD = 121;
+ public static final int RIBBON = 122;
+ public static final int RIBBON_2 = 123;
+ public static final int ELLIPSE_RIBBON = 124;
+ public static final int ELLIPSE_RIBBON_2 = 125;
+ public static final int LEFT_RIGHT_RIBBON = 126;
+ public static final int VERTICAL_SCROLL = 127;
+ public static final int HORIZONTAL_SCROLL = 128;
+ public static final int WAVE = 129;
+ public static final int DOUBLE_WAVE = 130;
+ public static final int PLUS = 131;
+ public static final int FLOW_CHART_PROCESS = 132;
+ public static final int FLOW_CHART_DECISION = 133;
+ public static final int FLOW_CHART_INPUT_OUTPUT = 134;
+ public static final int FLOW_CHART_PREDEFINED_PROCESS = 135;
+ public static final int FLOW_CHART_INTERNAL_STORAGE = 136;
+ public static final int FLOW_CHART_DOCUMENT = 137;
+ public static final int FLOW_CHART_MULTIDOCUMENT = 138;
+ public static final int FLOW_CHART_TERMINATOR = 139;
+ public static final int FLOW_CHART_PREPARATION = 140;
+ public static final int FLOW_CHART_MANUAL_INPUT = 141;
+ public static final int FLOW_CHART_MANUAL_OPERATION = 142;
+ public static final int FLOW_CHART_CONNECTOR = 143;
+ public static final int FLOW_CHART_PUNCHED_CARD = 144;
+ public static final int FLOW_CHART_PUNCHED_TAPE = 145;
+ public static final int FLOW_CHART_SUMMING_JUNCTION = 146;
+ public static final int FLOW_CHART_OR = 147;
+ public static final int FLOW_CHART_COLLATE = 148;
+ public static final int FLOW_CHART_SORT = 149;
+ public static final int FLOW_CHART_EXTRACT = 150;
+ public static final int FLOW_CHART_MERGE = 151;
+ public static final int FLOW_CHART_OFFLINE_STORAGE = 152;
+ public static final int FLOW_CHART_ONLINE_STORAGE = 153;
+ public static final int FLOW_CHART_MAGNETIC_TAPE = 154;
+ public static final int FLOW_CHART_MAGNETIC_DISK = 155;
+ public static final int FLOW_CHART_MAGNETIC_DRUM = 156;
+ public static final int FLOW_CHART_DISPLAY = 157;
+ public static final int FLOW_CHART_DELAY = 158;
+ public static final int FLOW_CHART_ALTERNATE_PROCESS = 159;
+ public static final int FLOW_CHART_OFFPAGE_CONNECTOR = 160;
+ public static final int ACTION_BUTTON_BLANK = 161;
+ public static final int ACTION_BUTTON_HOME = 162;
+ public static final int ACTION_BUTTON_HELP = 163;
+ public static final int ACTION_BUTTON_INFORMATION = 164;
+ public static final int ACTION_BUTTON_FORWARD_NEXT = 165;
+ public static final int ACTION_BUTTON_BACK_PREVIOUS = 166;
+ public static final int ACTION_BUTTON_END = 167;
+ public static final int ACTION_BUTTON_BEGINNING = 168;
+ public static final int ACTION_BUTTON_RETURN = 169;
+ public static final int ACTION_BUTTON_DOCUMENT = 170;
+ public static final int ACTION_BUTTON_SOUND = 171;
+ public static final int ACTION_BUTTON_MOVIE = 172;
+ public static final int GEAR_6 = 173;
+ public static final int GEAR_9 = 174;
+ public static final int FUNNEL = 175;
+ public static final int MATH_PLUS = 176;
+ public static final int MATH_MINUS = 177;
+ public static final int MATH_MULTIPLY = 178;
+ public static final int MATH_DIVIDE = 179;
+ public static final int MATH_EQUAL = 180;
+ public static final int MATH_NOT_EQUAL = 181;
+ public static final int CORNER_TABS = 182;
+ public static final int SQUARE_TABS = 183;
+ public static final int PLAQUE_TABS = 184;
+ public static final int CHART_X = 185;
+ public static final int CHART_STAR = 186;
+ public static final int CHART_PLUS = 187;
+}
diff --git a/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/Sheet.java b/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/Sheet.java index d4b1c07c68..b29d1d037e 100644 --- a/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/Sheet.java +++ b/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/Sheet.java @@ -46,19 +46,11 @@ public interface Sheet extends Iterable<Row> { public static final byte PANE_UPPER_LEFT = (byte) 3; /** - * Used for compile-time optimization. This is the initial size for the collection of - * rows. It is currently set to 20. If you generate larger sheets you may benefit - * by setting this to a higher number and recompiling a custom edition of HSSFSheet. - */ - - public final static int INITIAL_CAPACITY = 20; - - /** * Create a new row within the sheet and return the high level representation * * @param rownum row number - * @return High level HSSFRow object representing a row in the sheet - * @see org.apache.poi.hssf.usermodel.HSSFRow + * @return High level Row object representing a row in the sheet + * @see Row * @see #removeRow(Row) */ Row createRow(int rownum); @@ -75,7 +67,7 @@ public interface Sheet extends Iterable<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 - * @return HSSFRow representing the rownumber or null if its not defined on the sheet + * @return Row representing the rownumber or null if its not defined on the sheet */ Row getRow(int rownum); diff --git a/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/VerticalAlignment.java b/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/VerticalAlignment.java new file mode 100755 index 0000000000..2f93273287 --- /dev/null +++ b/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/VerticalAlignment.java @@ -0,0 +1,69 @@ +/* ====================================================================
+ 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;
+
+/**
+ * This enumeration value indicates the type of vertical alignment for a cell, i.e.,
+ * whether it is aligned top, bottom, vertically centered, justified or distributed.
+ */
+public enum VerticalAlignment {
+ /**
+ * The vertical alignment is aligned-to-top.
+ */
+ TOP,
+
+ /**
+ * The vertical alignment is centered across the height of the cell.
+ */
+ CENTER,
+
+ /**
+ * The vertical alignment is aligned-to-bottom.
+ */
+ BOTTOM,
+
+ /**
+ * <p>
+ * When text direction is horizontal: the vertical alignment of lines of text is distributed vertically,
+ * where each line of text inside the cell is evenly distributed across the height of the cell,
+ * with flush top and bottom margins.
+ * </p>
+ * <p>
+ * When text direction is vertical: similar behavior as horizontal justification.
+ * The alignment is justified (flush top and bottom in this case). For each line of text, each
+ * line of the wrapped text in a cell is aligned to the top and bottom (except the last line).
+ * If no single line of text wraps in the cell, then the text is not justified.
+ * </p>
+ */
+ JUSTIFY,
+
+ /**
+ * <p>
+ * When text direction is horizontal: the vertical alignment of lines of text is distributed vertically,
+ * where each line of text inside the cell is evenly distributed across the height of the cell,
+ * with flush top
+ * </p>
+ * <p>
+ * When text direction is vertical: behaves exactly as distributed horizontal alignment.
+ * The first words in a line of text (appearing at the top of the cell) are flush
+ * 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,
+ * and the line of text is distributed evenly from top to bottom.
+ * </p>
+ */
+ DISTRIBUTED
+}
diff --git a/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/Workbook.java b/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/Workbook.java index bca3b5e0f2..c7bd0f8ac2 100644 --- a/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/Workbook.java +++ b/src/ooxml/interfaces-jdk15/org/apache/poi/ss/usermodel/Workbook.java @@ -25,15 +25,6 @@ import org.apache.poi.ss.usermodel.Row.MissingCellPolicy; public interface Workbook { - /** - * used for compile-time performance/memory optimization. This determines the - * initial capacity for the sheet collection. Its currently set to 3. - * Changing it in this release will decrease performance - * since you're never allowed to have more or less than three sheets! - */ - - public final static int INITIAL_CAPACITY = 3; - /** Extended windows meta file */ public static final int PICTURE_TYPE_EMF = 2; @@ -72,21 +63,12 @@ public interface Workbook { * 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 org.apache.poi.hssf.usermodel.HSSFSheet#setSelected(boolean) + * @see Sheet#setSelected(boolean) * @param index */ void setSelectedTab(short index); /** - * gets 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 org.apache.poi.hssf.usermodel.HSSFSheet#setSelected(boolean) - */ - short getSelectedTab(); - - /** * set the sheet name. * Will throw IllegalArgumentException if the name is greater than 31 chars * or contains /\?*[] @@ -115,28 +97,28 @@ public interface Workbook { int getSheetIndex(Sheet sheet); /** - * create an HSSFSheet for this HSSFWorkbook, adds it to the sheets and returns + * create an Sheet for this Workbook, adds it to the sheets and returns * the high level representation. Use this to create new sheets. * - * @return HSSFSheet representing the new sheet. + * @return Sheet representing the new sheet. */ Sheet createSheet(); /** - * create an HSSFSheet from an existing sheet in the HSSFWorkbook. + * create an Sheet from an existing sheet in the Workbook. * - * @return HSSFSheet representing the cloned sheet. + * @return Sheet representing the cloned sheet. */ Sheet cloneSheet(int sheetNum); /** - * create an HSSFSheet for this HSSFWorkbook, adds it to the sheets and returns + * 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 HSSFSheet representing the new sheet. + * @return Sheet representing the new sheet. */ Sheet createSheet(String sheetname); @@ -149,9 +131,9 @@ public interface Workbook { int getNumberOfSheets(); /** - * Get the HSSFSheet object at the given index. + * Get the Sheet object at the given index. * @param index of the sheet number (0-based physical & logical) - * @return HSSFSheet at the provided index + * @return Sheet at the provided index */ Sheet getSheetAt(int index); @@ -159,7 +141,7 @@ public interface Workbook { /** * Get sheet with the given name * @param name of the sheet - * @return HSSFSheet with the name provided or null if it does not exist + * @return Sheet with the name provided or null if it does not exist */ Sheet getSheet(String name); @@ -220,7 +202,7 @@ public interface Workbook { /** * get the font at the given index number * @param idx index number - * @return HSSFFont at the index + * @return XSSFFont at the index */ Font getFontAt(short idx); @@ -242,7 +224,7 @@ public interface Workbook { /** * get the cell style object at the given index * @param idx index within the set of styles - * @return HSSFCellStyle object at the index + * @return CellStyle object at the index */ CellStyle getCellStyleAt(short idx); @@ -271,12 +253,6 @@ public interface Workbook { */ Name getNameAt(int index); - /** gets the named range name - * @param index the named range index (0 based) - * @return named range name - */ - String getNameName(int index); - /** * Sets the printarea for the sheet provided * <p> @@ -346,10 +322,8 @@ public interface Workbook { void removeName(int index); /** - * Returns the instance of HSSFDataFormat for this workbook. - * @return the HSSFDataFormat object - * @see org.apache.poi.hssf.record.FormatRecord - * @see org.apache.poi.hssf.record.Record + * Returns the instance of DataFormat for this workbook. + * @return the DataFormat object */ DataFormat createDataFormat(); |