Package reportgen.ren.report.userinput

Examples of reportgen.ren.report.userinput.UserInputSelect


                    ta.getDocument().addDocumentListener(model);
                }

            } else if(userInput instanceof UserInputSelect) {
                //выбор из множества
                UserInputSelect uis = (UserInputSelect) userInput;
                ArrayList<Integer> selectedRows = uis.getSelected();
                if(uis.getActiveRows().isSingle()) {
                    //единичный выбор
                    JComboBox combo = new JComboBox(uis.getOptions().toArray());
                    if(selectedRows == null
                            || selectedRows.size() != 1) {
                        combo.setSelectedIndex(-1);
                        uis.setSelected(null);
                    } else {
                        combo.setSelectedIndex(selectedRows.get(0));
                    }
                    comp = combo;
                    ComboItemListener model = new ComboItemListener(uis, errorIndex);
                    knockModel = model;
                    combo.addItemListener(model);
                } else {
                    //множественный выбор
                    JList list = new JList(uis.getOptions().toArray());
                    if(selectedRows == null
                            || selectedRows.size() == 0) {
                        list.setSelectedIndex(-1);
                        uis.setSelected(null);
                    } else {
                        for(Integer row: selectedRows) {
                            list.getSelectionModel().addSelectionInterval(row, row);
                        }
                    }
View Full Code Here


        for(int i=0; i<queryResults.getRowCount(); i++) {
            ResultsRow row = queryResults.getRow(i);
            options.add(row.getValue(selectColumn));
        }

        return new UserInputSelect(new Integer(report.getId()).toString(),
                selectTitle, selectDescription, selectedRows, options, rowCount, canBeOmitted);
    }
View Full Code Here

       
        //проверка подотчетов
        ItemSelectorEditable<QueryExecuterSub> subreports = report.getSubReports();
        for (int i=0; i<subreports.size(); i++) {
            QueryExecuterSub subreport = subreports.get(i);
            UserInputSelect val = subreport.getResultInputValue();
            if(val != null) {
                chunk.addUserInput(val);
            }
        }
View Full Code Here

        //проверка подотчетов
        ItemSelectorEditable<QueryExecuterSub> subreports = report.getSubReports();
        for(int i=0; i<subreports.size(); i++) {
            QueryExecuterSub subreport = subreports.get(i);
            UserInputSelect val = subreport.getResultInputValue();
            if(val == null) {
                //не требует результатов (константный отчет)
                continue;
            }

            UserInput ui = input.getUserInput(subreport.getReportId() + "@" + val.getTitle());
            if(ui == null) {
                throw new ReportException("Отсутствует обязательный входной параметр: '" + val.getTitle() + "'");
            } else if(ui instanceof UserInputSelect) {
                subreport.setResultUserInput((UserInputSelect) ui);
            } else {
                throw new ReportException("Некорректная попытка изменения результата подотчета.");
            }
View Full Code Here

TOP

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

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.