Examples of VisualItem


Examples of prefuse.visual.VisualItem

    {
        Iterator nodes = m_vis.items(treeNodes);
        while (nodes.hasNext())
        {
            Node node = (Node)nodes.next();
            VisualItem item = m_vis.getVisualItem(treeNodes, node);
            double x = node.getDouble("xCoordinate");
            double y = node.getDouble("yCoordinate");
            item.setX(x);
            item.setY(y);           
        }
        m_vis.repaint();
    }
View Full Code Here

Examples of prefuse.visual.VisualItem

        search = new KeywordSearchTupleSet();
        search.addTupleSetListener(newNodeListener);
        Iterator nodeIt = g.nodes();
        while(nodeIt.hasNext())
        {
            VisualItem visualNode = m_vis.getVisualItem(treeNodes, (Node)nodeIt.next());
            search.index(visualNode, "hoverLabel");
            if(visualNode.getString("commentStatus").equals("t"))
            {
                m_vis.getFocusGroup("commentHighlight").addTuple(m_vis.getVisualItem(treeNodes, m_vis.getSourceTuple(visualNode)));
            }
        }
        m_vis.addFocusGroup(Visualization.SEARCH_ITEMS, search);      
View Full Code Here

Examples of prefuse.visual.VisualItem

        for (int i=0; i<newNodes.getRowCount(); i++)
        {
           //=== Add the node to the graph
           currentGraph.getNodes().addTuple(newNodes.getTuple(i));
           //=== Add the node's tuple to the search group, and add it to the search index
           VisualItem newVisualNode = v.getVisualItem(treeNodes, currentGraph.getNodeFromKey(newNodes.getTuple(i).getInt("DEFAULT_NODE_KEY")));
           search.index(newVisualNode, "hoverLabel");
        }
       
        //=== add each edge from the new graph into the current graph
        for (int j=0; j<newEdges.getRowCount(); j++)
View Full Code Here

Examples of prefuse.visual.VisualItem

    {
        Iterator nodes = m_vis.items(treeNodes);
        while (nodes.hasNext())
        {
            Node node = (Node)nodes.next();
            VisualItem item = m_vis.getVisualItem(treeNodes, node);
            double x = item.getX();
            double y = item.getY();
            node.setDouble("xCoordinate", x);
            node.setDouble("yCoordinate", y);           
        }
    }
View Full Code Here

Examples of prefuse.visual.VisualItem

    {
        Iterator nodes = m_vis.items(treeNodes);
        while (nodes.hasNext())
        {
            Node node = (Node)nodes.next();
            VisualItem item = m_vis.getVisualItem(treeNodes, node);
            double x = node.getDouble("xCoordinate");
            double y = node.getDouble("yCoordinate");
            item.setX(x);
            item.setY(y);           
        }
        m_vis.repaint();
    }
View Full Code Here

Examples of prefuse.visual.VisualItem

                Tuple node = (Node)it.next();
                //=== If it isn't a FOCUS node, move it a little
                if(node.getString("refType").equals("REFERENCES") || node.getString("refType").equals("CITATIONS"))
                {
                    //=== Get the VisualItem for the node, and it's current location
                    VisualItem item = m_vis.getVisualItem(treeNodes, node);
                    double currentX = item.getX();
                    double currentY = item.getY();
                   
                    //=== Generate a new X and Y coordinate based off the current location
                    //===  Current Implementation moves the first node down and left, next one up and right
                    double newX = 0;
                    double newY = 0;
View Full Code Here

Examples of prefuse.visual.VisualItem

                Tuple node = (Node)it.next();
                //=== If it isn't a FOCUS node, move it a little
                if(node.getString("refType").equals("REFERENCES") || node.getString("refType").equals("CITATIONS"))
                {
                    //=== Get the VisualItem for the node, and it's current location
                    VisualItem item = m_vis.getVisualItem(treeNodes, node);
                    double currentX = item.getX();
                    double currentY = item.getY();
                   
                    //=== Generate a new X and Y coordinate based off the current location
                    //===  Current Implementation moves the first node down and left, next one up and right
                    double newX = 0;
                    double newY = 0;
View Full Code Here

Examples of prefuse.visual.VisualItem

            // set uses_edges always visible
            Iterator items = m_vis.items( GRAPH_EDGES );
            while( items.hasNext() )
            {
                VisualItem item = (VisualItem) items.next();
                if( item.getBoolean( USES_EDGES ) )
                {
                    PrefuseLib.updateVisible( item, true );
                }
            }
        }
View Full Code Here

Examples of prefuse.visual.VisualItem

        {
            Iterator iter = m_vis.items( m_group );
            while( iter.hasNext() )
            {
                DecoratorItem item = (DecoratorItem) iter.next();
                VisualItem node = item.getDecoratedItem();
                Rectangle2D bounds = node.getBounds();
                setX( item, node, bounds.getX() + StackedLayout.INSET );
                setY( item, node, bounds.getY() + StackedLayout.INSET + 12 );
            }
        }
View Full Code Here

Examples of prefuse.visual.VisualItem

            TupleSet ts = m_vis.getFocusGroup( Visualization.FOCUS_ITEMS );
            if( ts.getTupleCount() != 0 )
            {
                // get the first selected item and pan center it
                VisualItem vi = (VisualItem) ts.tuples().next();

                //update scrollbar position
                if( container instanceof JViewport )
                {
                    // TODO there is a bug on Swing scrollRectToVisible
                    ( (JViewport) container ).scrollRectToVisible( vi.getBounds().getBounds() );
                }
            }
        }
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.