// 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, GroupEditor callee) { super(inBox, callee); //objEditor = new BiparamEditor(inCone, this, callee); objEditor = callee.GetEditor(); this.box = inBox; SetupUI2(GetEditor()); } BoxEditor(Box inBox, Object3D copy, GroupEditor callee) { super(inBox, copy, callee); new Exception().printStackTrace(); 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; } */ void SetupUI2(ObjEditor oe) { super.SetupUI2(oe); oe.ctrlPanel.add(optionCB = new JCheckBox("Close Surface", !box.open)); //, oe.aConstraints, oe.ctrlPanel.getComponentCount()-2); optionCB.addItemListener(this); oe.ctrlPanel.Return(); } public void itemStateChanged(ItemEvent e) { if (//e.getSource() == nameField || e.getSource() == optionCB) { box.open = (e.getStateChange() != ItemEvent.SELECTED); applySelf(); objEditor.refreshContents(); } else { super.itemStateChanged(e); } } public void closeUI() { ObjEditor oe = GetEditor(); oe.ctrlPanel.remove(optionCB); super.closeUI(); } 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; JCheckBox optionCB; }