Package com.haulmont.yarg.formatters.impl.xls

Examples of com.haulmont.yarg.formatters.impl.xls.Area


        }
    }

    protected void updateFormulas() {
        for (Map.Entry<Area, List<Area>> entry : areasDependency.entrySet()) {
            Area original = entry.getKey();

            for (Area dependent : entry.getValue()) {
                updateFormulas(original, dependent);
            }
        }
View Full Code Here


            }

            bottomRight = new CellReference(rownum + rowsAddedByHorizontalBand - 1, offset + currentColumnCount);
            resultRange = new AreaReference(topLeft, bottomRight);

            areaDependencyManager.addDependency(new Area(band.getName(), Area.AreaAlign.HORIZONTAL, templateRange),
                    new Area(band.getName(), Area.AreaAlign.HORIZONTAL, resultRange));
            bandsToResultRanges.put(band, new Range(resultSheet.getSheetName(),
                    resultRange.getFirstCell().getCol() + 1, resultRange.getFirstCell().getRow() + 1,
                    resultRange.getLastCell().getCol() + 1, resultRange.getLastCell().getRow() + 1
            ));
        }
View Full Code Here

            colnum += crefs[crefs.length - 1].getCol() - firstColumn + 1;

            AreaReference templateRange = getAreaForRange(templateWorkbook, rangeName);
            AreaReference resultRange = new AreaReference(topLeft, bottomRight);
            areaDependencyManager.addDependency(new Area(band.getName(), Area.AreaAlign.VERTICAL, templateRange),
                    new Area(band.getName(), Area.AreaAlign.VERTICAL, resultRange));
            bandsToResultRanges.put(band, new Range(resultSheet.getSheetName(),
                    resultRange.getFirstCell().getCol() + 1, resultRange.getFirstCell().getRow() + 1,
                    resultRange.getLastCell().getCol() + 1, resultRange.getLastCell().getRow() + 1
            ));
        }
View Full Code Here

        updateCell(newCell);
        return newCell;
    }

    protected void updateCell(Cell cell) {
        Area templateArea = areaDependencyManager.getTemplateAreaByCoordinate(cell.getCol(), cell.getRow());
        List<Area> resultAreas = areasDependency.get(templateArea);

        if (CollectionUtils.isNotEmpty(resultAreas)) {
            Area destination = resultAreas.get(0);

            int col = cell.getCol() - templateArea.getTopLeft().getCol() + destination.getTopLeft().getCol();
            int row = cell.getRow() - templateArea.getTopLeft().getRow() + destination.getTopLeft().getRow();

            cell.setCol(col);
            cell.setRow(row);
        }
    }
View Full Code Here

TOP

Related Classes of com.haulmont.yarg.formatters.impl.xls.Area

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.