Skip to content

Package: JavaFXAddContentPresentationDelegate

JavaFXAddContentPresentationDelegate

nameinstructionbranchcomplexitylinemethod
JavaFXAddContentPresentationDelegate(JavaFXBinder)
M: 13 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
bind(AddContentPresentation.Bindings)
M: 40 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 6 C: 0
0%
M: 1 C: 0
0%
showUp(UserNotificationWithFeedback)
M: 10 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*
2: * #%L
3: * *********************************************************************************************************************
4: *
5: * NorthernWind - lightweight CMS
6: * http://northernwind.tidalwave.it - git clone git@bitbucket.org:tidalwave/northernwind-rca-src.git
7: * %%
8: * Copyright (C) 2013 - 2021 Tidalwave s.a.s. (http://tidalwave.it)
9: * %%
10: * *********************************************************************************************************************
11: *
12: * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
13: * the License. You may obtain a copy of the License at
14: *
15: * http://www.apache.org/licenses/LICENSE-2.0
16: *
17: * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
18: * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
19: * specific language governing permissions and limitations under the License.
20: *
21: * *********************************************************************************************************************
22: *
23: *
24: * *********************************************************************************************************************
25: * #L%
26: */
27: package it.tidalwave.northernwind.rca.ui.impl.javafx.contentmanager;
28:
29: import javax.annotation.Nonnull;
30: import javafx.fxml.FXML;
31: import javafx.scene.layout.Pane;
32: import javafx.scene.control.TextField;
33: import it.tidalwave.util.ui.UserNotificationWithFeedback;
34: import it.tidalwave.role.ui.javafx.JavaFXBinder;
35: import it.tidalwave.northernwind.rca.ui.contentmanager.AddContentPresentation;
36: import lombok.RequiredArgsConstructor;
37:
38: /***********************************************************************************************************************
39: *
40: * @author Fabrizio Giudici
41: *
42: **********************************************************************************************************************/
43:•@RequiredArgsConstructor
44: public class JavaFXAddContentPresentationDelegate implements AddContentPresentation
45: {
46: @Nonnull
47: private final JavaFXBinder binder;
48:
49: @FXML
50: private Pane pnPane;
51:
52: @FXML
53: private TextField tfFolder;
54:
55: @FXML
56: private TextField tfTitle;
57:
58: @FXML
59: private TextField tfTags;
60:
61: @FXML
62: private TextField tfExposedUri;
63:
64: @FXML
65: private TextField tfPublishingDateTime;
66:
67: private Bindings bindings;
68:
69: @Override
70: public void bind (@Nonnull final Bindings bindings)
71: {
72: binder.bindBidirectionally(tfFolder, bindings.folder, bindings.folderValid);
73: binder.bindBidirectionally(tfTitle, bindings.title, bindings.titleValid);
74: binder.bindBidirectionally(tfExposedUri, bindings.exposedUri, bindings.exposedUriValid);
75: binder.bindBidirectionally(tfTags, bindings.tags, bindings.tagsValid);
76: // FIXME after NWRCA-95
77: // would be better binder.bind(tfPublishingDateTim, pm) with a pm with a Displayable and a Mutable.
78: // binder.bindBidirectionally(tfPublishingDateTime, bindings.publishingDateTime,
79: // bindings.publishingDateTimeValid);
80: this.bindings = bindings;
81: }
82:
83: @Override
84: public void showUp (@Nonnull final UserNotificationWithFeedback notification)
85: {
86: binder.showInModalDialog(pnPane, notification, bindings.valid);
87: }
88: }