Package prefuse.data.tuple

Examples of prefuse.data.tuple.DefaultTupleSet


        m_vis.run("filter");
       
        // maintain a set of items that should be interpolated linearly
        // this isn't absolutely necessary, but makes the animations nicer
        // the PolarLocationAnimator should read this set and act accordingly
        m_vis.addFocusGroup(linear, new DefaultTupleSet());
        m_vis.getGroup(Visualization.FOCUS_ITEMS).addTupleSetListener(
            new TupleSetListener() {
                public void tupleSetChanged(TupleSet t, Tuple[] add, Tuple[] rem) {
                    TupleSet linearInterp = m_vis.getGroup(linear);
                    if ( add.length < 1 ) return; linearInterp.clear();
                    for ( Node n = (Node)add[0]; n!=null; n=n.getParent() )
                        linearInterp.addTuple(n);
                }
            }
        );
       
        //==== Create a highlight group for adding borders based on citation count
        DefaultTupleSet citHighlight = new DefaultTupleSet();       
        m_vis.addFocusGroup("citHighlight", citHighlight);

        //==== Create a group for making nodes with comments have red text
        DefaultTupleSet commentHighlight = new DefaultTupleSet();       
        m_vis.addFocusGroup("commentHighlight", commentHighlight);
       
        //==== Initialize the search group, a change listener for it, and add it to the visualization
        TupleSetListener newNodeListener = new TupleSetListener() {
            public void tupleSetChanged(TupleSet t, Tuple[] add, Tuple[] rem) {
View Full Code Here


        m_visual = new LinkedHashMap();
        m_source = new HashMap();
        m_focus = new HashMap();
        m_displays = new ArrayList();
       
        addFocusGroup(Visualization.FOCUS_ITEMS,    new DefaultTupleSet());
        addFocusGroup(Visualization.SELECTED_ITEMS, new DefaultTupleSet());
    }
View Full Code Here

     * {@link prefuse.data.tuple.DefaultTupleSet}.
     * @param group the name of the focus group to add
     */
    public void addFocusGroup(String group) {
      checkGroupExists(group);
        m_focus.put(group, new DefaultTupleSet());
    }
View Full Code Here

        m_vis.run("filter");
       
        // maintain a set of items that should be interpolated linearly
        // this isn't absolutely necessary, but makes the animations nicer
        // the PolarLocationAnimator should read this set and act accordingly
        m_vis.addFocusGroup(linear, new DefaultTupleSet());
        m_vis.getGroup(Visualization.FOCUS_ITEMS).addTupleSetListener(
            new TupleSetListener() {
                public void tupleSetChanged(TupleSet t, Tuple[] add, Tuple[] rem) {
                    TupleSet linearInterp = m_vis.getGroup(linear);
                    if ( add.length < 1 ) return; linearInterp.clear();
View Full Code Here

     * @see prefuse.data.search.SearchTupleSet#index(prefuse.data.Tuple, java.lang.String)
     */
    public void index(Tuple t, String field) {
        TupleSet ts = (TupleSet)m_source.get(field);
        if ( ts == null ) {
            ts = new DefaultTupleSet();
            m_source.put(field, ts);
        }
        ts.addTuple(t);
    }
View Full Code Here

        vis.run("filter");

        // maintain a set of items that should be interpolated linearly
        // this isn't absolutely necessary, but makes the animations nicer
        // the PolarLocationAnimator should read this set and act accordingly
        vis.addFocusGroup(Constants.LINEAR, new DefaultTupleSet());
        vis.getGroup(Visualization.FOCUS_ITEMS).addTupleSetListener(
            new TupleSetListener() {
                public void tupleSetChanged(TupleSet t,
                                            Tuple[] add,
                                            Tuple[] rem) {
View Full Code Here

TOP

Related Classes of prefuse.data.tuple.DefaultTupleSet

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.