2525import java .util .TreeSet ;
2626import java .util .stream .Collectors ;
2727
28+ import de .doubleslash .keeptime .common .SvgNodeProvider ;
29+ import javafx .scene .control .*;
2830import org .slf4j .Logger ;
2931import org .slf4j .LoggerFactory ;
3032import org .springframework .beans .factory .annotation .Autowired ;
5052import javafx .fxml .FXMLLoader ;
5153import javafx .scene .Node ;
5254import javafx .scene .canvas .Canvas ;
53- import javafx .scene .control .Alert ;
5455import javafx .scene .control .Alert .AlertType ;
55- import javafx .scene .control .Button ;
56- import javafx .scene .control .ButtonType ;
57- import javafx .scene .control .DateCell ;
58- import javafx .scene .control .DatePicker ;
59- import javafx .scene .control .Dialog ;
60- import javafx .scene .control .Label ;
61- import javafx .scene .control .Tooltip ;
62- import javafx .scene .control .TreeItem ;
63- import javafx .scene .control .TreeTableCell ;
64- import javafx .scene .control .TreeTableColumn ;
65- import javafx .scene .control .TreeTableView ;
6656import javafx .scene .control .cell .TreeItemPropertyValueFactory ;
6757import javafx .scene .input .Clipboard ;
6858import javafx .scene .input .ClipboardContent ;
7363import javafx .scene .shape .Circle ;
7464import javafx .stage .Stage ;
7565import javafx .util .Callback ;
76-
7766@ Component
7867public class ReportController {
7968
@@ -280,7 +269,13 @@ public void updateItem(final LocalDate item, final boolean empty) {
280269 }
281270
282271 private Button createDeleteWorkButton (final Work w ) {
283- final Button deleteButton = new Button ("" );
272+ final Button deleteButton ;
273+
274+ deleteButton = new Button ("" , SvgNodeProvider .getSvgNode (RESOURCE .SVG_TRASH_ICON ));
275+ deleteButton .setMaxSize (20 , 18 );
276+ deleteButton .setMinSize (20 , 18 );
277+ deleteButton .setContentDisplay (ContentDisplay .GRAPHIC_ONLY );
278+
284279 deleteButton .setOnAction (e -> {
285280 LOG .info ("Delete work clicked." );
286281 final Alert alert = new Alert (AlertType .CONFIRMATION );
@@ -302,7 +297,10 @@ private Button createDeleteWorkButton(final Work w) {
302297 }
303298
304299 private Button createEditWorkButton (final Work work ) {
305- final Button editButton = new Button ("" );
300+ final Button editButton = new Button ("" ,SvgNodeProvider .getSvgNode (RESOURCE .SVG_PENCIL_ICON ));
301+ editButton .setMaxSize (20 , 18 );
302+ editButton .setMinSize (20 , 18 );
303+ editButton .setContentDisplay (ContentDisplay .GRAPHIC_ONLY );
306304 editButton .setOnAction (e -> {
307305 LOG .info ("Edit work clicked." );
308306 final Dialog <Work > dialog = setupEditWorkDialog (work );
@@ -359,7 +357,10 @@ private GridPane setUpEditWorkGridPane(final Work work, final Dialog<Work> dialo
359357 }
360358
361359 private Button createCopyProjectButton (final List <Work > projectWork ) {
362- final Button copyButton = new Button ("" );
360+ final Button copyButton = new Button ("" , SvgNodeProvider .getSvgNode (RESOURCE .SVG_FLOPPY_DISK_ICON ));
361+ copyButton .setMaxSize (20 , 18 );
362+ copyButton .setMinSize (20 , 18 );
363+ copyButton .setContentDisplay (ContentDisplay .GRAPHIC_ONLY );
363364 final EventHandler <ActionEvent > eventListener = actionEvent -> {
364365 LOG .debug ("Copy to Clipboard clicked." );
365366 final ProjectReport pr = new ProjectReport (projectWork .size ());
@@ -379,7 +380,11 @@ private Button createCopyProjectButton(final List<Work> projectWork) {
379380 }
380381
381382 private Node createCopyWorkButton (final Work w ) {
382- final Button copyButton = new Button ("" );
383+ final Button copyButton = new Button ("" , SvgNodeProvider .getSvgNode (RESOURCE .SVG_FLOPPY_DISK_ICON ));
384+ copyButton .setMaxSize (20 , 18 );
385+ copyButton .setMinSize (20 , 18 );
386+ copyButton .setContentDisplay (ContentDisplay .GRAPHIC_ONLY );
387+
383388 final EventHandler <ActionEvent > eventListener = actionEvent -> {
384389 LOG .debug ("Copy to Clipboard clicked." );
385390 final Clipboard clipboard = Clipboard .getSystemClipboard ();
0 commit comments