zhao
2021-07-19 8347f2fbddbd25369359dcb2da1233ac48a19fdc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
/* ====================================================================
   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.
==================================================================== */
 
namespace HH.WMS.Utils.NPOI.SS.UserModel
{
    using System;
 
    public interface ICellStyle
    {
 
        bool ShrinkToFit { get; set; }
        /**
         * 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 Index { get; }
 
        /**
         * get the index of the format
         * @see DataFormat
         */
        short DataFormat { get; set; }
 
        /**
         * Get the format string
         */
        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(IFont font);
 
        /**
         * Gets the index of the font for this style
         * @see Workbook#GetFontAt(short)
         */
        short FontIndex { get; }
 
        /**
         * get whether the cell's using this style are to be hidden
         * @return hidden - whether the cell using this style should be hidden
         */
 
        bool IsHidden { get; set; }
 
        /**
         * get whether the cell's using this style are to be locked
         * @return hidden - whether the cell using this style should be locked
         */
 
        bool IsLocked { get; set; }
 
 
        /**
         * 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
         */
 
        HorizontalAlignment Alignment { get; set; }
 
 
        /**
         * get whether the text should be wrapped
         * @return wrap text or not
         */
 
        bool WrapText { get; set; }
 
 
        /**
         * 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
         */
 
        VerticalAlignment VerticalAlignment { get; set; }
 
        /**
         * get the degree of rotation for the text in the cell
         * @return rotation degrees (between -90 and 90 degrees)
         */
 
        short Rotation { get; set; }
 
        /**
         * get the number of spaces to indent the text in the cell
         * @return indent - number of spaces
         */
 
        short Indention { get; set; }
 
        /**
         * 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
         */
 
        BorderStyle BorderLeft { get; set; }
 
 
        /**
         * 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
         */
 
        BorderStyle BorderRight { get; set; }
 
 
        /**
         * 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
         */
 
        BorderStyle BorderTop { get; set; }
 
 
        /**
         * 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
         */
        BorderStyle BorderBottom { get; set; }
 
 
        /**
         * get the color to use for the left border
         */
        short LeftBorderColor { get; set; }
 
 
        /**
         * get the color to use for the left border
         * @return the index of the color defInition
         */
        short RightBorderColor { get; set; }
 
 
        /**
         * get the color to use for the top border
         * @return hhe index of the color defInition
         */
        short TopBorderColor { get; set; }
 
 
        /**
         * get the color to use for the left border
         * @return the index of the color defInition
         */
        short BottomBorderColor { get; set; }
 
 
        /**
         * get the fill pattern (??) - set to 1 to fill with foreground color
         * @return fill pattern
         */
 
        FillPatternType FillPattern { get; set; }
 
        /**
         * get the background fill color
         * @return fill color
         */
        short FillBackgroundColor { get; set; }
 
 
        /**
         * get the foreground fill color
         * @return fill color
         */
        short FillForegroundColor { get; set; }
 
        /**
         * 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)
         */
        void CloneStyleFrom(ICellStyle source);
 
 
        IFont GetFont(IWorkbook parentWorkbook);
    }
}