// 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: SphereEditor.java
|
|
import java.awt.*;
|
import java.awt.event.*;
|
import javax.swing.*;
|
import javax.swing.event.*;
|
|
import grafeme.ui.*;
|
|
class KleinEditor extends BiparamEditor implements ActionListener, ObjectUI
|
{
|
KleinEditor(Klein inSph, GroupEditor callee)
|
{
|
super(inSph, callee); // false);
|
//objEditor = new BiparamEditor(inSph, this, callee); // false);
|
objEditor = callee.GetEditor();
|
//parent = this;
|
klein = inSph;
|
|
SetupUI2(objEditor);
|
}
|
|
KleinEditor(Klein inSph, Object3D copy, GroupEditor callee)
|
{
|
super(inSph, copy, null, callee); // false);
|
//objEditor = new BiparamEditor(inSph, copy, this, callee); // false);
|
//parent = this;
|
objEditor = this;
|
klein = (Klein) copy;
|
|
//SetupUI(objEditor);
|
}
|
|
void SetupUI2(ObjEditor oe)
|
{
|
super.SetupUI2(oe);
|
|
radiusPanel = AddSlider(oe.ctrlPanel, "Radius:", 0, 20.0, klein.radius, 1);
|
this.radiusField = (cNumberSlider)radiusPanel.getComponent(1);
|
oe.ctrlPanel.Return();
|
}
|
|
void Clear()
|
{
|
objEditor.Clear();
|
|
klein = null;
|
}
|
|
/*
|
public void doLayout()
|
{
|
super.doLayout();
|
labelAndField(centerLabel, centerField);
|
labelAndField(radiusLabel, radiusField);
|
widgetPos += 5;
|
}
|
*/
|
|
/**/
|
// public void actionPerformed(ActionEvent e)
|
// {
|
// if (e.getSource() == centerField ||
|
// e.getSource() == radiusField)
|
// {
|
// applySelf();
|
// refreshContents();
|
// }
|
// else
|
// super.actionPerformed(e);
|
// }
|
/**/
|
|
public void stateChanged(ChangeEvent e)
|
{
|
//System.out.println("Klein :: stateChanged");
|
if (e.getSource() == radiusField)
|
{
|
applySelf();
|
//super.applySelf();
|
objEditor.refreshContents();
|
//Refresh();
|
}
|
else
|
super.stateChanged(e);
|
}
|
|
public void applySelf()
|
{
|
super.applySelf();
|
|
klein.radius = radiusField.getFloat();
|
klein.recalculate();
|
}
|
|
Klein klein;
|
cNumberSlider radiusField;
|
|
cGridBag radiusPanel;
|
|
public ObjEditor GetEditor()
|
{
|
//new Exception().printStackTrace();
|
return objEditor; // .GetEditor();
|
}
|
|
public void closeUI2()
|
{
|
objEditor.closeUI();
|
}
|
|
public void closeUI()
|
{
|
//Remove(radiusField);
|
|
objEditor.ctrlPanel.remove(radiusPanel);
|
super.closeUI();
|
}
|
|
void refreshContents2()
|
{
|
objEditor.refreshContents();
|
}
|
|
//BiparamEditor objEditor;
|
}
|