/** * Complete Control Panel for DifEqnAp.class * @author Robert J Morton UK-YE572246C * @version 27 November 1997 modified 07 August 2009, 18 April 2012 */ /* This Panel class contains 6 sub panels: The SelPer panel, the SelEqn panel, the SelScan panel, the SetCval panel, the IncCval panel and the SetButt panel, each of which is implemented in a class bearing its respective name. */ import java.awt.*; // for graphics operations (GUI) import javax.swing.*; // library for constructing Swing GUI public class ctrlpanl extends JPanel { ctrlpanl(difeqnap ap, timegr tg, bouncegr bg, formula f) { setLayout(null); // allow free laying out of components on panel Color pc = new Color(238, 238, 238); // panel colour setFont(new Font("Sans", Font.PLAIN, 14)); /* Create an instance of a Period Selector panel, add it to this, the main control panel, and morph it into the required space. */ selper sp = new selper(ap, pc); add(sp); sp.setBounds(5, 5, 100, 135); /* Create an instance of a Start/Stop/Reset panel, add it to this, the main control panel, and morph it into the required space. */ setbutt sb = new setbutt(ap, tg, bg, f); add(sb); sb.setBounds(5, 145, 230, 35); /* inform the main applet the time-graph class of setbutt's instance reference. */ ap.setSB(sb); tg.setSB(sb); /* Create an instance of a Scan Mode Selector panel, add it to this, the main control panel, and morph it into the required space. */ selscan ss = new selscan(tg, sb, pc); add(ss); ss.setBounds(240, 90, 130, 80); /* Create an instance of a Plot Mode Selector panel, add it to this, the main control panel, and morph it into the required space. */ selplot st = new selplot(sb, ss, tg, pc); add(st); st.setBounds(240, 5, 130, 80); ss.setST(st); //advise selscan of selplot's instance reference /* Create an instance of a c-value entry/adjustment panel, add it to the main control panel, and morph it into the required space. */ cval cv = new cval(sb, f, pc); add(cv); cv.setBounds(110, 90, 125, 50); /* Create an instance of an equation selector panel, add it to the main control panel, and morph it into the required space. */ seleqn se = new seleqn(cv, tg, bg, f, pc); add(se); se.setBounds(110, 5, 125, 80); } }