forked from macster110/PAMGuard_DeepLearningSegmenter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDLControlGUI.java
More file actions
64 lines (54 loc) · 1.73 KB
/
DLControlGUI.java
File metadata and controls
64 lines (54 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
package rawDeepLearningClassifier;
import PamController.PamController;
import PamController.PamControllerInterface;
import PamController.SettingsPane;
import pamViewFX.PamControlledGUIFX;
/**
* The JavaFX GUI for the DLControl...
* @author Jamie Macaulay
*
*/
public class DLControlGUI extends PamControlledGUIFX {
/**
* The dl control.
*/
private DLControl dlControl;
public DLControlGUI(DLControl dlcontrol) {
this.dlControl = dlcontrol;
}
/**
* The settings pane contains ALL possible setting for the module in one placed.
* Settings panes can be divided into tabs for more space etc.
*
* @param <T>
* @return a Pane containing controls to change settings for module.
*/
public SettingsPane<?> getSettingsPane(){
dlControl.getSettingsPane().setParams(dlControl.getDLParams());
return dlControl.getSettingsPane();
}
@Override
public void updateParams() {
RawDLParams newParams=dlControl.getSettingsPane().getParams(dlControl.getDLParams());
if (newParams!=null) {
dlControl.setParams(newParams);
}
//setup the controlled unit.
dlControl.setupControlledUnit();
}
@Override
public void notifyGUIChange(int changeType) {
switch (changeType) {
case PamController.INITIALIZATION_COMPLETE:
break;
case PamControllerInterface.CHANGED_PROCESS_SETTINGS:
//data source may have potentially changed. e.g. by a datamodelfx Need to set in params.
//System.out.println("FFTControl: CHANGED_PROCESS_SETTINGS : " +fftProcess.getParentDataBlock());
if (dlControl.getParentDataBlock()!=null){
dlControl.getDLParams().groupedSourceParams.setDataSource(dlControl.getParentDataBlock().getDataName());
}
else dlControl.getDLParams().groupedSourceParams.setDataSource("");
break;
}
}
}