FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Java/itext-java-pdf-table/src/main/java/com/hmkcode/Style.java at master · sl514/Java · GitHub
sl514
Java
Repository navigation
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
Java
/
itext-java-pdf-table
/
src
/
main
/
java
/
com
/
hmkcode
/
Style.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
63 lines (47 loc) · 1.47 KB
Breadcrumbs
Java
/
itext-java-pdf-table
/
src
/
main
/
java
/
com
/
hmkcode
/
Style.java
Copy path
File metadata and controls
63 lines (47 loc) · 1.47 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
package
com
.
hmkcode
;
import
com
.
itextpdf
.
text
.
BaseColor
;
import
com
.
itextpdf
.
text
.
Element
;
import
com
.
itextpdf
.
text
.
pdf
.
PdfPCell
;
public
class
Style
{
public
static
void
headerCellStyle
(
PdfPCell
cell
){
// alignment
cell
.
setHorizontalAlignment
(
Element
.
ALIGN_CENTER
);
// padding
cell
.
setPaddingTop
(
0f
);
cell
.
setPaddingBottom
(
7f
);
// background color
cell
.
setBackgroundColor
(
new
BaseColor
(
0
,
121
,
182
));
// border
cell
.
setBorder
(
0
);
cell
.
setBorderWidthBottom
(
2f
);
}
public
static
void
labelCellStyle
(
PdfPCell
cell
){
// alignment
cell
.
setHorizontalAlignment
(
Element
.
ALIGN_LEFT
);
cell
.
setVerticalAlignment
(
Element
.
ALIGN_MIDDLE
);
// padding
cell
.
setPaddingLeft
(
3f
);
cell
.
setPaddingTop
(
0f
);
// background color
cell
.
setBackgroundColor
(
BaseColor
.
LIGHT_GRAY
);
// border
cell
.
setBorder
(
0
);
cell
.
setBorderWidthBottom
(
1
);
cell
.
setBorderColorBottom
(
BaseColor
.
GRAY
);
// height
cell
.
setMinimumHeight
(
18f
);
}
public
static
void
valueCellStyle
(
PdfPCell
cell
){
// alignment
cell
.
setHorizontalAlignment
(
Element
.
ALIGN_CENTER
);
cell
.
setVerticalAlignment
(
Element
.
ALIGN_MIDDLE
);
// padding
cell
.
setPaddingTop
(
0f
);
cell
.
setPaddingBottom
(
5f
);
// border
cell
.
setBorder
(
0
);
cell
.
setBorderWidthBottom
(
0.5f
);
// height
cell
.
setMinimumHeight
(
18f
);
}
}
Back
|
FazBrowse Home
|
New Git URL