Skip to content

Commit 3201229

Browse files
committed
compessed table rows; centered Dot; alternating colors per row
1 parent b0fa37a commit 3201229

File tree

3 files changed

+19
-12
lines changed

3 files changed

+19
-12
lines changed

src/main/java/de/doubleslash/keeptime/view/ReportController.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ private void initialize() {
120120
}
121121

122122
private void initTableView() {
123-
124123
final TreeTableColumn<TableRow, TableRow> noteColumn = new TreeTableColumn<>("Notes");
125124
noteColumn.setCellFactory(new Callback<TreeTableColumn<TableRow, TableRow>, TreeTableCell<TableRow, TableRow>>() {
126125
@Override
@@ -132,7 +131,6 @@ protected void updateItem(final TableRow item, final boolean empty) {
132131
if (item == null || empty) {
133132
setGraphic(null);
134133
setText(null);
135-
LOG.debug("null");
136134
} else {
137135
final Text text = new Text(item.getNotes());
138136
text.wrappingWidthProperty().bind(noteColumn.widthProperty().subtract(35));
@@ -206,9 +204,8 @@ private void updateReport(final LocalDate dateToShow) {
206204

207205
final HBox projectButtonBox = new HBox();
208206
projectButtonBox.getChildren().add(createProjectReportButton(onlyCurrentProjectWork));
209-
// TODO center Dot
210207

211-
final Circle circle = new Circle(9, project.getColor());
208+
final Circle circle = new Circle(6, project.getColor());
212209

213210
final TreeItem<TableRow> projectRow = new TreeItem<>(
214211
new ProjectTableRow(project, projectWorkSeconds, projectButtonBox), circle);
@@ -262,7 +259,6 @@ public void updateItem(final LocalDate item, final boolean empty) {
262259

263260
private Button createEditWorkButton(final Work work) {
264261
final Button bProjectReport = new Button("edit");
265-
266262
bProjectReport.setOnAction(e -> {
267263
LOG.info("Edit work clicked.");
268264
final Dialog<Work> dialog = setupEditWorkDialog(work);
@@ -315,7 +311,6 @@ private GridPane setUpEditWorkGridPane(final Work work, final Dialog<Work> dialo
315311

316312
private Button createProjectReportButton(final List<Work> projectWork) {
317313
final Button bProjectReport = new Button("Copy to clipboard");
318-
319314
final EventHandler<ActionEvent> eventListener = actionEvent -> {
320315
LOG.debug("Copy to Clipboard clicked.");
321316
final ProjectReport pr = new ProjectReport(projectWork.size());

src/main/resources/css/dialog.css

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.tree-table-row-cell{
2+
-fx-background-color: #dddddd;
3+
-fx-cell-size:20;
4+
-fx-border:0px
5+
}
6+
.tree-table-row-cell:odd {
7+
-fx-background-color: #eeeeee;
8+
}
9+
10+
.tree-table-row-cell * {
11+
-fx-alignment:center;
12+
-fx-padding:0px;
13+
-fx-margin:0px
14+
}
15+
.tree-table-row-cell .arrow {
16+
-fx-padding:4px;
17+
}

src/main/resources/layouts/report.fxml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,7 @@
8989
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
9090
</VBox.margin>
9191
</Canvas>
92-
<Label text="Notes:">
93-
<font>
94-
<Font name="Open Sans Regular" size="16.0" />
95-
</font>
96-
</Label>
97-
<TreeTableView fx:id="workTableTreeView" prefHeight="255.0" prefWidth="500.0" />
92+
<TreeTableView fx:id="workTableTreeView" prefHeight="300.0" prefWidth="500.0" showRoot="false" stylesheets="@../css/dialog.css" />
9893
</children>
9994
</VBox>
10095
</children>

0 commit comments

Comments
 (0)