Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BudgetMaster
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Robert Goldmann
BudgetMaster
Commits
75732835
Commit
75732835
authored
7 years ago
by
Robert Goldmann
Browse files
Options
Downloads
Patches
Plain Diff
Fixed
#146
- report: set size of columns
parent
4f0432e2
No related branches found
No related tags found
1 merge request
!150
merge v1_3_1 into master
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/de/deadlocker8/budgetmaster/logic/report/ColumnType.java
+16
-9
16 additions, 9 deletions
src/de/deadlocker8/budgetmaster/logic/report/ColumnType.java
src/de/deadlocker8/budgetmaster/logic/report/ReportGenerator.java
+7
-1
7 additions, 1 deletion
...eadlocker8/budgetmaster/logic/report/ReportGenerator.java
with
23 additions
and
10 deletions
src/de/deadlocker8/budgetmaster/logic/report/ColumnType.java
+
16
−
9
View file @
75732835
...
...
@@ -2,24 +2,31 @@ package de.deadlocker8.budgetmaster.logic.report;
public
enum
ColumnType
{
POSITION
(
"Nr."
),
DATE
(
"Datum"
),
REPEATING
(
"Wiederholend"
),
CATEGORY
(
"Kategorie"
),
NAME
(
"Name"
),
DESCRIPTION
(
"Notiz"
),
RATING
(
"
Bewertung"
),
AMOUNT
(
"Betrag"
);
POSITION
(
"Nr."
,
1
),
DATE
(
"Datum"
,
2
),
REPEATING
(
"Wiederholend"
,
1
),
CATEGORY
(
"Kategorie"
,
3
),
NAME
(
"Name"
,
3
),
DESCRIPTION
(
"Notiz"
,
3
),
RATING
(
"
+/-"
,
1
),
AMOUNT
(
"Betrag"
,
2
);
private
String
name
;
private
float
proportion
;
private
ColumnType
(
String
name
)
private
ColumnType
(
String
name
,
float
proportion
)
{
this
.
name
=
name
;
this
.
proportion
=
proportion
;
}
public
String
getName
()
{
return
name
;
}
public
float
getProportion
()
{
return
proportion
;
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/de/deadlocker8/budgetmaster/logic/report/ReportGenerator.java
+
7
−
1
View file @
75732835
...
...
@@ -70,7 +70,13 @@ public class ReportGenerator
if
(
numberOfColumns
>
0
)
{
PdfPTable
table
=
new
PdfPTable
(
numberOfColumns
);
float
[]
proportions
=
new
float
[
numberOfColumns
];
for
(
int
i
=
0
;
i
<
columnOrder
.
getColumns
().
size
();
i
++)
{
proportions
[
i
]
=
columnOrder
.
getColumns
().
get
(
i
).
getProportion
();
}
PdfPTable
table
=
new
PdfPTable
(
proportions
);
table
.
setWidthPercentage
(
tableWidth
);
Font
font
=
new
Font
(
FontFamily
.
HELVETICA
,
8
,
Font
.
NORMAL
,
GrayColor
.
BLACK
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment