1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package io.github.tonywasher.joceanus.tethys.swing.pane;
18
19 import javax.swing.JPanel;
20
21 import io.github.tonywasher.joceanus.tethys.api.base.TethysUIComponent;
22 import io.github.tonywasher.joceanus.tethys.core.factory.TethysUICoreFactory;
23 import io.github.tonywasher.joceanus.tethys.core.pane.TethysUICoreFlowPaneManager;
24 import io.github.tonywasher.joceanus.tethys.swing.base.TethysUISwingNode;
25
26
27
28
29 public class TethysUISwingFlowPaneManager
30 extends TethysUICoreFlowPaneManager {
31
32
33
34 private final TethysUISwingNode theNode;
35
36
37
38
39 private final JPanel thePanel;
40
41
42
43
44
45
46 TethysUISwingFlowPaneManager(final TethysUICoreFactory<?> pFactory) {
47 super(pFactory);
48 thePanel = new JPanel();
49 theNode = new TethysUISwingNode(thePanel);
50 }
51
52 @Override
53 public TethysUISwingNode getNode() {
54 return theNode;
55 }
56
57 @Override
58 public void setVisible(final boolean pVisible) {
59 thePanel.setVisible(pVisible);
60 }
61
62 @Override
63 public void addNode(final TethysUIComponent pNode) {
64 super.addNode(pNode);
65 thePanel.add(TethysUISwingNode.getComponent(pNode));
66 }
67
68 @Override
69 public void setChildVisible(final TethysUIComponent pChild,
70 final boolean pVisible) {
71 TethysUISwingNode.getComponent(pChild).setVisible(pVisible);
72 }
73
74 @Override
75 public void setPreferredWidth(final Integer pWidth) {
76 theNode.setPreferredWidth(pWidth);
77 }
78
79 @Override
80 public void setPreferredHeight(final Integer pHeight) {
81 theNode.setPreferredHeight(pHeight);
82 }
83
84 @Override
85 public void setBorderPadding(final Integer pPadding) {
86 super.setBorderPadding(pPadding);
87 theNode.createWrapperPane(getBorderTitle(), getBorderPadding());
88 }
89
90 @Override
91 public void setBorderTitle(final String pTitle) {
92 super.setBorderTitle(pTitle);
93 theNode.createWrapperPane(getBorderTitle(), getBorderPadding());
94 }
95 }