Skip to content

Commit 1b885ec

Browse files
ddamkeddamke
authored andcommitted
format changes
1 parent a77b24c commit 1b885ec

File tree

1 file changed

+26
-14
lines changed

1 file changed

+26
-14
lines changed

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

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
import de.doubleslash.keeptime.common.*;
2626
import javafx.scene.control.*;
27+
import javafx.scene.shape.SVGPath;
2728
import org.slf4j.Logger;
2829
import org.slf4j.LoggerFactory;
2930
import org.springframework.beans.factory.annotation.Autowired;
@@ -70,7 +71,6 @@
7071
import javafx.stage.Modality;
7172
import javafx.stage.Stage;
7273

73-
7474
@Component
7575
public class ViewController {
7676
private static final Logger LOG = LoggerFactory.getLogger(ViewController.class);
@@ -112,6 +112,19 @@ public class ViewController {
112112
private Button settingsButton;
113113
@FXML
114114
private Button calendarButton;
115+
116+
@FXML
117+
private SVGPath calendarIcon;
118+
119+
@FXML
120+
private SVGPath settingsIcon;
121+
122+
@FXML
123+
private SVGPath minimizeIcon;
124+
125+
@FXML
126+
private SVGPath closeIcon;
127+
115128
@FXML
116129
private TextArea textArea;
117130

@@ -154,7 +167,7 @@ public ViewController(final Model model, final Controller controller) {
154167
}
155168

156169
@FXML
157-
private void initialize(){
170+
private void initialize() {
158171

159172
availableProjectsListView.setFixedCellSize(13);
160173

@@ -184,16 +197,16 @@ private void initialize(){
184197
calendarButton.setOnAction(ae -> calendarClicked());
185198

186199
calendarButton.textFillProperty().bind(fontColorProperty);
187-
calendarButton.setGraphic(SvgNodeProvider.getSvgNodeWithScale(RESOURCE.SVG_CALENDAR_DAYS_ICON, 0.03 ,0.03));
200+
calendarButton.setGraphic(SvgNodeProvider.getSvgNodeWithScale(RESOURCE.SVG_CALENDAR_DAYS_ICON, 0.03, 0.03));
188201

189202
closeButton.textFillProperty().bind(fontColorProperty);
190-
closeButton.setGraphic(SvgNodeProvider.getSvgNodeWithScale(RESOURCE.SVG_CLOSE_ICON, 0.03 ,0.03));
203+
closeButton.setGraphic(SvgNodeProvider.getSvgNodeWithScale(RESOURCE.SVG_CLOSE_ICON, 0.03, 0.03));
191204

192205
settingsButton.textFillProperty().bind(fontColorProperty);
193-
settingsButton.setGraphic(SvgNodeProvider.getSvgNodeWithScale(RESOURCE.SVG_SETTINGS_ICON, 0.03 ,0.03));
206+
settingsButton.setGraphic(SvgNodeProvider.getSvgNodeWithScale(RESOURCE.SVG_SETTINGS_ICON, 0.03, 0.03));
194207

195208
minimizeButton.textFillProperty().bind(fontColorProperty);
196-
minimizeButton.setGraphic(SvgNodeProvider.getSvgNodeWithScale(RESOURCE.SVG_MINUS_ICON , 0.03 ,0.03));
209+
minimizeButton.setGraphic(SvgNodeProvider.getSvgNodeWithScale(RESOURCE.SVG_MINUS_ICON, 0.03, 0.03));
197210

198211
final Runnable updateMainBackgroundColor = this::runUpdateMainBackgroundColor;
199212

@@ -267,17 +280,18 @@ private void initialize(){
267280
mainStage.setY(mouseEvent.getScreenY() + dragDelta.y);
268281
});
269282

270-
bigTimeLabel.textProperty().bind(Bindings.createStringBinding(
271-
() -> DateFormatter.secondsToHHMMSS(activeWorkSecondsProperty.get()), activeWorkSecondsProperty));
283+
bigTimeLabel.textProperty()
284+
.bind(Bindings.createStringBinding(
285+
() -> DateFormatter.secondsToHHMMSS(activeWorkSecondsProperty.get()),
286+
activeWorkSecondsProperty));
272287

273288
// update ui each second
274289
new Interval(1).registerCallBack(() -> {
275290
final LocalDateTime now = LocalDateTime.now();
276291
model.activeWorkItem.get().setEndTime(now); // FIXME not good to change model
277292

278-
final long currentWorkSeconds = Duration
279-
.between(model.activeWorkItem.get().getStartTime(), model.activeWorkItem.get().getEndTime())
280-
.getSeconds();
293+
final long currentWorkSeconds = Duration.between(model.activeWorkItem.get().getStartTime(),
294+
model.activeWorkItem.get().getEndTime()).getSeconds();
281295
activeWorkSecondsProperty.set(currentWorkSeconds);
282296
final long todayWorkingSeconds = controller.calcTodaysWorkSeconds();
283297
final long todaySeconds = controller.calcTodaysSeconds();
@@ -301,8 +315,6 @@ private void initialize(){
301315

302316
}
303317

304-
305-
306318
private Dialog<Project> dialogResultConverter(final Dialog<Project> dialog,
307319
final ManageProjectController manageProjectController) {
308320
dialog.setResultConverter(dialogButton -> {
@@ -321,7 +333,7 @@ private void settingsClicked() {
321333
settingsStage.show();
322334
}
323335

324-
private void calendarClicked(){
336+
private void calendarClicked() {
325337
LOG.info("Calendar clicked");
326338
this.mainStage.setAlwaysOnTop(false);
327339
reportStage.setAlwaysOnTop(true);

0 commit comments

Comments
 (0)