Package com.volantis.mcs.protocols.renderer.layouts

Examples of com.volantis.mcs.protocols.renderer.layouts.TableLayers


        Grid grid = (Grid) gridInstance.getFormat();

        // Initialise the attributes.
        GridAttributes attributes = gridInstance.getAttributes();

        TableLayers layers = new TableLayers();

        // Style the grid, and then style all of its columns.
        FormatStylingEngine formatStylingEngine =
                context.getFormatStylingEngine();
        Styles formatStyles = formatStylingEngine.startStyleable(
                grid, grid.getStyleClass());
        layers.setLayer(TableLayers.TABLE, formatStyles);

        attributes.setStyles(formatStyles);
        attributes.setLayers(layers);

        // Style the columns so that we can pick up the height and any
        // other properties associated with the column's style class
        // if any.

        // Style the group of columns. This is to simply group the grid columns
        // together within a single element to simplify the use of those
        // selectors that rely on the position of an element within its parent,
        // e.g. nth-child().
        Styles columnGroupStyles = formatStylingEngine.startStyleable(
                SyntheticStyleableFormat.GRID_COLUMNS,
                null);
        layers.setLayer(TableLayers.COLUMN_GROUP, columnGroupStyles);

        Styles[] columnStyles = getColumnStyles(grid, formatStylingEngine,
                requiredColumns);

        formatStylingEngine.endStyleable(
                SyntheticStyleableFormat.GRID_COLUMNS);

        if (logger.isDebugEnabled()) {
            logger.debug("Grid.writeOutput()");
        }

        attributes.setColumns(columns);

        // Should the order of the columns be reversed,
        // false = 0...n, true = n...0
        boolean reversed =
                DirectionHelper.isDirectionReversed(grid, formatStyles);

        // Open the grid, even if no rows are written
        attributes.setFormat(grid);
        module.writeOpenGrid(attributes);

        // Style the group of rows. See the comment in getColumnStyles().
        Styles bodyStyles = formatStylingEngine.startStyleable(
                SyntheticStyleableFormat.GRID_BODY, null);
        layers.setLayer(TableLayers.ROW_GROUP, bodyStyles);

        // Write out children
        for (int r = 0; r < grid.getRows(); r++) {

            // If the row is completely empty then ignore it.
View Full Code Here


        spatialAttributes.setStyles(formatStyles);
        spatialAttributes.setFormat(spatial);

        module = context.getLayoutModule();

        spatialLayers = new TableLayers();
        setDisplayStyle(formatStyles, DisplayKeywords.TABLE);
        spatialLayers.setLayer(TableLayers.TABLE, formatStyles);
    }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.protocols.renderer.layouts.TableLayers

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.