.. | .. |
---|
43 | 43 | { |
---|
44 | 44 | super.SetupUI2(oe); |
---|
45 | 45 | |
---|
46 | | - oe.ctrlPanel.add(thresholdLabel = new JLabel("Threshold"), oe.aConstraints, oe.ctrlPanel.getComponentCount()-2); |
---|
47 | | - oe.aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
48 | | - oe.aConstraints.gridx += 1; |
---|
49 | | - oe.aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
50 | | - oe.ctrlPanel.add(thresholdField = new NumberField(), oe.aConstraints, oe.ctrlPanel.getComponentCount()-2); |
---|
51 | | - thresholdField.addActionListener(this); |
---|
52 | | - oe.aConstraints.gridwidth = 1; |
---|
53 | | - thresholdField.setFloat(blob.threshold); |
---|
54 | | - oe.aConstraints.fill = 0; |
---|
55 | | - oe.aConstraints.gridx = 0; |
---|
56 | | - oe.aConstraints.gridy += 1; |
---|
57 | | - oe.aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
58 | | - oe.ctrlPanel.add(newButton = new JButton("New Ball"), oe.aConstraints, oe.ctrlPanel.getComponentCount()-2); |
---|
59 | | - newButton.addActionListener(this); |
---|
60 | | - oe.aConstraints.gridx += 2; |
---|
61 | | - oe.ctrlPanel.add(deleteButton = new JButton("Delete Ball"), oe.aConstraints, oe.ctrlPanel.getComponentCount()-2); |
---|
62 | | - deleteButton.addActionListener(this); |
---|
63 | | - oe.aConstraints.gridwidth = 1; |
---|
64 | | - oe.aConstraints.gridx = 0; |
---|
65 | | - oe.aConstraints.gridy += 1; |
---|
66 | | - oe.ctrlPanel.add(strengthLabel = new JLabel("Strength"), oe.aConstraints, oe.ctrlPanel.getComponentCount()-2); |
---|
67 | | - oe.aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
68 | | - oe.aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
69 | | - oe.aConstraints.gridx += 1; |
---|
70 | | - oe.ctrlPanel.add(strengthField = new NumberField(), oe.aConstraints, oe.ctrlPanel.getComponentCount()-2); |
---|
71 | | - strengthField.addActionListener(this); |
---|
72 | | - oe.aConstraints.gridwidth = 1; |
---|
73 | | - toCompFields(); |
---|
74 | | - oe.aConstraints.fill = 0; |
---|
75 | | - oe.aConstraints.gridx = 0; |
---|
76 | | - oe.aConstraints.gridy += 1; |
---|
77 | | - |
---|
78 | | - oe.ctrlPanel.add(sizeLabel = new JLabel("Depth"), oe.aConstraints, oe.ctrlPanel.getComponentCount()-2); |
---|
79 | | - oe.aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
80 | | - oe.aConstraints.gridx += 1; |
---|
81 | | - oe.aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
82 | | - oe.ctrlPanel.add(sizeField = new NumberField(), oe.aConstraints, oe.ctrlPanel.getComponentCount()-2); |
---|
83 | | - sizeField.addActionListener(this); |
---|
84 | | - oe.aConstraints.gridwidth = 1; |
---|
85 | | - sizeField.setFloat(blob.cellSize); |
---|
86 | | - oe.aConstraints.gridy += 1; |
---|
87 | | - oe.aConstraints.fill = 0; |
---|
88 | | - oe.aConstraints.gridx = 0; |
---|
| 46 | + oe.ctrlPanel.add(thresholdLabel = new JLabel("Threshold:")); //, oe.aConstraints, oe.ctrlPanel.getComponentCount()-2); |
---|
89 | 47 | |
---|
90 | | - oe.ctrlPanel.add(tolLabel = new JLabel("Tolerance"), oe.aConstraints, oe.ctrlPanel.getComponentCount()-2); |
---|
91 | | - oe.aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
92 | | - oe.aConstraints.gridx += 1; |
---|
93 | | - oe.aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
94 | | - oe.ctrlPanel.add(tolField = new NumberField(), oe.aConstraints, oe.ctrlPanel.getComponentCount()-2); |
---|
| 48 | + oe.ctrlPanel.Return(); |
---|
| 49 | + |
---|
| 50 | + oe.ctrlPanel.add(thresholdField = new NumberField()); //, oe.aConstraints, oe.ctrlPanel.getComponentCount()-2); |
---|
| 51 | + thresholdField.addActionListener(this); |
---|
| 52 | + thresholdField.setFloat(blob.threshold); |
---|
| 53 | + |
---|
| 54 | + oe.ctrlPanel.Return(); |
---|
| 55 | + |
---|
| 56 | + oe.ctrlPanel.add(newButton = new JButton("New Ball")); //, oe.aConstraints, oe.ctrlPanel.getComponentCount()-2); |
---|
| 57 | + newButton.addActionListener(this); |
---|
| 58 | + oe.ctrlPanel.Return(); |
---|
| 59 | + |
---|
| 60 | + oe.ctrlPanel.add(deleteButton = new JButton("Delete Ball")); //, oe.aConstraints, oe.ctrlPanel.getComponentCount()-2); |
---|
| 61 | + deleteButton.addActionListener(this); |
---|
| 62 | + oe.ctrlPanel.Return(); |
---|
| 63 | + |
---|
| 64 | + /* |
---|
| 65 | + oe.ctrlPanel.add(strengthLabel = new JLabel("Strength:")); //, oe.aConstraints, oe.ctrlPanel.getComponentCount()-2); |
---|
| 66 | + |
---|
| 67 | + oe.ctrlPanel.Return(); |
---|
| 68 | + |
---|
| 69 | + oe.ctrlPanel.add(strengthField = new NumberField()); //, oe.aConstraints, oe.ctrlPanel.getComponentCount()-2); |
---|
| 70 | + strengthField.addActionListener(this); |
---|
| 71 | + |
---|
| 72 | + oe.ctrlPanel.Return(); |
---|
| 73 | + */ |
---|
| 74 | + |
---|
| 75 | + toCompFields(); |
---|
| 76 | + |
---|
| 77 | + oe.ctrlPanel.add(sizeLabel = new JLabel("Depth:")); //, oe.aConstraints, oe.ctrlPanel.getComponentCount()-2); |
---|
| 78 | + |
---|
| 79 | + oe.ctrlPanel.Return(); |
---|
| 80 | + |
---|
| 81 | + oe.ctrlPanel.add(sizeField = new NumberField()); //, oe.aConstraints, oe.ctrlPanel.getComponentCount()-2); |
---|
| 82 | + sizeField.addActionListener(this); |
---|
| 83 | + sizeField.setFloat(blob.cellSize); |
---|
| 84 | + |
---|
| 85 | + oe.ctrlPanel.Return(); |
---|
| 86 | + |
---|
| 87 | + oe.ctrlPanel.add(tolLabel = new JLabel("Tolerance:")); //, oe.aConstraints, oe.ctrlPanel.getComponentCount()-2); |
---|
| 88 | + |
---|
| 89 | + oe.ctrlPanel.Return(); |
---|
| 90 | + |
---|
| 91 | + oe.ctrlPanel.add(tolField = new NumberField()); //, oe.aConstraints, oe.ctrlPanel.getComponentCount()-2); |
---|
95 | 92 | tolField.addActionListener(this); |
---|
96 | | - oe.aConstraints.gridwidth = 1; |
---|
97 | | - tolField.setFloat(blob.tolerance); |
---|
98 | | - oe.aConstraints.gridy += 1; |
---|
99 | | - oe.aConstraints.fill = 0; |
---|
100 | | - oe.aConstraints.gridx = 0; |
---|
| 93 | + tolField.setFloat(blob.tolerance); |
---|
| 94 | + |
---|
| 95 | + oe.ctrlPanel.Return(); |
---|
101 | 96 | } |
---|
102 | 97 | |
---|
103 | 98 | public void closeUI() |
---|