.. | .. |
---|
67 | 67 | oe.aConstraints.gridwidth = 1; |
---|
68 | 68 | */ |
---|
69 | 69 | super.SetupUI2(oe); |
---|
70 | | - |
---|
71 | | - uDivsField = AddSlider(oe.ctrlPanel, "U #", biparam.minUDivs, 250+biparam.minUDivs, biparam.uDivs); |
---|
72 | | - Return(); |
---|
73 | | - vDivsField = AddSlider(oe.ctrlPanel, "V #", biparam.minVDivs, (int)(500/3.14)+biparam.minVDivs, biparam.vDivs); |
---|
74 | | - Return(); |
---|
| 70 | + |
---|
| 71 | + uvPanel = new cGridBag().setVertical(true); |
---|
| 72 | + |
---|
| 73 | + int count = 50; |
---|
| 74 | + |
---|
| 75 | + uDivsField = (cNumberSlider)AddSlider(uvPanel, "U #", biparam.minUDivs, (int)(count*this.biparam.uStretch()) + biparam.minUDivs, biparam.uDivs).getComponent(1); |
---|
| 76 | + vDivsField = (cNumberSlider)AddSlider(uvPanel, "V #", biparam.minVDivs, (int)(count) + biparam.minVDivs, biparam.vDivs).getComponent(1); |
---|
| 77 | + |
---|
| 78 | + oe.ctrlPanel.add(uvPanel); |
---|
| 79 | + oe.ctrlPanel.Return(); |
---|
75 | 80 | // oe.aConstraints.gridwidth = 1; |
---|
76 | 81 | // oe.aConstraints.fill = GridBagConstraints.VERTICAL; |
---|
77 | 82 | // oe.ctrlPanel.add(uDivsLabel = new JLabel("U #"), oe.aConstraints, oe.ctrlPanel.getComponentCount()-2); |
---|
.. | .. |
---|
98 | 103 | // oe.aConstraints.gridwidth = 1; |
---|
99 | 104 | if (biparam instanceof Cone) // ends) |
---|
100 | 105 | { |
---|
101 | | - oe.aConstraints.gridy += 1; |
---|
102 | | - oe.aConstraints.gridwidth = 3; |
---|
103 | | -// oe.aConstraints.anchor = GridBagConstraints.WEST; |
---|
104 | | - oe.ctrlPanel.add(optionCB = new JCheckBox("Close Surface", biparam.endcaps), oe.aConstraints, oe.ctrlPanel.getComponentCount()-2); |
---|
105 | | - optionCB.addItemListener(this); |
---|
106 | | -// oe.aConstraints.anchor = GridBagConstraints.EAST; |
---|
107 | | - oe.aConstraints.gridwidth = 1; |
---|
| 106 | + oe.ctrlPanel.add(optionCB = new JCheckBox("Close Surface", biparam.endcaps)); //, oe.aConstraints, oe.ctrlPanel.getComponentCount()-2); |
---|
| 107 | + optionCB.addItemListener(this); |
---|
| 108 | + oe.ctrlPanel.Return(); |
---|
108 | 109 | //endcaps.setState(!biparam.endcaps); |
---|
109 | 110 | } |
---|
110 | | - oe.aConstraints.gridy += 1; |
---|
111 | | - oe.aConstraints.gridx = 0; |
---|
112 | 111 | } |
---|
113 | 112 | |
---|
114 | 113 | void Clear() |
---|
.. | .. |
---|
143 | 142 | if (//e.getSource() == nameField || |
---|
144 | 143 | e.getSource() == optionCB) |
---|
145 | 144 | { |
---|
| 145 | + new Exception().printStackTrace(); |
---|
146 | 146 | //System.out.println(e); |
---|
147 | 147 | applySelf(); |
---|
148 | 148 | //super.applySelf(); |
---|
.. | .. |
---|
246 | 246 | // oe.ctrlPanel.remove(uDivsLabel); |
---|
247 | 247 | // oe.ctrlPanel.remove(vDivsLabel); |
---|
248 | 248 | // //oe.ctrlPanel.repaint(); |
---|
249 | | - Remove(uDivsField); |
---|
250 | | - Remove(vDivsField); |
---|
| 249 | +// Remove(uDivsField); |
---|
| 250 | +// Remove(vDivsField); |
---|
| 251 | + oe.ctrlPanel.remove(uvPanel); |
---|
251 | 252 | |
---|
252 | 253 | super.closeUI(); |
---|
253 | 254 | } |
---|
.. | .. |
---|
269 | 270 | cNumberSlider vDivsField; |
---|
270 | 271 | JCheckBox optionCB; |
---|
271 | 272 | |
---|
| 273 | + cGridBag uvPanel; |
---|
| 274 | + |
---|
272 | 275 | ObjectUI parent; |
---|
273 | 276 | |
---|
274 | 277 | //ObjEditor objEditor; |
---|