Examples of ColumnGroup


Examples of org.dashbuilder.dataset.group.ColumnGroup

        DataSetGroup gOp = (DataSetGroup) getCurrentOp();
        if (gOp == null || gOp.getColumnGroup() == null) {
            throw new RuntimeException("group() must be called first.");
        }

        ColumnGroup columnGroup = gOp.getColumnGroup();
        if (!GroupStrategy.FIXED.equals(columnGroup.getStrategy())) {
            throw new RuntimeException("A fixed group is required.");
        }
        if (!DateIntervalType.DAY_OF_WEEK.equals(DateIntervalType.getByName(columnGroup.getIntervalSize()))) {
            throw new RuntimeException("A fixed DAY_OF_WEEK date group is required.");
        }
        columnGroup.setFirstDayOfWeek(dayOfWeek);
        return (T) this;
    }
View Full Code Here

Examples of org.dashbuilder.dataset.group.ColumnGroup

        DataSetGroup gOp = (DataSetGroup) getCurrentOp();
        if (gOp == null || gOp.getColumnGroup() == null) {
            throw new RuntimeException("group() must be called first.");
        }

        ColumnGroup columnGroup = gOp.getColumnGroup();
        if (!GroupStrategy.FIXED.equals(columnGroup.getStrategy())) {
            throw new RuntimeException("A fixed group is required.");
        }
        if (!DateIntervalType.MONTH.equals(DateIntervalType.getByName(columnGroup.getIntervalSize()))) {
            throw new RuntimeException("A fixed MONTH date group is required.");
        }
        columnGroup.setFirstMonthOfYear(month);
        return (T) this;
    }
View Full Code Here

