1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package io.github.tonywasher.joceanus.tethys.core.dialog;
18
19 import io.github.tonywasher.joceanus.tethys.api.base.TethysUINode;
20 import io.github.tonywasher.joceanus.tethys.api.control.TethysUILabel;
21 import io.github.tonywasher.joceanus.tethys.api.dialog.TethysUIBusySpinner;
22 import io.github.tonywasher.joceanus.tethys.api.pane.TethysUIBoxPaneManager;
23 import io.github.tonywasher.joceanus.tethys.core.base.TethysUICoreComponent;
24 import io.github.tonywasher.joceanus.tethys.core.base.TethysUICoreIcon;
25 import io.github.tonywasher.joceanus.tethys.core.factory.TethysUICoreFactory;
26
27
28
29
30 public abstract class TethysUICoreBusySpinner
31 extends TethysUICoreComponent
32 implements TethysUIBusySpinner {
33
34
35
36 protected static final int SPINNER_SIZE = 70;
37
38
39
40
41 private final TethysUIBoxPaneManager thePanel;
42
43
44
45
46
47
48 protected TethysUICoreBusySpinner(final TethysUICoreFactory<?> pFactory) {
49
50 final TethysUILabel mySpinner = pFactory.controlFactory().newLabel();
51 mySpinner.setIconOnly();
52 mySpinner.setIconSize(SPINNER_SIZE);
53 mySpinner.setIcon(TethysUICoreIcon.DYNAMICSPINNER);
54
55
56 thePanel = pFactory.paneFactory().newVBoxPane();
57 thePanel.addNode(mySpinner);
58 }
59
60 @Override
61 public TethysUINode getNode() {
62 return thePanel.getNode();
63 }
64
65 @Override
66 public void setEnabled(final boolean pEnabled) {
67 thePanel.setEnabled(pEnabled);
68 }
69
70 @Override
71 public void setVisible(final boolean pVisible) {
72 thePanel.setVisible(pVisible);
73 }
74
75 @Override
76 public Integer getId() {
77 return thePanel.getId();
78 }
79 }