Package prefuse

Examples of prefuse.Visualization


    private LabelRenderer m_nodeRenderer;
    private EdgeRenderer m_edgeRenderer;
       
   
    public RadialGraph(Graph g, PaperScopeSession this_Session) {
        super(new Visualization());

        thisSession = this_Session;
        currentGraph = g;
       
        // -- set up visualization --
View Full Code Here


//##################################################################################################   
    public static JPanel gui(RadialGraph g) {       
        //==== create a new radial tree view
        RadialGraph  gview = g;
        final Visualization vis = gview.getVisualization();       

        //==== Add the listeners for the hover text, and the right click menu
        gview.addControlListener(new HoverToolTip());
        gview.addControlListener(new ClickToolTip());
       
        //==== Create a common font for the search tool and the citation count tool
        Font font = new Font("Tahoma", 0, 12);
       
        //==== Create the search box capable of searching all the major paper info (uses hoverLabel as the field searched)
        String[] fields = new String[]{"hoverLabel"};
        infoSearch = new JSearchPanel((Table)vis.getGroup(treeNodes), (KeywordSearchTupleSet)vis.getGroup(Visualization.SEARCH_ITEMS), fields, false, true);
        infoSearch.setShowResultCount(true);
        infoSearch.setBorder(BorderFactory.createEmptyBorder(5,5,4,0));
        infoSearch.setFont(FontLib.getFont("Tahoma", Font.PLAIN, 11));
        infoSearch.setLabelText("Search: Title, Authors, Journal, Date: ");
        infoSearch.setShowCancel(false);
View Full Code Here

        public void itemEntered(VisualItem item, MouseEvent e)
        {
            //==== If it is a tree node, then display the title and authors
            if (item.getGroup().equals("tree.nodes"))
            {
                Visualization v = item.getVisualization();
                Display d = v.getDisplay(0);
                String view_text = (((Node)v.getSourceTuple(item)).getString("hoverLabel"));
                d.setToolTipText(view_text);
            }
        }
View Full Code Here

            }
        }
        public void itemExited(VisualItem item, MouseEvent e)
        {
          Visualization v = item.getVisualization();
          Display d = v.getDisplay(0);
          d.setToolTipText(null);
          //v.run("draw");
        }
View Full Code Here

        {
            //==== Bring up menu on Right Click
            if (e.isPopupTrigger() || SwingUtilities.isRightMouseButton(e))
            {
                //==== Get the visualization and display objects associated with the node
                Visualization v = item.getVisualization();
                Display d = v.getDisplay(0);
           
                //==== Create the click menu panel and the custom tool tip               
                ClickMenu menu = new ClickMenu(v, item);      
                menuTool = new PrefuseTooltip(d, menu);
           
View Full Code Here

    private Activity activity;

    /* package */ StackedGraphDisplay()
    {
        super( new Visualization() );

        setBackground( ColorLib.getColor( 0, 51, 88 ) );

        LabelRenderer labelRenderer = new LabelRenderer( NAME_LABEL );
        labelRenderer.setVerticalAlignment( Constants.BOTTOM );
View Full Code Here

    private final int orientation = Constants.ORIENT_LEFT_RIGHT;

    public TreeGraphDisplay()
    {
        super( new Visualization() );

        Color BACKGROUND = Color.WHITE;
        Color FOREGROUND = Color.BLACK;

        setBackground( BACKGROUND );
View Full Code Here

        @Override
        public void run( double frac )
        {
            int duration = 20;
            int margin = 50;
            Visualization vis = getVisualization();
            Rectangle2D bounds = vis.getBounds( Visualization.ALL_ITEMS );
            GraphicsLib.expand( bounds, margin + (int) ( 1 / getScale() ) );
            DisplayLib.fitViewToBounds( TreeGraphDisplay.this, bounds, duration );
        }
View Full Code Here

     * @see prefuse.visual.VisualItem#validateBounds()
     */
    public Rectangle2D validateBounds() {
        if ( isValidated() ) return getBounds();
       
        Visualization v = getVisualization();
               
        // set the new bounds from the renderer and validate
        getRenderer().setBounds(this);
        setValidated(true);
       
        // report damage from the new bounds and return
        Rectangle2D bounds = getBounds();
        v.damageReport(this, bounds);
        return bounds;
    }
View Full Code Here

    /**
     * @see prefuse.data.expression.Expression#get(prefuse.data.Tuple)
     */
    public Object get(Tuple t) {
        VisualItem item = (VisualItem)t;
        Visualization vis = item.getVisualization();
        String group = getGroup(t);
        SearchTupleSet sts = (SearchTupleSet)vis.getGroup(group);
        return sts.getQuery();
    }
View Full Code Here

TOP

Related Classes of prefuse.Visualization

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.