Examples of org.dashbuilder.dataset.group.ColumnGroup

            _groupSelect.setSelectedIntervalNames(values);

        } else {
            _groupSelect = new DataSetGroup();
            _groupSelect.setSelectedIntervalNames(values);
            _groupSelect.setColumnGroup(new ColumnGroup(columnId, columnId, GroupStrategy.DYNAMIC));
        }
        // Notify to those interested parties the selection event.
        if (displayerSettings.isFilterNotificationEnabled()) {
            for (DisplayerListener listener : listenerList) {
                listener.onGroupIntervalsSelected(this, _groupSelect);
View Full Code Here

Examples of org.dashbuilder.dataset.group.ColumnGroup

        columnSelectionMap.remove(columnId);
        DataSetGroup groupOp = dataSetHandler.getGroupOperation(columnId);
        if (groupOp == null || groupOp.getColumnGroup() == null) {
            groupOp = new DataSetGroup();
            groupOp.setColumnGroup(new ColumnGroup(columnId, columnId, GroupStrategy.DYNAMIC));
        }
        // Notify to those interested parties the reset event.
        if (displayerSettings.isFilterNotificationEnabled()) {
            for (DisplayerListener listener : listenerList) {
                listener.onGroupIntervalsReset(this, Arrays.asList(groupOp));
View Full Code Here

Examples of org.dashbuilder.dataset.group.ColumnGroup

        List<DataSetGroup> groupOpList = new ArrayList<DataSetGroup>();
        for (String columnId : columnSelectionMap.keySet()) {
            DataSetGroup groupOp = dataSetHandler.getGroupOperation(columnId);
            if (groupOp == null || groupOp.getColumnGroup() == null) {
                groupOp = new DataSetGroup();
                groupOp.setColumnGroup(new ColumnGroup(columnId, columnId, GroupStrategy.DYNAMIC));
            }
            groupOpList.add(groupOp);

        }
        columnSelectionMap.clear();
View Full Code Here

Examples of org.dashbuilder.dataset.group.ColumnGroup

        if (index == -1) return null;
        return lookupCurrent.getOperation(index);
    }

    public boolean filter(DataSetGroup op) {
        ColumnGroup cg = op.getColumnGroup();
        if (cg == null) throw new RuntimeException("Group ops requires to specify a pivot column.");
        if (op.getSelectedIntervalNames().isEmpty()) throw new RuntimeException("Group intervals not specified");

        // Avoid duplicates
        for (DataSetGroup next : lookupCurrent.getOperationList(DataSetGroup.class)) {
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.group.ColumnGroupModel.ColumnGroup

        }
    }

    private boolean updateModel(int fromColumnIndex, int toColumnIndex,
            String leftEdgeGroupName, String rightEdgeGroupName) {
        ColumnGroup fromColumnGroup = model
                .getColumnGroupByIndex(fromColumnIndex);
        ColumnGroup toColumnGroup = model.getColumnGroupByIndex(toColumnIndex);

        // If moved to the RIGHT edge of a group - remove from group
        if (rightEdgeGroupName != null) {
            return (model.isPartOfAGroup(fromColumnIndex)) ? fromColumnGroup
                    .removeColumn(fromColumnIndex) : true;
        }

        // If moved to the LEFT edge of a column group - include in the group
        if (leftEdgeGroupName != null) {
            boolean removed = true;
            if (model.isPartOfAGroup(fromColumnIndex)) {
                removed = fromColumnGroup.removeColumn(fromColumnIndex);
            }
            return removed
                    && model.insertColumnIndexes(leftEdgeGroupName,
                            fromColumnIndex);
        }

        // Move column INTO a group
        if (model.isPartOfAGroup(toColumnIndex)
                && !model.isPartOfAGroup(fromColumnIndex)) {
            String groupName = toColumnGroup.getName();
            return model.insertColumnIndexes(groupName, fromColumnIndex);
        }

        // Move column OUT of a group
        if (model.isPartOfAGroup(fromColumnIndex)
                && !model.isPartOfAGroup(toColumnIndex)) {
            return fromColumnGroup.removeColumn(fromColumnIndex);
        }

        // Move column BETWEEN groups
        if (model.isPartOfAGroup(toColumnIndex)
                && model.isPartOfAGroup(fromColumnIndex)) {
            String toGroupName = toColumnGroup.getName();
            String fromGroupName = fromColumnGroup.getName();

            if (fromGroupName.equals(toGroupName)) {
                return true;
            } else {
View Full Code Here

Examples of org.openfaces.component.table.ColumnGroup

            } else if (child instanceof Columns) {
                Columns tableColumns = (Columns) child;
                List<DynamicColumn> dynamicColumns = tableColumns.toColumnList(context);
                columns.addAll(dynamicColumns);
            } else if (child instanceof ColumnGroup) {
                ColumnGroup tcg = (ColumnGroup) child;
                columns.addAll(getColumnsFromList(context, tcg.getChildren()));
            }
        }
        return columns;
    }
View Full Code Here

Examples of org.primefaces.component.columngroup.ColumnGroup

        List<FilterMeta> filterMetadata = new ArrayList<FilterMeta>();
        String separator = String.valueOf(UINamingContainer.getSeparatorChar(context));
        String var = table.getVar();
        Map<String,String> params = context.getExternalContext().getRequestParameterMap();
       
        ColumnGroup group = getColumnGroup(table, "header");
        if(group != null) {
            for(UIComponent child : group.getChildren()) {
                Row headerRow = (Row) child;

                if(headerRow.isRendered()) {
                    for(UIComponent headerRowChild : headerRow.getChildren()) {
                        if(headerRowChild instanceof Column) {
View Full Code Here

Examples of org.primefaces.component.columngroup.ColumnGroup

        this.encodeThead(context, table, 0, table.getColumns().size(), null);
    }

    protected void encodeThead(FacesContext context, DataTable table, int columnStart, int columnEnd, String theadId) throws IOException {
        ResponseWriter writer = context.getResponseWriter();
        ColumnGroup group = table.getColumnGroup("header");
        List<UIColumn> columns = table.getColumns();
        String theadClientId = (theadId == null) ? table.getClientId(context) + "_head" : theadId;
        char separator = UINamingContainer.getSeparatorChar(context);
       
        writer.startElement("thead", null);
        writer.writeAttribute("id", theadClientId, null);
       
        if(group != null && group.isRendered()) {
            context.getAttributes().put(Constants.HELPER_RENDERER, "columnGroup");

            for(UIComponent child : group.getChildren()) {
                if(child.isRendered()) {
                    if(child instanceof Row) {
                        Row headerRow = (Row) child;

                        writer.startElement("tr", null);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.