// 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: LatheEditor.java import java.awt.*; import java.awt.event.*; import javax.swing.*; class LatheEditor extends /*Biparam*/ObjEditor implements ActionListener //, ObjectUI { LatheEditor(Lathe inLathe, GroupEditor callee) { super(inLathe, callee); lathe = (Lathe) inLathe; spline = lathe.spline; objEditor = callee.GetEditor(); SetupUI2(callee.GetEditor()); } LatheEditor(Lathe inLathe, Object3D copy, GroupEditor callee) { super(inLathe, copy, null, callee); // false); //parent = this; lathe = (Lathe) copy; spline = lathe.spline; objEditor = this; SetupWindow(); SetupUI2(this); } void SetupUI2(ObjEditor oe) { super.SetupUI2(oe); oe.ctrlPanel.add(typeLabel = new JLabel("Spline Type:")); //, oe.aConstraints, oe.ctrlPanel.getComponentCount()-2); oe.ctrlPanel.Return(); oe.ctrlPanel.add(typeMenu = new JComboBox()); //, oe.aConstraints, oe.ctrlPanel.getComponentCount()-2); typeMenu.addActionListener(this); oe.ctrlPanel.Return(); typeMenu.addItem("Linear"); typeMenu.addItem("Quadratic"); typeMenu.addItem("Cubic"); //typeMenu.select(spline.type - 1); /* oe.aConstraints.gridwidth = ObjEditor.GRIDWIDTH; oe.ctrlPanel.add(prompt = new JLabel("Ctrl key inserts/deletes"), oe.aConstraints); oe.aConstraints.gridwidth = 1; oe.topView.object = spline; oe.aConstraints.gridx = 0; oe.aConstraints.gridy += 1; */ } void refreshContents2() { objEditor.refreshContents(); } void Clear() { super.Clear(); lathe = null; spline = null; } public void closeUI() { ObjEditor oe = GetEditor(); typeMenu.removeActionListener(this); oe.ctrlPanel.remove(typeMenu); oe.ctrlPanel.remove(typeLabel); //oe.ctrlPanel.repaint(); super.closeUI(); } public void actionPerformed(ActionEvent e) { if (e.getSource() == typeMenu) { //System.out.println(e); applySelf(); //refreshContents(); client.refreshEditWindow(); } else super.actionPerformed(e); } /* public void doLayout() { super.doLayout(); labelAndField(typeLabel, typeMenu); prompt.setBounds(5, widgetPos, 190, textHeight); } */ public boolean action(Event event, Object obj) { if (event.target == typeMenu) { spline.type = typeMenu.getSelectedIndex() + 1; topView.repaint(); return true; } else { return super.action(event, obj); } } public void applySelf() { // june 2013 super.applySelf(); spline.type = typeMenu.getSelectedIndex() + 1; lathe.recalculate(); } Lathe lathe; Spline spline; JLabel typeLabel; JComboBox typeMenu; JLabel prompt; }