// 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: CSGEditor.java import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; import java.util.Vector; class AttributeEditor extends ObjEditor implements ChangeListener, ActionListener, ObjectUI { AttributeEditor(Attribute t, GroupEditor callee) { super(t, callee); //objEditor = new GroupEditor(t, this, callee); objEditor = callee.GetEditor(); attribute = t; SetupUI2(GetEditor()); } AttributeEditor(Attribute t, Object3D copy, GroupEditor callee) { super(t, copy, callee); //objEditor = new GroupEditor(t, copy, callee); objEditor = this; attribute = (Attribute) copy; SetupUI2(GetEditor()); } void SetupUI2(ObjEditor oe) { super.SetupUI2(oe); // Shows composite UI !! //super.SetupName(oe); // oe.aConstraints.weighty = 0; // // oe.aConstraints.gridwidth = 1; // oe.aConstraints.fill = GridBagConstraints.HORIZONTAL; // oe.aConstraints.gridwidth = 1; // oe.aConstraints.anchor = GridBagConstraints.WEST; oe.ctrlPanel.add(cleardepth = new JCheckBox("Clear Depth", attribute.cleardepth)); //, oe.aConstraints, oe.ctrlPanel.getComponentCount() - 2); oe.ctrlPanel.Return(); // oe.aConstraints.gridx += 1; // oe.ctrlPanel.add(passtest = new JCheckBox("Write depth", attribute.passtest), oe.aConstraints, oe.ctrlPanel.getComponentCount() - 2); // oe.aConstraints.gridx += 1; oe.ctrlPanel.add(passtest = new JCheckBox("Pass Test", attribute.passtest)); //, oe.aConstraints, oe.ctrlPanel.getComponentCount() - 2); oe.ctrlPanel.Return(); // oe.aConstraints.gridx += 1; oe.ctrlPanel.add(backfacecull = new JCheckBox("Backface Cull", attribute.backfacecull)); //, oe.aConstraints, oe.ctrlPanel.getComponentCount() - 2); oe.ctrlPanel.Return(); // oe.aConstraints.gridx += 1; cleardepth.addItemListener(this); passtest.addItemListener(this); backfacecull.addItemListener(this); } public ObjEditor GetEditor() { return objEditor.GetEditor(); } void Clear() { objEditor.Clear(); attribute = null; } public void closeUI() { ObjEditor oe = GetEditor(); //if (oe == null) // return; cleardepth.removeItemListener(this); oe.ctrlPanel.remove(cleardepth); passtest.removeItemListener(this); oe.ctrlPanel.remove(passtest); backfacecull.removeItemListener(this); oe.ctrlPanel.remove(backfacecull); super.closeUI(); } public void itemStateChanged(ItemEvent e) { attribute.cleardepth = cleardepth.isSelected(); attribute.passtest = passtest.isSelected(); attribute.backfacecull = backfacecull.isSelected(); } // public void applySelf() // { // super.applySelf(); // // itemStateChanged(null); // } Attribute attribute; JCheckBox cleardepth; // JCheckBox writedepth; JCheckBox passtest; JCheckBox backfacecull; }