Package reportgen.prototype.context

Examples of reportgen.prototype.context.Context


            resultColTable.updateUI();
        }
    }//GEN-LAST:event_downBtnActionPerformed

    private void autoFillBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_autoFillBtnActionPerformed
        Context context = core.getResultContext();
        ItemSelectorEditable<QueryResultColumn> cols = core.getColumns();
        ContextGroup groupContext = MathExpressionEntityMethodRef
                .getContextGroup(core.getContextGroup());
        List<QEntity> options = context.getEntities(groupContext);
        for (QEntity entity : options) {
            for(QEntityProperty prop: context.getProperties(MathExpressionEntityMethodRef.GROUP, entity)) {
                boolean alreadyContains = false;
                for(int i=0; i<cols.size() && !alreadyContains; i++) {
                    QueryResultColumn mec = cols.get(i);
                    if(isContainProperty(mec.getExpression(), prop)) {
                        alreadyContains = true;
View Full Code Here


        assert me != null;

        mainPanel.add(me.getOperator().getPanel(parent), BorderLayout.NORTH);

        MathExpressionOperand operand = me.getOperand();
        Context localContext = me.getLocalContext();
        //если операнд есть, он сам знает свою панель,
        //иначе придется перебирать режимы контекста и создавать панель, соотв режиму контекста
       
        if(operand != null) {
            //панель останется как нулл
            mainPanel.add(operand.getPanel(parent), BorderLayout.CENTER);

        } else
        {
            if(localContext.getContextMode() == ContextMode.STAGE_3_CONDITIONS) {
            operandPanel =  MathExpressionResultColumnRef.GROUP.getCreatePanel(parent,
                me.getChildContext(MathExpressionResultColumnRef.GROUP)
            );

            } else if (localContext.getContextMode() == ContextMode.STAGE_2_CONDITIONS) {
                operandPanel =  MathExpressionCoreColumnRef.GROUP.getCreatePanel(parent,
                        me.getChildContext(MathExpressionCoreColumnRef.GROUP)
                );

            } else if (localContext.getContextMode() == ContextMode.RESULT) {
                operandPanel =  MathExpressionEntityMethodRef.GROUP.getCreatePanel(parent,
                        me.getChildContext(MathExpressionEntityMethodRef.GROUP)
                );

            } else { //ContextMode.SQL
View Full Code Here

        //root
        Element entityEl = element.getChild(QueryEntity.TAG);
        if(entityEl == null) {
            throw new ReportException("Не найден основной объект отчета");
        }
        Context localContext = getSQLContext();
        root = new QueryEntity(localContext, entityEl, getContextGroup());

        conditionInlines = new InlinesConditionList(this, element, getSQLContext());
       
        //cond
View Full Code Here

                .addContainerGap())
        );
    }// </editor-fold>//GEN-END:initComponents

    private void addBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addBtnActionPerformed
        Context context = query.getContext3Stage(new NoNeedAtom());
        TableFormat tf = new TableFormat(context);
        try {
            TableFormatDlg dlg = new TableFormatDlg(parent, tf);

            dlg.setVisible(true);
View Full Code Here

        }
        TableFormat tfOrigin = fields.get(index);
        Element stream = tfOrigin.toXML();

        final LinkedList<Atom> atoms = new LinkedList<Atom>();
        Context context = query.getContext3Stage(new AtomRegistrar() {
            @Override
            public void registerAtom(Atom atom) {
                atoms.add(atom);
            }
        });
View Full Code Here

                assert !atoms.contains(atom) : " Atom value doubled: " + atom;
                atoms.add(atom);
            }
        };

        Context constContext = new ContextConst(ar) {
            @Override
            public ContextMode getContextMode() {
                return ContextMode.INPUT;
            }

        };
        inputs = new InputList(this, root, constContext);
        Context subReportContext = new ContextCompound(constContext) {
            @Override
            public SubQueryLoader getQueryLoader() {
                return sl;
            }
        };
View Full Code Here

    public Core(Element root, Context acontext) throws ReportException {
        super(root, acontext);
        rowCount = new RowCount(root);
        columns = new CoreColumnList(this, root, getResultContext());
       
        Context ctxpp = getPostProcessContext();
        //resultInJava = new InlinesConditionList(this, root, ctxpp);
       
        MathExpressionConditions conditions = new MathExpressionConditions(ctxpp);
        Element condsPart2 = root.getChild(Core.CONDITIONS_POST);
        if(condsPart2 != null) {
View Full Code Here

    private final MathExpressionGeneric titleExpression;
    private final RangeOrderList orderList;

    public ColRowRangeCrossReport(String title, RangeContext context) {
        super(title, context);
        Context localContext = getLocalContext();
        crossCriteria = new MathExpressionConditions(localContext);
        titleExpression = new MathExpressionGeneric(localContext);
        orderList = new RangeOrderList();
    }
View Full Code Here

    public ColRowRangeCrossReport(Element root, RangeContext context)
            throws ReportException {
        super(root, context);

        Context localContext = getLocalContext();

        Element crossReportEl = root.getChild(CrossReport.TAGNAME);
        if(crossReportEl != null) {
            crossReport = new CrossReport(crossReportEl, localContext);
        }
View Full Code Here

        cornerTitle = SupportXMLRootImpl.getStringAttribute(element, CORNER);

        rows = new RowRangeList(element, getLocalContext());
        cols = new ColRangeList(element, getLocalContext());

        Context cellCtx = new ContextCompound(prototype) {
            private ArrayList<ColRowRange> flatRows = rows.getFlat(new ArrayList<ColRowRange>());
            private ArrayList<ColRowRange> flatCols = cols.getFlat(new ArrayList<ColRowRange>());

            @Override
            public List<ColRowRange> getRanges() {
View Full Code Here

TOP

Related Classes of reportgen.prototype.context.Context

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.