Normand Briere
2018-07-03 02e145cb923d601395acc7f15ae9e13f85ef2fbb
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
65
66
67
68
69
// Decompiled by Jad v1.5.7b. Copyright 1997-99 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   BoxEditor.java
 
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
 
class BoxEditor extends ObjEditor
{
   
    BoxEditor(Box inBox, Object3D copy, GroupEditor callee)
    {
        super(inBox, copy, callee);
        box = (Box) copy;
        ctrlPanel.add(minLabel = new JLabel("Minima"), aConstraints);
       aConstraints.gridx += 1;
       aConstraints.fill = GridBagConstraints.HORIZONTAL;
       aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
        ctrlPanel.add(minimaField = new NumberField(), aConstraints);
       aConstraints.gridwidth = 1;
        minimaField.setVector(box.minima);
       aConstraints.gridx = 0;
       aConstraints.gridy += 1;
       aConstraints.fill = GridBagConstraints.NONE;
        ctrlPanel.add(maxLabel = new JLabel("Maxima"), aConstraints);
       aConstraints.gridx += 1;
       aConstraints.fill = GridBagConstraints.HORIZONTAL;
       aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
        ctrlPanel.add(maximaField = new NumberField(), aConstraints);
       aConstraints.gridwidth = 1;
        maximaField.setVector(box.maxima);
       aConstraints.fill = GridBagConstraints.NONE;
       aConstraints.gridx = 0;
       aConstraints.gridy += 1;
    }
   
   void Clear()
   {
       super.Clear();
 
       box = null;
   }
   
    /*
    public void doLayout()
    {
        super.doLayout();
        labelAndField(minLabel, minimaField);
        labelAndField(maxLabel, maximaField);
        widgetPos += 5;
    }
    */
    
    public void applySelf()
    {
// june 2013        super.applySelf();
        minimaField.getVector(box.minima);
        maximaField.getVector(box.maxima);
        box.recalculate();
    }
   
    Box box;
    JLabel minLabel;
    JLabel maxLabel;
    NumberField minimaField;
    NumberField maximaField;
}