Examples of TupleSet


Examples of prefuse.data.tuple.TupleSet

   
    /**
     * @see prefuse.action.EncoderAction#setup()
     */
    protected void setup() {
        TupleSet ts = m_vis.getGroup(m_group);
        m_ordinalMap = DataLib.ordinalMap(ts, m_dataField);
    }
View Full Code Here

Examples of prefuse.data.tuple.TupleSet

     * Loads the simulator with all relevant force items and springs.
     * @param fsim the force simulator driving this layout
     */
    protected void initSimulator(ForceSimulator fsim) {    
        // make sure we have force items to work with
        TupleSet ts = m_vis.getGroup(m_nodeGroup);
        if ( ts == null ) return;
        try {
            ts.addColumns(FORCEITEM_SCHEMA);
        } catch ( IllegalArgumentException iae ) { /* ignored */ }
       
        float startX = (referrer == null ? 0f : (float)referrer.getX());
        float startY = (referrer == null ? 0f : (float)referrer.getY());
        startX = Float.isNaN(startX) ? 0f : startX;
View Full Code Here

Examples of prefuse.data.tuple.TupleSet

   
    /**
     * Create a new table for representing axis labels.
     */
    protected VisualTable getTable() {
        TupleSet ts = m_vis.getGroup(m_group);
        if ( ts == null ) {
            Schema s = PrefuseLib.getAxisLabelSchema();
            VisualTable vt = m_vis.addTable(m_group, s);
            vt.index(VALUE);
            return vt;
View Full Code Here

Examples of prefuse.data.tuple.TupleSet

    /**
     * Computes the distribution (either min/max or quantile values) used to
     * help assign colors to data values.
     */
    protected double[] getDistribution() {
        TupleSet ts = m_vis.getGroup(m_group);

        if ( m_type == Constants.NUMERICAL ) {
            m_omap = null;
            if ( m_scale == Constants.QUANTILE_SCALE && m_bins > 0 ) {
                double[] values =
                        DataLib.toDoubleArray(ts.tuples(), m_dataField);
                return MathLib.quantiles(m_bins, values);
            } else {
                double[] dist = new double[2];
                dist[0] = DataLib.min(ts, m_dataField).getDouble(m_dataField);
                dist[1] = DataLib.max(ts, m_dataField).getDouble(m_dataField);
View Full Code Here

Examples of prefuse.data.tuple.TupleSet

     */
    public NodeItem getLayoutRoot() {
        if ( m_root != null )
            return m_root;
       
        TupleSet ts = m_vis.getGroup(m_group);
        if ( ts instanceof Graph ) {
            Tree tree = ((Graph)ts).getSpanningTree();
            return (NodeItem)tree.getRoot();
        } else {
            throw new IllegalStateException("This action's data group does" +
View Full Code Here

Examples of prefuse.data.tuple.TupleSet

        if ( !filterCheck(item) ) return;
        Display d = (Display)e.getSource();
        d.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
        if ( ccount == 0 ) {
            Visualization vis = item.getVisualization();
            TupleSet ts = vis.getFocusGroup(group);
            ts.setTuple(item);
            curFocus = item;
            runActivity(vis);
        }
    }
View Full Code Here

Examples of prefuse.data.tuple.TupleSet

        Display d = (Display)e.getSource();
        d.setCursor(Cursor.getDefaultCursor());
        if ( ccount == 0 ) {
            curFocus = null;
            Visualization vis = item.getVisualization();
            TupleSet ts = vis.getFocusGroup(group);
            ts.removeTuple(item);
            runActivity(vis);
        }
    }
View Full Code Here

Examples of prefuse.data.tuple.TupleSet

        if ( UILib.isButtonPressed(e, button) &&
             e.getClickCount() == ccount )
        {
            if ( item != curFocus ) {
                Visualization vis = item.getVisualization();
                TupleSet ts = vis.getFocusGroup(group);
                   
                boolean ctrl = e.isControlDown();
                if ( !ctrl ) {
                    curFocus = item;
                    ts.setTuple(item);
                } else if ( ts.containsTuple(item) ) {
                    ts.removeTuple(item);
                } else {
                    ts.addTuple(item);
                }
                runActivity(vis);
               
            } else if ( e.isControlDown() ) {
                Visualization vis = item.getVisualization();
                TupleSet ts = vis.getFocusGroup(group);
                ts.removeTuple(item);
                curFocus = null;
                runActivity(vis);
            }
        }
    }
View Full Code Here

Examples of prefuse.data.tuple.TupleSet

       
        // filter graph and perform layout
        setOrientation(m_orientation);
        m_vis.run("filter");
       
        TupleSet search = new PrefixSearchTupleSet();
        m_vis.addFocusGroup(Visualization.SEARCH_ITEMS, search);
        search.addTupleSetListener(new TupleSetListener() {
            public void tupleSetChanged(TupleSet t, Tuple[] add, Tuple[] rem) {
                m_vis.cancel("animatePaint");
                m_vis.run("fullPaint");
                m_vis.run("animatePaint");
            }
View Full Code Here

Examples of prefuse.data.tuple.TupleSet

        private Point2D m_end   = new Point2D.Double();
        private Point2D m_cur   = new Point2D.Double();
        private int     m_bias  = 150;
       
        public void run(double frac) {
            TupleSet ts = m_vis.getFocusGroup(Visualization.FOCUS_ITEMS);
            if ( ts.getTupleCount() == 0 )
                return;
           
            if ( frac == 0.0 ) {
                int xbias=0, ybias=0;
                switch ( m_orientation ) {
                case Constants.ORIENT_LEFT_RIGHT:
                    xbias = m_bias;
                    break;
                case Constants.ORIENT_RIGHT_LEFT:
                    xbias = -m_bias;
                    break;
                case Constants.ORIENT_TOP_BOTTOM:
                    ybias = m_bias;
                    break;
                case Constants.ORIENT_BOTTOM_TOP:
                    ybias = -m_bias;
                    break;
                }

                VisualItem vi = (VisualItem)ts.tuples().next();
                m_cur.setLocation(getWidth()/2, getHeight()/2);
                getAbsoluteCoordinate(m_cur, m_start);
                m_end.setLocation(vi.getX()+xbias, vi.getY()+ybias);
            } else {
                m_cur.setLocation(m_start.getX() + frac*(m_end.getX()-m_start.getX()),
 
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.