Skip to content

Package: JavaFXApplicationPresentationDelegate

JavaFXApplicationPresentationDelegate

nameinstructionbranchcomplexitylinemethod
assemble(JavaFXBinder, JavaFXToolBarControl, JavaFxCustomerExplorerPresentation, JavaFxProjectExplorerPresentation, JavaFxJobEventExplorerPresentation)
M: 24 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 5 C: 0
0%
M: 1 C: 0
0%
put(AnchorPane, Node)
M: 22 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 6 C: 0
0%
M: 1 C: 0
0%
static {...}
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*
2: * *************************************************************************************************************************************************************
3: *
4: * blueHour: open source accounting
5: * http://tidalwave.it/projects/bluehour
6: *
7: * Copyright (C) 2013 - 2025 by Tidalwave s.a.s. (http://tidalwave.it)
8: *
9: * *************************************************************************************************************************************************************
10: *
11: * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
12: * You may obtain a copy of the License at
13: *
14: * http://www.apache.org/licenses/LICENSE-2.0
15: *
16: * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
17: * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
18: *
19: * *************************************************************************************************************************************************************
20: *
21: * git clone https://bitbucket.org/tidalwave/bluehour-src
22: * git clone https://github.com/tidalwave-it/bluehour-src
23: *
24: * *************************************************************************************************************************************************************
25: */
26: package it.tidalwave.accounting.ui.impl.javafx;
27:
28: import jakarta.annotation.Nonnull;
29: import javafx.fxml.FXML;
30: import javafx.scene.Node;
31: import javafx.scene.control.ToolBar;
32: import javafx.scene.layout.AnchorPane;
33: import it.tidalwave.accounting.ui.customerexplorer.impl.javafx.JavaFxCustomerExplorerPresentation;
34: import it.tidalwave.accounting.ui.jobeventexplorer.impl.javafx.JavaFxJobEventExplorerPresentation;
35: import it.tidalwave.accounting.ui.projectexplorer.impl.javafx.JavaFxProjectExplorerPresentation;
36: import it.tidalwave.ui.core.annotation.Assemble;
37: import it.tidalwave.ui.core.annotation.PresentationAssembler;
38: import it.tidalwave.ui.javafx.JavaFXBinder;
39: import it.tidalwave.ui.javafx.JavaFXToolBarControl;
40: import lombok.Getter;
41: import lombok.RequiredArgsConstructor;
42: import lombok.extern.slf4j.Slf4j;
43:
44: /***************************************************************************************************************************************************************
45: *
46: * @author Fabrizio Giudici
47: *
48: **************************************************************************************************************************************************************/
49: @PresentationAssembler @RequiredArgsConstructor @Slf4j @Getter
50: public class JavaFXApplicationPresentationDelegate
51: {
52: @FXML
53: private ToolBar tbToolBar;
54:
55: @FXML
56: private AnchorPane pnCustomerExplorer;
57:
58: @FXML
59: private AnchorPane pnProjectExplorer;
60:
61: @FXML
62: private AnchorPane pnJobEventExplorer;
63:
64: @Assemble
65: public void assemble (@Nonnull final JavaFXBinder binder,
66: @Nonnull final JavaFXToolBarControl toolBarControl,
67: @Nonnull final JavaFxCustomerExplorerPresentation customerExplorer,
68: @Nonnull final JavaFxProjectExplorerPresentation projectExplorer,
69: @Nonnull final JavaFxJobEventExplorerPresentation jobEventExplorer)
70: {
71: toolBarControl.populate(binder, tbToolBar);
72: put(pnCustomerExplorer, customerExplorer.getNad().getNode());
73: put(pnProjectExplorer, projectExplorer.getNad().getNode());
74: put(pnJobEventExplorer, jobEventExplorer.getNad().getNode());
75: }
76:
77: private static void put (@Nonnull final AnchorPane anchorPane, @Nonnull final Node node)
78: {
79: AnchorPane.setLeftAnchor(node, 0.0);
80: AnchorPane.setRightAnchor(node, 0.0);
81: AnchorPane.setTopAnchor(node, 0.0);
82: AnchorPane.setBottomAnchor(node, 0.0);
83: anchorPane.getChildren().add(node);
84: }
85: }