package LLmomento2; /** * This type was created in VisualAge. */ public class LLapplet3dmomento2 extends java.applet.Applet implements java.awt.event.ActionListener, java.awt.event.ItemListener, java.beans.PropertyChangeListener { private LLlibreria.LLbarra ivjLLbarra1 = null; private LLlibreria.LLbutton ivjLLbutton1 = null; private LLlibreria.LLbutton ivjLLbutton11 = null; private LLlibreria.LLbutton ivjLLbutton12 = null; private LLcanvas3dmomento2 ivjLLcanvas1 = null; private LLlibreria.LLcontrolpanel ivjLLcontrolpanel1 = null; private LLlibreria.LLinputpanel ivjLLinputpanel1 = null; private LLlibreria.LLoutputpanel ivjLLoutputpanel1 = null; private LLlibreria.LLplot ivjLLplot11 = null; private LLlibreria.LLseleccion ivjLLseleccion1 = null; private LLlibreria.LLtextarea ivjLLtextarea1 = null; private LLlibreria.LLcheckbox ivjLLcheckbox1 = null; /** * Method to handle events for the ActionListener interface. * @param e java.awt.event.ActionEvent */ /* WARNING: THIS METHOD WILL BE REGENERATED. */ public void actionPerformed(java.awt.event.ActionEvent e) { // user code begin {1} // user code end if ((e.getSource() == getLLbutton1()) ) { connEtoM10(e); } if ((e.getSource() == getLLbutton11()) ) { connEtoM11(e); } if ((e.getSource() == getLLbutton12()) ) { connEtoM12(e); } // user code begin {2} // user code end } /** * connEtoM1: (LLcontrolpanel1.llncontrol --> LLcanvas1.llstatus(I)V) * @param arg1 java.beans.PropertyChangeEvent */ /* WARNING: THIS METHOD WILL BE REGENERATED. */ private void connEtoM1(java.beans.PropertyChangeEvent arg1) { try { // user code begin {1} // user code end getLLcanvas1().llstatus(getLLcontrolpanel1().getLlncontrol()); // user code begin {2} // user code end } catch (java.lang.Throwable ivjExc) { // user code begin {3} // user code end handleException(ivjExc); } } /** * connEtoM10: (LLbutton1.action.actionPerformed(java.awt.event.ActionEvent) --> LLinputpanel1.llfirecanvas(Ljava.lang.Object;)V) * @param arg1 java.awt.event.ActionEvent */ /* WARNING: THIS METHOD WILL BE REGENERATED. */ private void connEtoM10(java.awt.event.ActionEvent arg1) { try { // user code begin {1} // user code end getLLinputpanel1().llfirecanvas(getLLbutton1()); // user code begin {2} // user code end } catch (java.lang.Throwable ivjExc) { // user code begin {3} // user code end handleException(ivjExc); } } /** * connEtoM11: (LLbutton11.action.actionPerformed(java.awt.event.ActionEvent) --> LLinputpanel1.llfirecanvas(Ljava.lang.Object;)V) * @param arg1 java.awt.event.ActionEvent */ /* WARNING: THIS METHOD WILL BE REGENERATED. */ private void connEtoM11(java.awt.event.ActionEvent arg1) { try { // user code begin {1} // user code end getLLinputpanel1().llfirecanvas(getLLbutton11()); // user code begin {2} // user code end } catch (java.lang.Throwable ivjExc) { // user code begin {3} // user code end handleException(ivjExc); } } /** * connEtoM12: (LLbutton12.action.actionPerformed(java.awt.event.ActionEvent) --> LLinputpanel1.llfirecanvas(Ljava.lang.Object;)V) * @param arg1 java.awt.event.ActionEvent */ /* WARNING: THIS METHOD WILL BE REGENERATED. */ private void connEtoM12(java.awt.event.ActionEvent arg1) { try { // user code begin {1} // user code end getLLinputpanel1().llfirecanvas(getLLbutton12()); // user code begin {2} // user code end } catch (java.lang.Throwable ivjExc) { // user code begin {3} // user code end handleException(ivjExc); } } /** * connEtoM2: (LLinputpanel1.llselection --> LLcanvas1.llgetinputpanel(LLLlibreria.LLinputpanel;I)V) * @param arg1 java.beans.PropertyChangeEvent */ /* WARNING: THIS METHOD WILL BE REGENERATED. */ private void connEtoM2(java.beans.PropertyChangeEvent arg1) { try { // user code begin {1} // user code end getLLcanvas1().llgetinputpanel(getLLinputpanel1(), getLLinputpanel1().getLlselection()); // user code begin {2} // user code end } catch (java.lang.Throwable ivjExc) { // user code begin {3} // user code end handleException(ivjExc); } } /** * connEtoM3: (LLcanvas1.lldibuja --> LLoutputpanel1.lldibuja(LLLlibreria.LLcanvas;LLLlibreria.LLplot;LLLlibreria.LLplot;LLLlibreria.LLplot;LLLlibreria.LLtextarea;)V) * @param arg1 java.beans.PropertyChangeEvent */ /* WARNING: THIS METHOD WILL BE REGENERATED. */ private void connEtoM3(java.beans.PropertyChangeEvent arg1) { try { // user code begin {1} // user code end getLLoutputpanel1().lldibuja(getLLcanvas1(), getLLplot11(), new LLlibreria.LLplot(), new LLlibreria.LLplot(), getLLtextarea1()); // user code begin {2} // user code end } catch (java.lang.Throwable ivjExc) { // user code begin {3} // user code end handleException(ivjExc); } } /** * connEtoM4: (LLbarra1.llx --> LLinputpanel1.llfirecanvas(Ljava.lang.Object;)V) * @param arg1 java.beans.PropertyChangeEvent */ /* WARNING: THIS METHOD WILL BE REGENERATED. */ private void connEtoM4(java.beans.PropertyChangeEvent arg1) { try { // user code begin {1} // user code end getLLinputpanel1().llfirecanvas(getLLbarra1()); // user code begin {2} // user code end } catch (java.lang.Throwable ivjExc) { // user code begin {3} // user code end handleException(ivjExc); } } /** * connEtoM7: (LLseleccion1.item.itemStateChanged(java.awt.event.ItemEvent) --> LLinputpanel1.llfirecanvas(Ljava.lang.Object;)V) * @param arg1 java.awt.event.ItemEvent */ /* WARNING: THIS METHOD WILL BE REGENERATED. */ private void connEtoM7(java.awt.event.ItemEvent arg1) { try { // user code begin {1} // user code end getLLinputpanel1().llfirecanvas(getLLseleccion1()); // user code begin {2} // user code end } catch (java.lang.Throwable ivjExc) { // user code begin {3} // user code end handleException(ivjExc); } } /** * connEtoM9: (LLseleccion11.item.itemStateChanged(java.awt.event.ItemEvent) --> LLinputpanel1.llfirecanvas(Ljava.lang.Object;)V) * @param arg1 java.awt.event.ItemEvent */ /* WARNING: THIS METHOD WILL BE REGENERATED. */ private void connEtoM9(java.awt.event.ItemEvent arg1) { try { // user code begin {1} // user code end getLLinputpanel1().llfirecanvas(getLLcheckbox1()); // user code begin {2} // user code end } catch (java.lang.Throwable ivjExc) { // user code begin {3} // user code end handleException(ivjExc); } } /** * Gets the applet information. * @return java.lang.String */ public String getAppletInfo() { return "LLlibreria.LLaplet created using VisualAge for Java."; } /** * Return the LLbarra1 property value. * @return LLlibreria.LLbarra */ /* WARNING: THIS METHOD WILL BE REGENERATED. */ private LLlibreria.LLbarra getLLbarra1() { if (ivjLLbarra1 == null) { try { ivjLLbarra1 = new LLlibreria.LLbarra(); ivjLLbarra1.setName("LLbarra1"); ivjLLbarra1.setLabel1Text("par0"); ivjLLbarra1.setLlselection(1); ivjLLbarra1.setBackground(new java.awt.Color(33,150,181)); ivjLLbarra1.setBounds(123, -2, 68, 72); ivjLLbarra1.setForeground(java.awt.Color.black); // user code begin {1} // user code end } catch (java.lang.Throwable ivjExc) { // user code begin {2} // user code end handleException(ivjExc); } }; return ivjLLbarra1; } /** * Return the LLbutton1 property value. * @return LLlibreria.LLbutton */ /* WARNING: THIS METHOD WILL BE REGENERATED. */ private LLlibreria.LLbutton getLLbutton1() { if (ivjLLbutton1 == null) { try { ivjLLbutton1 = new LLlibreria.LLbutton(); ivjLLbutton1.setName("LLbutton1"); ivjLLbutton1.setLlselection(101); ivjLLbutton1.setBounds(4, 2, 38, 25); ivjLLbutton1.setForeground(java.awt.Color.black); ivjLLbutton1.setLabel("xy"); // user code begin {1} // user code end } catch (java.lang.Throwable ivjExc) { // user code begin {2} // user code end handleException(ivjExc); } }; return ivjLLbutton1; } /** * Return the LLbutton11 property value. * @return LLlibreria.LLbutton */ /* WARNING: THIS METHOD WILL BE REGENERATED. */ private LLlibreria.LLbutton getLLbutton11() { if (ivjLLbutton11 == null) { try { ivjLLbutton11 = new LLlibreria.LLbutton(); ivjLLbutton11.setName("LLbutton11"); ivjLLbutton11.setLlselection(102); ivjLLbutton11.setBounds(4, 27, 38, 25); ivjLLbutton11.setForeground(java.awt.Color.black); ivjLLbutton11.setLabel("xz"); // user code begin {1} // user code end } catch (java.lang.Throwable ivjExc) { // user code begin {2} // user code end handleException(ivjExc); } }; return ivjLLbutton11; } /** * Return the LLbutton12 property value. * @return LLlibreria.LLbutton */ /* WARNING: THIS METHOD WILL BE REGENERATED. */ private LLlibreria.LLbutton getLLbutton12() { if (ivjLLbutton12 == null) { try { ivjLLbutton12 = new LLlibreria.LLbutton(); ivjLLbutton12.setName("LLbutton12"); ivjLLbutton12.setLlselection(103); ivjLLbutton12.setBounds(4, 51, 38, 25); ivjLLbutton12.setForeground(java.awt.Color.black); ivjLLbutton12.setLabel("yz"); // user code begin {1} // user code end } catch (java.lang.Throwable ivjExc) { // user code begin {2} // user code end handleException(ivjExc); } }; return ivjLLbutton12; } /** * Return the LLcanvas1 property value. * @return LLmomento2.LLcanvas3dmomento2 */ /* WARNING: THIS METHOD WILL BE REGENERATED. */ private LLcanvas3dmomento2 getLLcanvas1() { if (ivjLLcanvas1 == null) { try { ivjLLcanvas1 = new LLmomento2.LLcanvas3dmomento2(); ivjLLcanvas1.setName("LLcanvas1"); ivjLLcanvas1.setBounds(7, 83, 518, 409); // user code begin {1} // user code end } catch (java.lang.Throwable ivjExc) { // user code begin {2} // user code end handleException(ivjExc); } }; return ivjLLcanvas1; } /** * Return the LLcheckbox1 property value. * @return LLlibreria.LLcheckbox */ /* WARNING: THIS METHOD WILL BE REGENERATED. */ private LLlibreria.LLcheckbox getLLcheckbox1() { if (ivjLLcheckbox1 == null) { try { ivjLLcheckbox1 = new LLlibreria.LLcheckbox(); ivjLLcheckbox1.setName("LLcheckbox1"); ivjLLcheckbox1.setLlselection(201); ivjLLcheckbox1.setBounds(545, 24, 61, 23); ivjLLcheckbox1.setForeground(java.awt.Color.yellow); ivjLLcheckbox1.setLabel("LLcheckbox1"); // user code begin {1} // user code end } catch (java.lang.Throwable ivjExc) { // user code begin {2} // user code end handleException(ivjExc); } }; return ivjLLcheckbox1; } /** * Return the LLcontrolpanel1 property value. * @return LLlibreria.LLcontrolpanel */ /* WARNING: THIS METHOD WILL BE REGENERATED. */ private LLlibreria.LLcontrolpanel getLLcontrolpanel1() { if (ivjLLcontrolpanel1 == null) { try { ivjLLcontrolpanel1 = new LLlibreria.LLcontrolpanel(); ivjLLcontrolpanel1.setName("LLcontrolpanel1"); ivjLLcontrolpanel1.setBounds(6, 5, 103, 73); // user code begin {1} // user code end } catch (java.lang.Throwable ivjExc) { // user code begin {2} // user code end handleException(ivjExc); } }; return ivjLLcontrolpanel1; } /** * Return the LLinputpanel1 property value. * @return LLlibreria.LLinputpanel */ /* WARNING: THIS METHOD WILL BE REGENERATED. */ private LLlibreria.LLinputpanel getLLinputpanel1() { if (ivjLLinputpanel1 == null) { try { ivjLLinputpanel1 = new LLlibreria.LLinputpanel(); ivjLLinputpanel1.setName("LLinputpanel1"); ivjLLinputpanel1.setLayout(null); ivjLLinputpanel1.setBackground(new java.awt.Color(33,150,180)); ivjLLinputpanel1.setBounds(116, 2, 634, 78); ivjLLinputpanel1.setForeground(java.awt.Color.white); getLLinputpanel1().add(getLLbarra1(), getLLbarra1().getName()); getLLinputpanel1().add(getLLseleccion1(), getLLseleccion1().getName()); getLLinputpanel1().add(getLLbutton1(), getLLbutton1().getName()); getLLinputpanel1().add(getLLbutton11(), getLLbutton11().getName()); getLLinputpanel1().add(getLLbutton12(), getLLbutton12().getName()); getLLinputpanel1().add(getLLcheckbox1(), getLLcheckbox1().getName()); // user code begin {1} // user code end } catch (java.lang.Throwable ivjExc) { // user code begin {2} // user code end handleException(ivjExc); } }; return ivjLLinputpanel1; } /** * Return the LLoutputpanel1 property value. * @return LLlibreria.LLoutputpanel */ /* WARNING: THIS METHOD WILL BE REGENERATED. */ private LLlibreria.LLoutputpanel getLLoutputpanel1() { if (ivjLLoutputpanel1 == null) { try { ivjLLoutputpanel1 = new LLlibreria.LLoutputpanel(); ivjLLoutputpanel1.setName("LLoutputpanel1"); ivjLLoutputpanel1.setLayout(null); ivjLLoutputpanel1.setBounds(540, 84, 201, 408); getLLoutputpanel1().add(getLLplot11(), getLLplot11().getName()); getLLoutputpanel1().add(getLLtextarea1(), getLLtextarea1().getName()); // user code begin {1} // user code end } catch (java.lang.Throwable ivjExc) { // user code begin {2} // user code end handleException(ivjExc); } }; return ivjLLoutputpanel1; } /** * Return the LLplot11 property value. * @return LLlibreria.LLplot */ /* WARNING: THIS METHOD WILL BE REGENERATED. */ private LLlibreria.LLplot getLLplot11() { if (ivjLLplot11 == null) { try { ivjLLplot11 = new LLlibreria.LLplot(); ivjLLplot11.setName("LLplot11"); ivjLLplot11.setBounds(0, 0, 191, 204); // user code begin {1} // user code end } catch (java.lang.Throwable ivjExc) { // user code begin {2} // user code end handleException(ivjExc); } }; return ivjLLplot11; } /** * Return the LLseleccion1 property value. * @return LLlibreria.LLseleccion */ /* WARNING: THIS METHOD WILL BE REGENERATED. */ private LLlibreria.LLseleccion getLLseleccion1() { if (ivjLLseleccion1 == null) { try { ivjLLseleccion1 = new LLlibreria.LLseleccion(); ivjLLseleccion1.setName("LLseleccion1"); ivjLLseleccion1.setLlselection(11); String ivjLocal0llmischoices [] = { "a1", "a2"}; ivjLLseleccion1.setLlmischoices(ivjLocal0llmischoices); ivjLLseleccion1.setBounds(430, 24, 61, 30); ivjLLseleccion1.setForeground(java.awt.Color.yellow); ivjLLseleccion1.setBackground(new java.awt.Color(33,150,181)); // user code begin {1} // user code end } catch (java.lang.Throwable ivjExc) { // user code begin {2} // user code end handleException(ivjExc); } }; return ivjLLseleccion1; } /** * Return the LLtextarea1 property value. * @return LLlibreria.LLtextarea */ /* WARNING: THIS METHOD WILL BE REGENERATED. */ private LLlibreria.LLtextarea getLLtextarea1() { if (ivjLLtextarea1 == null) { try { ivjLLtextarea1 = new LLlibreria.LLtextarea(); ivjLLtextarea1.setName("LLtextarea1"); ivjLLtextarea1.setBackground(new java.awt.Color(33,130,161)); ivjLLtextarea1.setBounds(18, 212, 172, 180); // user code begin {1} // user code end } catch (java.lang.Throwable ivjExc) { // user code begin {2} // user code end handleException(ivjExc); } }; return ivjLLtextarea1; } /** * Called whenever the part throws an exception. * @param exception java.lang.Throwable */ private void handleException(Throwable exception) { /* Uncomment the following lines to print uncaught exceptions to stdout */ // System.out.println("--------- UNCAUGHT EXCEPTION ---------"); // exception.printStackTrace(System.out); } /** * Handle the Applet init method. */ /* WARNING: THIS METHOD WILL BE REGENERATED. */ public void init() { super.init(); try { setName("LLaplet"); setLayout(null); setBackground(new java.awt.Color(33,130,160)); setSize(750, 500); add(getLLcontrolpanel1(), getLLcontrolpanel1().getName()); add(getLLinputpanel1(), getLLinputpanel1().getName()); add(getLLcanvas1(), getLLcanvas1().getName()); add(getLLoutputpanel1(), getLLoutputpanel1().getName()); initConnections(); // user code begin {1} // user code end } catch (java.lang.Throwable ivjExc) { // user code begin {2} // user code end handleException(ivjExc); } } /** * Initializes connections */ /* WARNING: THIS METHOD WILL BE REGENERATED. */ private void initConnections() { // user code begin {1} // user code end getLLbarra1().addPropertyChangeListener(this); getLLseleccion1().addItemListener(this); getLLbutton1().addActionListener(this); getLLbutton11().addActionListener(this); getLLbutton12().addActionListener(this); getLLcheckbox1().addItemListener(this); getLLcontrolpanel1().addPropertyChangeListener(this); getLLinputpanel1().addPropertyChangeListener(this); getLLcanvas1().addPropertyChangeListener(this); } /** * Method to handle events for the ItemListener interface. * @param e java.awt.event.ItemEvent */ /* WARNING: THIS METHOD WILL BE REGENERATED. */ public void itemStateChanged(java.awt.event.ItemEvent e) { // user code begin {1} // user code end if ((e.getSource() == getLLseleccion1()) ) { connEtoM7(e); } if ((e.getSource() == getLLcheckbox1()) ) { connEtoM9(e); } // user code begin {2} // user code end } /** * main entrypoint - starts the part when it is run as an application * @param args java.lang.String[] */ public static void main(java.lang.String[] args) { try { java.awt.Frame frame; try { Class aFrameClass = Class.forName("com.ibm.uvm.abt.edit.TestFrame"); frame = (java.awt.Frame)aFrameClass.newInstance(); } catch (java.lang.Throwable ivjExc) { frame = new java.awt.Frame(); } LLapplet3dmomento2 aLLaplet; Class iiCls = Class.forName("LLlibreria.LLaplet"); ClassLoader iiClsLoader = iiCls.getClassLoader(); aLLaplet = (LLapplet3dmomento2)java.beans.Beans.instantiate(iiClsLoader,"LLlibreria.LLaplet"); frame.add("Center", aLLaplet); frame.setSize(aLLaplet.getSize()); frame.setVisible(true); } catch (Throwable exception) { System.err.println("Exception occurred in main() of java.applet.Applet"); exception.printStackTrace(System.out); } } /** * Method to handle events for the PropertyChangeListener interface. * @param evt java.beans.PropertyChangeEvent */ /* WARNING: THIS METHOD WILL BE REGENERATED. */ public void propertyChange(java.beans.PropertyChangeEvent evt) { // user code begin {1} // user code end if ((evt.getSource() == getLLbarra1()) && (evt.getPropertyName().equals("llx"))) { connEtoM4(evt); } if ((evt.getSource() == getLLcontrolpanel1()) && (evt.getPropertyName().equals("llncontrol"))) { connEtoM1(evt); } if ((evt.getSource() == getLLinputpanel1()) && (evt.getPropertyName().equals("llselection"))) { connEtoM2(evt); } if ((evt.getSource() == getLLcanvas1()) && (evt.getPropertyName().equals("lldibuja"))) { connEtoM3(evt); } // user code begin {2} // user code end } /** * This method was created in VisualAge. */ public void stop() { getLLcanvas1().stop(); } }