Logo Search packages:      
Sourcecode: jfractionlab version File versions  Download package

jfractionlab::excerciseDialogs::ImproperFraction::ImproperFraction ( JFractionLab  owner,
int  lx,
int  ly,
int  sx,
int  sy 
) throws HeadlessException [inline]

Parameters:
owner 
lx 
ly 
sx 
sy 
Exceptions:
HeadlessException 

Definition at line 94 of file ImproperFraction.java.

                                                                                                           {
            super(lx, ly, sx, sy);
            setTitle(lang.Messages.getString("improper_frac_2_mixed_nb"));
            this.owner = owner;
            
            rb_random.addActionListener(this);
            jmOptions.add(rb_random);
            rb_custom.addActionListener(this);
            jmOptions.add(rb_custom);
            jmOptions.addSeparator();
            rb_visible.addActionListener(this);
            jmOptions.add(rb_visible);
            rb_invisible.addActionListener(this);
            jmOptions.add(rb_invisible);
            jmb.add(jmOptions);
            jmiHelp.addActionListener(this);
            jmb.add(jmHelp);
            setJMenuBar(jmb);
            
            
            double width_of_pizzaplace = 0.45;
            double sizes[][] = {{
                  // Spalten
                  5,//0
                  width_of_pizzaplace/6,//1
                  width_of_pizzaplace/6,//2
                  width_of_pizzaplace/6,//3
                  width_of_pizzaplace/6,//4
                  width_of_pizzaplace/6,//5
                  width_of_pizzaplace/6,//6
                  12,//7
                  width_of_pizzaplace/4,//8
                  width_of_pizzaplace/4,//9
                  width_of_pizzaplace/4,//10
                  width_of_pizzaplace/4,//11
                  TableLayout.FILL,//12
                  5//13
            },{
                  //Zeilen
                  5,//0jflTextResource.properties
                  TableLayout.FILL,//1
                  20,//2
                  TableLayout.FILL,//3
                  0.4,//4
                  0.4,//5
                  TableLayout.FILL,//6
                  5//7
            }};
            Container content = getContentPane();
            content.setLayout(new TableLayout(sizes));
            content.setBackground(Color.white);
            //--links
                  addTextField(tf_mixedNBNumber);
                  tf_mixedNBNumber.addKeyListener(this);
                  tf_mixedNBNumber.setEditable(false);
            content.add(tf_mixedNBNumber, "9,1,9,3,c,c");
                  addTextField(tf_mixedNBNumerator);
                  tf_mixedNBNumerator.addKeyListener(this);
                  tf_mixedNBNumerator.setEditable(false);
            content.add(tf_mixedNBNumerator, "10,1,c,b");
                  addTextField(tf_mixedNBDenominator);
                  tf_mixedNBDenominator.setEditable(false);
            content.add(tf_mixedNBDenominator, "10,3,c,t");
            //--rechts
                  addTextField(tf_improperFractionNumerator);
                  tf_improperFractionNumerator.addKeyListener(this);
                  tf_improperFractionNumerator.setEditable(false);
            content.add(tf_improperFractionNumerator, "3,1,4,1,c,b");
                  addTextField(tf_improperFractionDenominator);
                  tf_improperFractionDenominator.addKeyListener(this);
                  tf_improperFractionDenominator.setEditable(false);
            content.add(tf_improperFractionDenominator, "3,3,4,3,c,t");

            //--Zeichen
            JLabel lb_gleich1 = new JLabel("=", JLabel.CENTER);
            content.add(lb_gleich1, "7,2");
            FractionBar bs_fraction1 = new FractionBar();
            content.add(bs_fraction1, "10,2");
            FractionBar bs_fraction2 = new FractionBar();
            content.add(bs_fraction2, "3,2,4,2");
            //--Pizzen
            content.add(pizzaPlace[0], "1,4,3,4");
            content.add(pizzaPlace[1], "1,5,3,5");
            content.add(pizzaPlace[2], "4,4,6,4");
            content.add(pizzaPlace[3], "4,5,6,5");
            content.add(pizzaPlace[4], "8,4,9,4");
            content.add(pizzaPlace[5], "8,5,9,5");
            content.add(pizzaPlace[6], "10,4,11,4");
            content.add(pizzaPlace[7], "10,5,11,5");
            //--Controls
                  btn_continue = new JButton(lang.Messages.getString("continue"));
                  btn_continue.addActionListener(this);
                  btn_continue.addKeyListener(this);
                  btn_continue.setFocusTraversalKeysEnabled(false);
            content.add(btn_continue, "12,1,c,c");
            
                  btn_tipp = new JButton(lang.Messages.getString("Tipp"));
                  btn_tipp.addActionListener(this);
                  btn_tipp.setEnabled(false);
            content.add(btn_tipp, "12,4,f,c");
            
                  btn_end =  new JButton(lang.Messages.getString("end"));
                  btn_end.addActionListener(this);
            content.add(btn_end, "12,3,c,c");
            content.add(pdsp, "12,5");
                  lb_info.setFont(JFractionLab.infofont);
                  lb_info.setText(lang.Messages.getString("you_just_need_nb_and_enter"));
            content.add(lb_info, "1,6,11,6");

            points = owner.points_unechteBrueche;
            pdsp.setText(String.valueOf(points));
            makeProblem();
            String[] ar_howto = {
                  "howto_nb_and_enter","howto_option_type_of_exercise","howto_option_invisible"
            };
            new UsabilityDialog(
                  "tippatstart",
                  ar_howto,
                  new ConfManager().tippIsSet("tippatstart")
            );//new UsabilityDialog
      }//Konstruktor


Generated by  Doxygen 1.6.0   Back to index