Package cu.trustGrapher.graphs.edges

Examples of cu.trustGrapher.graphs.edges.SimFeedbackEdge


     * @param forward Whether or not the graph is being played forward
     */
    @Override
    public void graphEvent(TrustLogEvent event, boolean forward) {
        Agent src = ensureAgentExists(event.getAssessor(), this), sink = ensureAgentExists(event.getAssessee(), this);
        SimFeedbackEdge dynEdge = (SimFeedbackEdge) ensureEdgeExists(src, sink, this);
        SimFeedbackEdge refEdge = (SimFeedbackEdge) referenceGraph.findEdge(src, sink);
        double feedback = event.getFeedback();
        if (forward) {
            //Add the feedback to the full edge so it can be seen in the viewer           
            dynEdge.addFeedback(src, sink, feedback);
            refEdge.addFeedback(src, sink, feedback);
        } else {
            dynEdge.removeFeedback(feedback);
            refEdge.removeFeedback(feedback);
            if (dynEdge.feedbacks.isEmpty()){
                removeEdgeAndVertices(dynEdge); //Remove the dynamic edge
            }
        }
    }
View Full Code Here

TOP

Related Classes of cu.trustGrapher.graphs.edges.SimFeedbackEdge

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.