Package reportgen.ren.report.userinput

Examples of reportgen.ren.report.userinput.UserInputEditable


            UserInput userInput = it.next();
            errors.add(null);

            if(userInput instanceof UserInputEditable) {
                //еденичное значение
                UserInputEditable uie = (UserInputEditable) userInput;
                if(uie.getValue() instanceof Boolean) {
                    //булевое
                    JCheckBox check = new JCheckBox("Да", (Boolean)uie.getValue());
                    comp = check;
                    CheckBoxActionListener model = new CheckBoxActionListener(uie, errorIndex);
                    knockModel = model;
                    check.addActionListener(model);

                } else if(uie.getValue() instanceof Date) {
                    JDateChooser dc = new JDateChooser((Date)uie.getValue());
                    comp = dc;
                    DateListener model = new DateListener(uie, errorIndex);
                    knockModel = model;
                    dc.getDateEditor().addPropertyChangeListener(model);

                } else {
                    //не булевое - целое, вещественное, строка
                    JTextArea ta = new JTextArea(uie.getValue().toString());
                    comp = ta;
                    TxtFieldDocumentListener model = new TxtFieldDocumentListener(uie, errorIndex);
                    knockModel = model;
                    ta.getDocument().addDocumentListener(model);
                }
View Full Code Here

TOP

Related Classes of reportgen.ren.report.userinput.UserInputEditable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.