Package com.volantis.mcs.layouts

Examples of com.volantis.mcs.layouts.AbstractGrid


    // Javadoc inherited from super class.
    public void initialise() {
        super.initialise();

        AbstractGrid grid = (AbstractGrid) format;

        rows = grid.getRows();
        columns = grid.getColumns();
        requiredRows = new boolean[rows];
        requiredColumns = new boolean[columns];
    }
View Full Code Here


    /**
     * Calculate which rows and which columns need to be output.
     */
    protected void calculateOutput() {

        AbstractGrid grid = (AbstractGrid) format;

        // We need to reset the required rows and columns array to 'not required'
        // in order for this method to work for spatial iterators. This  method
        // sets the values of the column/row to be true only if that row/column
        // is not empty. Given that there isn't an array of columns for each row,
        // this is preferred method. Ideally we should store an array of columns
        // for each row and if one column is required then that row is required.
        // The additional memory and processing required to achieve this probably
        // outweighs simply resetting the arrays below (most rows and columns
        // should contain only a few items).
        for (int i = 0; i < requiredColumns.length; i++) {
            requiredColumns[i] = false;
        }

        for (int i = 0; i < requiredRows.length; i++) {
            requiredRows[i] = false;
        }

        for (int r = 0; r < rows; r++) {

            for (int c = 0; c < columns; c++) {
                int gridIndex = r * columns + c;
                Format child = grid.getChildAt(gridIndex);

                // Ignore children which do not exist.
                if (child == null) {
                    continue;
                }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.layouts.AbstractGrid

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.