Package org.evolizer.daforjava.polymetricviews.model

Examples of org.evolizer.daforjava.polymetricviews.model.PolymetricViewDataContainer


        fGraphLoader = graphLoader;
        fCommandController = new CommandController();
        fDependencyGraph = new DependencyGraph();

        fViewConfigModel = new ViewConfigModel();
        fPolymetricViewDataCollector = new PolymetricViewDataContainer(this);
    }
View Full Code Here


                polyViewUpdaters.add(new WidthUpdater(profile.getWidthMetric()));
                polyViewUpdaters.add(new ColorUpdater(profile.getColorMetric()));

                try {
                    if (polyViewUpdaters.size() > 0) {
                        PolymetricViewDataContainer dataCollector = fGraphPanel.getPolymetricViewDataCollector();
                        for (AbstractPolymetricViewUpdater abstractPolymetricViewUpdater : polyViewUpdaters) {
                            dataCollector.updateMetricValues(abstractPolymetricViewUpdater.getMetricToRepresent());
                        }
                        updateNodeRealizers(polyViewUpdaters);
                       
//                        fGraphPanel.refreshLayoutNew(false, null, null);
                    }
View Full Code Here

                polyViewUpdaters.add(new ColorUpdater(profile.getColorMetric()));
            }      
   
            try {
                if (polyViewUpdaters.size() > 0) {
                    PolymetricViewDataContainer dataCollector = fGraphPanel.getPolymetricViewDataCollector();
                    for (AbstractPolymetricViewUpdater abstractPolymetricViewUpdater : polyViewUpdaters) {
                        dataCollector.updateMetricValues(abstractPolymetricViewUpdater.getMetricToRepresent());
                    }
                    updateNodeRealizers(polyViewUpdaters);
                   
                    fGraphPanel.getGraph().updatedNodeSizes();
                }
View Full Code Here

   
    /**
     * Applies all AbstractPolymetricViewUpdaters updateRealizer() method to each NodeRealizer in the graph.
     */
    private void updateNodeRealizers(List<AbstractPolymetricViewUpdater> polyViewUpdater) {
        PolymetricViewDataContainer dataCollector = fGraphPanel.getPolymetricViewDataCollector();
       
        DependencyGraph graph = fGraphPanel.getGraph();
        NodeMap map = graph.getRegisteredNodeMaps()[0];
        Node[] nodes = graph.getNodeArray();
        for (int i = 0; i < nodes.length; i++) {
            AbstractFamixEntity entity = (AbstractFamixEntity) map.get(nodes[i]);
            for (AbstractPolymetricViewUpdater updater : polyViewUpdater) {
                NodeRealizer realizer = graph.getRealizer(nodes[i]);
                String metricIdentifier = updater.getMetricToRepresent();
//                if(!metricIdentifier.equalsIgnoreCase(PolymetricViewControllerView.METRIC_UNIFORM)) {
                    if (dataCollector.containsEntry(entity, metricIdentifier)) {
                        float value = dataCollector.getValue(entity, metricIdentifier);
                        INormalizer normalizer = updater.getNormalizer();

                        float normalizedVal = normalizer.normalize(value, dataCollector.getMaxValue(metricIdentifier, entity.getClass()));
                        if (!(entity instanceof AbstractFamixVariable)) {
                            updater.updateNodeRealizer(realizer, normalizedVal);
                        }
                    } else {
//                        sLogger.error("No metric data found for metric: " + updater.getAttributeToRepresent());
View Full Code Here

TOP

Related Classes of org.evolizer.daforjava.polymetricviews.model.PolymetricViewDataContainer

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.