//////////////////////////////////////////////////////////////
// Graphit.java                            //
// Copyright © 1998-2001 Alan Cooper.                     //
///////////////////////////////////////////////////////////
import qpr.util.beanstuff.*; import qpr.math.plotkit.*;
import qpr.math.alg.*; import qpr.math.d2g.*;
import qpr.math.svf.*; import qpr.math.grf.*;
import qpr.util.colorstuff.*;import qpr.util.*;
import java.awt.*;import java.beans.*;
import java.applet.Applet;

/**@author Alan Cooper */
public class Graphit extends AppletAppBean
{
GraphWindow gw=new GraphWindow();
GraphSetManager gsm=new GraphSetManager();
ColorSelectPanel csp=gsm.getColorSelectPanel();
FunctionSetManager fsm=gsm.getFunctionSetManager();
ParamSetManager psm=gsm.getParamSetManager();

public Graphit(){setName("Graphit");
 setSize(800,500); setLayout(null);
 add(gw);gw.setBounds(200,0,400,480);
 add(gsm);gsm.setBounds(0,0,200,200);
 add(csp);csp.setBounds(0,200,200,200); listenForChangesFrom(csp);
 add(fsm);fsm.setBounds(600,200,200,200);
 add(psm);psm.setBounds(600,0,200,200);
gw.show(gsm);
}

public void propertyChange(PropertyChangeEvent e) {
if(e.getPropertyName().equals("colorSelecter"))
if(csp.isActive()){psm.setBounds(600,0,0,0);
                   fsm.setBounds(600,200,0,0);
                   csp.setBounds(600,0,200,400);
                  }
else{csp.setBounds(600,0,0,0);
     psm.setBounds(600,0,200,200);
     fsm.setBounds(600,200,200,200);
    }                                             }
 

public void init(){setSize(800,500);}
 

public static void main(String[] args){
 AppletApp a=new Graphit();
 frameIt(a);      }
 

}//endClass(Graphit)