Examples of TupleSet


Examples of prefuse.data.tuple.TupleSet

     * @param t the source data tuple
     * @return the associated VisualItem from the given data group, or
     * null if no such VisualItem exists
     */
    public VisualItem getVisualItem(String group, Tuple t) {
        TupleSet ts = getVisualGroup(group);
        VisualTable vt;
        if ( ts instanceof VisualTable ) {
            vt = (VisualTable)ts;
        } else if ( ts instanceof Graph ) {
            Graph g = (Graph)ts;
View Full Code Here

Examples of prefuse.data.tuple.TupleSet

     * Get the TupleSet associated with the given data group name.
     * @param group a visual data group name
     * @return the data group TupleSet
     */
    public TupleSet getGroup(String group) {
        TupleSet ts = getVisualGroup(group);
        if ( ts == null )
            ts = getFocusGroup(group);
        return ts;
    }
View Full Code Here

Examples of prefuse.data.tuple.TupleSet

        if ( ALL_ITEMS.equals(group) )
            return true;
        if ( item.getGroup() == group )
            return true;
       
        TupleSet tset = getGroup(group);
        return ( tset==null ? false : tset.containsTuple(item) );
    }
View Full Code Here

Examples of prefuse.data.tuple.TupleSet

     * Get the size of the given visual data group.
     * @param group the visual data group
     * @return the size (number of tuples) of the group
     */
    public int size(String group) {
        TupleSet tset = getGroup(group);
        return ( tset==null ? 0 : tset.getTupleCount() );
    }
View Full Code Here

Examples of prefuse.data.tuple.TupleSet

     */
    public Iterator items(String group, Predicate filter) {
        if ( ALL_ITEMS.equals(group) )
            return items(filter);

        TupleSet t = getGroup(group);
        return ( t==null ? Collections.EMPTY_LIST.iterator()
                         : t.tuples(filter) );
    }
View Full Code Here

Examples of prefuse.data.tuple.TupleSet

        // 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);
                }
            }
        );
       
        SearchTupleSet search = new PrefixSearchTupleSet();
View Full Code Here

Examples of prefuse.data.tuple.TupleSet

    public static class TreeRootAction extends GroupAction {
        public TreeRootAction(String graphGroup) {
            super(graphGroup);
        }
        public void run(double frac) {
            TupleSet focus = m_vis.getGroup(Visualization.FOCUS_ITEMS);
            if ( focus==null || focus.getTupleCount() == 0 ) return;
           
            Graph g = (Graph)m_vis.getGroup(m_group);
            Node f = null;
            Iterator tuples = focus.tuples();
            while (tuples.hasNext() && !g.containsTuple(f=(Node)tuples.next()))
            {
                f = null;
            }
            if ( f == null ) return;
View Full Code Here

Examples of prefuse.data.tuple.TupleSet

        Tuple[] rem = clearInternal();   
        m_query = query;
        Iterator fields = m_source.keySet().iterator();
        while ( fields.hasNext() ) {
            String field = (String)fields.next();
            TupleSet ts = (TupleSet)m_source.get(field);
           
            Iterator tuples = ts.tuples();
            while ( tuples.hasNext() ) {
                Tuple t = (Tuple)tuples.next();
                String text = t.getString(field);
                if ( !m_caseSensitive )
                    text = text.toLowerCase();
View Full Code Here

Examples of prefuse.data.tuple.TupleSet

    /**
     * @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

Examples of prefuse.data.tuple.TupleSet

    /**
     * @see prefuse.data.search.SearchTupleSet#unindex(prefuse.data.Tuple, java.lang.String)
     */
    public void unindex(Tuple t, String field) {
        TupleSet ts = (TupleSet)m_source.get(field);
        if ( ts != null ) {
            ts.removeTuple(t);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.