Package prefuse.util.ui

Examples of prefuse.util.ui.JSearchPanel


        //==== 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


     * (this is the default for the other search engine types).
     * @return a {@link prefuse.util.ui.JSearchPanel} bound to this
     * dynamic query.
     */
    public JSearchPanel createSearchPanel(boolean monitorKeystrokes) {
        JSearchPanel jsp = new JSearchPanel(m_set, m_field, monitorKeystrokes);
        if ( m_lock != null ) { jsp.setLock(m_lock); }
        return jsp;
    }
View Full Code Here

        final TreeView tview = new TreeView(t, label);
        tview.setBackground(BACKGROUND);
        tview.setForeground(FOREGROUND);
       
        // create a search panel for the tree map
        JSearchPanel search = new JSearchPanel(tview.getVisualization(),
            treeNodes, Visualization.SEARCH_ITEMS, label, true, true);
        search.setShowResultCount(true);
        search.setBorder(BorderFactory.createEmptyBorder(5,5,4,0));
        search.setFont(FontLib.getFont("Tahoma", Font.PLAIN, 11));
        search.setBackground(BACKGROUND);
        search.setForeground(FOREGROUND);
       
        final JFastLabel title = new JFastLabel("                 ");
        title.setPreferredSize(new Dimension(350, 20));
        title.setVerticalAlignment(SwingConstants.BOTTOM);
        title.setBorder(BorderFactory.createEmptyBorder(3,0,0,0));
View Full Code Here

        infoBox.add(Box.createHorizontalStrut(5));
        infoBox.add(m_total);
        infoBox.add(Box.createHorizontalStrut(5));
       
        // set up search box
        JSearchPanel searcher = searchQ.createSearchPanel();
        searcher.setLabelText("Candidate: ");
        searcher.setBorder(BorderFactory.createEmptyBorder(5,5,5,0));
       
        // create dynamic queries
        Box radioBox = new Box(BoxLayout.X_AXIS);
        radioBox.add(Box.createHorizontalStrut(5));
        radioBox.add(searcher);
View Full Code Here

       
        // create a search panel for the tree map
        SearchQueryBinding sq = new SearchQueryBinding(
             (Table)vis.getGroup(treeNodes), label,
             (SearchTupleSet)vis.getGroup(Visualization.SEARCH_ITEMS));
        JSearchPanel search = sq.createSearchPanel();
        search.setShowResultCount(true);
        search.setBorder(BorderFactory.createEmptyBorder(5,5,4,0));
        search.setFont(FontLib.getFont("Tahoma", Font.PLAIN, 11));
       
        final JFastLabel title = new JFastLabel("                 ");
        title.setPreferredSize(new Dimension(350, 20));
        title.setVerticalAlignment(SwingConstants.BOTTOM);
        title.setBorder(BorderFactory.createEmptyBorder(3,0,0,0));
View Full Code Here

            }
        });
        m_vis.addFocusGroup(Visualization.SEARCH_ITEMS, search);
       
        // create and parameterize a search panel for searching on zip code
        final JSearchPanel searcher = searchQ.createSearchPanel();
        searcher.setLabelText("zip>"); // the search box label
        searcher.setShowCancel(false); // don't show the cancel query button
        searcher.setShowBorder(false); // don't show the search box border
        searcher.setFont(FontLib.getFont("Georgia", Font.PLAIN, 22));
        searcher.setBackground(ColorLib.getGrayscale(50));
        searcher.setForeground(ColorLib.getColor(100,100,75));
        add(searcher); // add the search box as a sub-component of the display
        searcher.setBounds(10, getHeight()-40, 120, 30);
       
        addComponentListener(new ComponentAdapter() {
            public void componentResized(ComponentEvent e) {
                m_vis.run("layout");
                m_vis.run("update");
                m_vis.run("resize");
                searcher.setBounds(10, getHeight()-40, 120, 30);
                invalidate();
            }
        });
       
        // -- launch ----------------------------------------------------------
View Full Code Here

       
        // create a new treemap
        final TreeMap treemap = new TreeMap(t, label);
       
        // create a search panel for the tree map
        JSearchPanel search = treemap.getSearchQuery().createSearchPanel();
        search.setShowResultCount(true);
        search.setBorder(BorderFactory.createEmptyBorder(5,5,4,0));
        search.setFont(FontLib.getFont("Tahoma", Font.PLAIN, 11));
       
        final JFastLabel title = new JFastLabel("                 ");
        title.setPreferredSize(new Dimension(350, 20));
        title.setVerticalAlignment(SwingConstants.BOTTOM);
        title.setBorder(BorderFactory.createEmptyBorder(3,0,0,0));
View Full Code Here

TOP

Related Classes of prefuse.util.ui.JSearchPanel

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.