Package org.eclipse.nebula.widgets.nattable.layer

Examples of org.eclipse.nebula.widgets.nattable.layer.AbstractLayer


        // build the column header layer
        IDataProvider columnHeaderDataProvider = new DefaultColumnHeaderDataProvider(
                propertyNames, propertyToLabelMap);
        final DataLayer columnHeaderDataLayer = new DefaultColumnHeaderDataLayer(
                columnHeaderDataProvider);
        final AbstractLayer columnHeaderLayer = new ColumnHeaderLayer(
                columnHeaderDataLayer, bodyLayer, bodyLayer.getSelectionLayer());

        // Use this special layer painter that supports rendering of split
        // viewports although
        // the ColumnHeaderLayer is not split. Here is some custom calculation
        // included that
        // might not work correctly in case there are column groups or other
        // spanning involved.
        columnHeaderLayer.setLayerPainter(new CellLayerPainter() {
            @Override
            protected boolean isClipLeft(int position) {
                // check position-1 because of the row header column count
                // as the body is a composite layer, the default transformation
                // for the grid is not working correctly
View Full Code Here


            fireColumnCountChangeEvent(bodyDataLayer);
        }

        private void fireColumnCountChangeEvent(ILayer layer) {
            if (layer instanceof AbstractLayer) {
                AbstractLayer alay = (AbstractLayer) layer;
                alay.fireLayerEvent(new MultiColumnStructuralChangeEventExtension(
                        layer));
            }
        }
View Full Code Here

TOP

Related Classes of org.eclipse.nebula.widgets.nattable.layer.AbstractLayer

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.