Skip to content

Commit 1314124

Browse files
ddamkeddamke
authored andcommitted
move circle and text to update method
1 parent 7567b35 commit 1314124

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import java.util.stream.Collectors;
2727

2828
import javafx.scene.control.skin.DatePickerSkin;
29+
import javafx.scene.text.Text;
2930
import org.slf4j.Logger;
3031
import org.slf4j.LoggerFactory;
3132
import org.springframework.beans.factory.annotation.Autowired;
@@ -152,11 +153,11 @@ protected void updateItem(final TableRow item, final boolean empty) {
152153
setText(null);
153154
} else {
154155
final String notes = item.getNotes();
155-
final Label label = new Label(notes.isEmpty() ? EMPTY_NOTE : notes);
156-
label.setUnderline(item.isUnderlined());
157-
label.setTooltip(new Tooltip(notes));
158-
this.setGraphic(label);
159-
workTableTreeView.refresh();
156+
final Text text = new Text(notes.isEmpty() ? EMPTY_NOTE : notes);
157+
this.setText(text.getText());
158+
159+
final Circle circle = new Circle(6, item.getProjectColor());
160+
this.setGraphic(circle);
160161
}
161162
}
162163
};
@@ -229,10 +230,9 @@ private void updateReport(final LocalDate dateToShow) {
229230
final HBox projectButtonBox = new HBox();
230231
projectButtonBox.getChildren().add(createCopyProjectButton(onlyCurrentProjectWork));
231232

232-
final Circle circle = new Circle(6, project.getColor());
233233

234234
final TreeItem<TableRow> projectRow = new TreeItem<>(
235-
new ProjectTableRow(project, projectWorkSeconds, projectButtonBox), circle);
235+
new ProjectTableRow(project, projectWorkSeconds, projectButtonBox));
236236

237237
for (final Work w : onlyCurrentProjectWork) {
238238
final HBox workButtonBox = new HBox(5.0);

0 commit comments

Comments
 (0)