Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1441 ariadna 1
<?php
2
 
3
namespace PhpOffice\PhpSpreadsheet\Worksheet\Table;
4
 
5
use PhpOffice\PhpSpreadsheet\Worksheet\Table;
6
 
7
class TableStyle
8
{
9
    const TABLE_STYLE_NONE = '';
10
    const TABLE_STYLE_LIGHT1 = 'TableStyleLight1';
11
    const TABLE_STYLE_LIGHT2 = 'TableStyleLight2';
12
    const TABLE_STYLE_LIGHT3 = 'TableStyleLight3';
13
    const TABLE_STYLE_LIGHT4 = 'TableStyleLight4';
14
    const TABLE_STYLE_LIGHT5 = 'TableStyleLight5';
15
    const TABLE_STYLE_LIGHT6 = 'TableStyleLight6';
16
    const TABLE_STYLE_LIGHT7 = 'TableStyleLight7';
17
    const TABLE_STYLE_LIGHT8 = 'TableStyleLight8';
18
    const TABLE_STYLE_LIGHT9 = 'TableStyleLight9';
19
    const TABLE_STYLE_LIGHT10 = 'TableStyleLight10';
20
    const TABLE_STYLE_LIGHT11 = 'TableStyleLight11';
21
    const TABLE_STYLE_LIGHT12 = 'TableStyleLight12';
22
    const TABLE_STYLE_LIGHT13 = 'TableStyleLight13';
23
    const TABLE_STYLE_LIGHT14 = 'TableStyleLight14';
24
    const TABLE_STYLE_LIGHT15 = 'TableStyleLight15';
25
    const TABLE_STYLE_LIGHT16 = 'TableStyleLight16';
26
    const TABLE_STYLE_LIGHT17 = 'TableStyleLight17';
27
    const TABLE_STYLE_LIGHT18 = 'TableStyleLight18';
28
    const TABLE_STYLE_LIGHT19 = 'TableStyleLight19';
29
    const TABLE_STYLE_LIGHT20 = 'TableStyleLight20';
30
    const TABLE_STYLE_LIGHT21 = 'TableStyleLight21';
31
    const TABLE_STYLE_MEDIUM1 = 'TableStyleMedium1';
32
    const TABLE_STYLE_MEDIUM2 = 'TableStyleMedium2';
33
    const TABLE_STYLE_MEDIUM3 = 'TableStyleMedium3';
34
    const TABLE_STYLE_MEDIUM4 = 'TableStyleMedium4';
35
    const TABLE_STYLE_MEDIUM5 = 'TableStyleMedium5';
36
    const TABLE_STYLE_MEDIUM6 = 'TableStyleMedium6';
37
    const TABLE_STYLE_MEDIUM7 = 'TableStyleMedium7';
38
    const TABLE_STYLE_MEDIUM8 = 'TableStyleMedium8';
39
    const TABLE_STYLE_MEDIUM9 = 'TableStyleMedium9';
40
    const TABLE_STYLE_MEDIUM10 = 'TableStyleMedium10';
41
    const TABLE_STYLE_MEDIUM11 = 'TableStyleMedium11';
42
    const TABLE_STYLE_MEDIUM12 = 'TableStyleMedium12';
43
    const TABLE_STYLE_MEDIUM13 = 'TableStyleMedium13';
44
    const TABLE_STYLE_MEDIUM14 = 'TableStyleMedium14';
45
    const TABLE_STYLE_MEDIUM15 = 'TableStyleMedium15';
46
    const TABLE_STYLE_MEDIUM16 = 'TableStyleMedium16';
47
    const TABLE_STYLE_MEDIUM17 = 'TableStyleMedium17';
48
    const TABLE_STYLE_MEDIUM18 = 'TableStyleMedium18';
49
    const TABLE_STYLE_MEDIUM19 = 'TableStyleMedium19';
50
    const TABLE_STYLE_MEDIUM20 = 'TableStyleMedium20';
51
    const TABLE_STYLE_MEDIUM21 = 'TableStyleMedium21';
52
    const TABLE_STYLE_MEDIUM22 = 'TableStyleMedium22';
53
    const TABLE_STYLE_MEDIUM23 = 'TableStyleMedium23';
54
    const TABLE_STYLE_MEDIUM24 = 'TableStyleMedium24';
55
    const TABLE_STYLE_MEDIUM25 = 'TableStyleMedium25';
56
    const TABLE_STYLE_MEDIUM26 = 'TableStyleMedium26';
57
    const TABLE_STYLE_MEDIUM27 = 'TableStyleMedium27';
58
    const TABLE_STYLE_MEDIUM28 = 'TableStyleMedium28';
59
    const TABLE_STYLE_DARK1 = 'TableStyleDark1';
60
    const TABLE_STYLE_DARK2 = 'TableStyleDark2';
61
    const TABLE_STYLE_DARK3 = 'TableStyleDark3';
62
    const TABLE_STYLE_DARK4 = 'TableStyleDark4';
63
    const TABLE_STYLE_DARK5 = 'TableStyleDark5';
64
    const TABLE_STYLE_DARK6 = 'TableStyleDark6';
65
    const TABLE_STYLE_DARK7 = 'TableStyleDark7';
66
    const TABLE_STYLE_DARK8 = 'TableStyleDark8';
67
    const TABLE_STYLE_DARK9 = 'TableStyleDark9';
68
    const TABLE_STYLE_DARK10 = 'TableStyleDark10';
69
    const TABLE_STYLE_DARK11 = 'TableStyleDark11';
70
 
71
    /**
72
     * Theme.
73
     */
74
    private string $theme;
75
 
76
    /**
77
     * Show First Column.
78
     */
79
    private bool $showFirstColumn = false;
80
 
81
    /**
82
     * Show Last Column.
83
     */
84
    private bool $showLastColumn = false;
85
 
86
    /**
87
     * Show Row Stripes.
88
     */
89
    private bool $showRowStripes = false;
90
 
91
    /**
92
     * Show Column Stripes.
93
     */
94
    private bool $showColumnStripes = false;
95
 
96
    /**
97
     * Table.
98
     */
99
    private ?Table $table = null;
100
 
101
    /**
102
     * Create a new Table Style.
103
     *
104
     * @param string $theme (e.g. TableStyle::TABLE_STYLE_MEDIUM2)
105
     */
106
    public function __construct(string $theme = self::TABLE_STYLE_MEDIUM2)
107
    {
108
        $this->theme = $theme;
109
    }
110
 
111
    /**
112
     * Get theme.
113
     */
114
    public function getTheme(): string
115
    {
116
        return $this->theme;
117
    }
118
 
119
    /**
120
     * Set theme.
121
     */
122
    public function setTheme(string $theme): self
123
    {
124
        $this->theme = $theme;
125
 
126
        return $this;
127
    }
128
 
129
    /**
130
     * Get show First Column.
131
     */
132
    public function getShowFirstColumn(): bool
133
    {
134
        return $this->showFirstColumn;
135
    }
136
 
137
    /**
138
     * Set show First Column.
139
     */
140
    public function setShowFirstColumn(bool $showFirstColumn): self
141
    {
142
        $this->showFirstColumn = $showFirstColumn;
143
 
144
        return $this;
145
    }
146
 
147
    /**
148
     * Get show Last Column.
149
     */
150
    public function getShowLastColumn(): bool
151
    {
152
        return $this->showLastColumn;
153
    }
154
 
155
    /**
156
     * Set show Last Column.
157
     */
158
    public function setShowLastColumn(bool $showLastColumn): self
159
    {
160
        $this->showLastColumn = $showLastColumn;
161
 
162
        return $this;
163
    }
164
 
165
    /**
166
     * Get show Row Stripes.
167
     */
168
    public function getShowRowStripes(): bool
169
    {
170
        return $this->showRowStripes;
171
    }
172
 
173
    /**
174
     * Set show Row Stripes.
175
     */
176
    public function setShowRowStripes(bool $showRowStripes): self
177
    {
178
        $this->showRowStripes = $showRowStripes;
179
 
180
        return $this;
181
    }
182
 
183
    /**
184
     * Get show Column Stripes.
185
     */
186
    public function getShowColumnStripes(): bool
187
    {
188
        return $this->showColumnStripes;
189
    }
190
 
191
    /**
192
     * Set show Column Stripes.
193
     */
194
    public function setShowColumnStripes(bool $showColumnStripes): self
195
    {
196
        $this->showColumnStripes = $showColumnStripes;
197
 
198
        return $this;
199
    }
200
 
201
    /**
202
     * Get this Style's Table.
203
     */
204
    public function getTable(): ?Table
205
    {
206
        return $this->table;
207
    }
208
 
209
    /**
210
     * Set this Style's Table.
211
     */
212
    public function setTable(?Table $table = null): self
213
    {
214
        $this->table = $table;
215
 
216
        return $this;
217
    }
218
}