Package org.jboss.dashboard.provider

Examples of org.jboss.dashboard.provider.DataProperty


    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

        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

    public void setShowLabelsXAxis(boolean showLabelsXAxis) {
        this.showLabelsXAxis = showLabelsXAxis;
    }

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

        return beanJSP;
    }

    public CommandResponse actionApplyLink(CommandRequest request) throws Exception {
        AbstractChartDisplayer abstractChartDisplayer = (AbstractChartDisplayer) getDataDisplayer();
        DataProperty property = abstractChartDisplayer.getDomainProperty();
        Integer series = Integer.decode(request.getRequestObject().getParameter(PARAM_NSERIE));
        DataSet dataSet = abstractChartDisplayer.buildXYDataSet();
        Interval interval = (Interval) dataSet.getValueAt(series, 0);
        Dashboard dashboard = DashboardHandler.lookup().getCurrentDashboard();
        if (dashboard.filter(property.getPropertyId(), interval, FilterByCriteria.ALLOW_ANY)) {
            return new ShowCurrentScreenResponse();
        }
        return null;
    }
View Full Code Here

    public static final String PARAM_ACTION = "applyLink";
    public static final String PARAM_NSERIE = "serie";

    public CommandResponse actionApplyLink(CommandRequest request) throws Exception {
        AbstractChartDisplayer abstractChartDisplayer = (AbstractChartDisplayer) getDataDisplayer();
        DataProperty property = abstractChartDisplayer.getDomainProperty();
        Integer series = Integer.decode(request.getRequestObject().getParameter(PARAM_NSERIE));
        DataSet dataSet = abstractChartDisplayer.buildXYDataSet();
        Interval interval = (Interval) dataSet.getValueAt(series, 0);
        Dashboard dashboard = DashboardHandler.lookup().getCurrentDashboard();
        if (dashboard.filter(property.getPropertyId(), interval, FilterByCriteria.ALLOW_ANY)) {
            return new ShowCurrentScreenResponse();
        }
        return null;
    }
View Full Code Here

        Dashboard dashboard = DashboardHandler.lookup().getCurrentDashboard();
        Set<DataProvider> dataProviders = dashboard.getDataProviders();
        for (DataProvider dataProvider : dataProviders) {
            DataProperty[] dataProperties = dataProvider.getDataSet().getProperties();
            for (int i = 0; i < dataProperties.length; i++) {
                DataProperty dataProperty = dataProperties[i];
                for (Command command : commandList) {
                    if (command.containsProperty(dataProperty.getPropertyId())) {
                        results.add(dataProvider);
                    }
                }
            }
        }
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.