Package org.jboss.dashboard.provider

Examples of org.jboss.dashboard.provider.DataProperty


        // Init the provider and apply the group by configuration if required.
        if (providerNotInit) {
            DataSetTableModel dataSetModel = (DataSetTableModel) super.getModel();
            dataSetModel.setDataSet(getOriginalDataSet());
            if (getColumnCount() == 0) initFromDataSet();
            DataProperty groupByProp = getGroupByProperty();
            if (groupByProp != null) switchGroupByOn(groupByProp);
        }
        // Clear the current table configuration if the data provider is changed.
        if (providerChanged) {
            initFromDataSet();
View Full Code Here


    protected void initFromDataSet() {
        for (int i=getColumnCount()-1; i>=0; i--) removeColumn(i);
        DataProperty[] props = getDataSet().getProperties();
        for (int i = 0; i < props.length && i < 10; i++) {
            DataProperty prop = props[i];
            TableColumn column = createColumn();
            column.setPropertyId(prop.getPropertyId());
            column.setNameI18nMap(new HashMap(prop.getNameI18nMap()));
            column.setHintI18nMap(new HashMap(prop.getNameI18nMap()));
            addColumn(column);
            column.setSortable(true);
            column.setSelectable(false);
        }
    }
View Full Code Here

    public DataProperty getOriginalDataProperty(int columnIndex) {
        if (columnIndex < 0 || columnIndex >= getColumnCount()) return null;

        // If group by is deactivated then get the property from the current (original) dataset.
        DataProperty currentProp = getDataProperty(columnIndex);
        if (groupByProperty == null) return currentProp;

        // If not then get the property from the grouped data set and then get the corresponding property from the original one.
        DataProperty[] properties = getOriginalDataSet().getProperties();
        for (int i = 0; i < properties.length; i++) {
            DataProperty property = properties[i];
            if (property.equals(currentProp)) return property;
        }
        return null;
    }
View Full Code Here

        }
        return null;
    }

    public int getOriginalModelIndex(int columnIndex) {
        DataProperty prop = getOriginalDataProperty(columnIndex);
        DataProperty[] props = getOriginalDataSet().getProperties();
        for (int i = 0; i < props.length; i++) {
            DataProperty dataProperty = props[i];
            if (dataProperty.equals(prop)) return i;
        }
        return -1;
    }
View Full Code Here

        if (groupByProperty == null) return true;
         if (columnIndex > getColumnCount()) return true;

        DataSetTableModel model = (DataSetTableModel) super.getModel();
        DataSet groupByDataSet = model.getDataSet();
        DataProperty prop = groupByDataSet.getProperties()[columnIndex];
        return !groupByProperty.equals(prop);
    }
View Full Code Here

        groupByProperty = null;
    }

    public void refreshGroupBy() {
        if (groupByProperty == null) return;
        DataProperty gbp = groupByProperty;
        switchGroupByOff();

        // Refresh the group by property in order the get the intervals from the current dataset.
        switchGroupByOn(gbp);
    }
View Full Code Here

    public DataProperty[] getDomainPropertiesAvailable() {
        List results = new ArrayList();
        try {
            DataProperty[] props = dataProvider.getDataSet().getProperties();
            for (int i = 0; i < props.length; i++) {
                DataProperty prop = props[i];
                results.add(prop);
            }
        } catch (Exception e) {
            log.error("Can not retrieve dataset properties.", e);
        }
View Full Code Here

    public DataProperty[] getRangePropertiesAvailable() {
        List results = new ArrayList();
        try {
            DataProperty[] props = dataProvider.getDataSet().getProperties();
            for (int i = 0; i < props.length; i++) {
                DataProperty prop = props[i];
                results.add(prop);
            }
        } catch (Exception e) {
            log.error("Can not retrieve dataset properties.", e);
        }
View Full Code Here

        this.showLabelsXAxis = showLabelsXAxis;
    }

    public DataSet buildXYDataSet() {
        DataSet targetDataSet = null;
        DataProperty domainProperty = getDomainProperty();
        DataProperty rangeProperty = getRangeProperty();
        ScalarFunction scalarFunction = getRangeScalarFunction();
        CodeBlockTrace trace = new BuildXYDataSetTrace(domainProperty, rangeProperty, scalarFunction).begin();
        try {
            if (domainProperty == null || domainProperty.getDomain() == null) return null;
            if (rangeProperty == null || scalarFunction == null) return null;
View Full Code Here

        // Init the provider and apply the group by configuration if required.
        if (providerNotInit) {
            DataSetTableModel dataSetModel = (DataSetTableModel) super.getModel();
            dataSetModel.setDataSet(getOriginalDataSet());
            if (getColumnCount() == 0) initFromDataSet();
            DataProperty groupByProp = getGroupByProperty();
            if (groupByProp != null) switchGroupByOn(groupByProp);
        }
        // Clear the current table configuration if the data provider is changed.
        if (providerChanged) {
            initFromDataSet();
View Full Code Here

TOP

Related Classes of org.jboss.dashboard.provider.DataProperty

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.