~duyi001/gephi/DSNI

« back to all changes in this revision

Viewing changes to RankingAPI/src/org/gephi/ranking/spi/TransformerUI.java

  • Committer: sunsnowad
  • Author(s): Yi Du
  • Date: 2011-09-08 16:36:59 UTC
  • mfrom: (1435.1.968 gephi)
  • Revision ID: sunsnowad@www-691ed046717-20110908163659-aorx14ylp8f9qwdx
1.merge with main branch
2.update twitter4j to version 2.2.4
3.fix an existing bug on "twitter user import"

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
Copyright 2008-2010 Gephi
 
3
Authors : Mathieu Bastian <mathieu.bastian@gephi.org>
 
4
Website : http://www.gephi.org
 
5
 
 
6
This file is part of Gephi.
 
7
 
 
8
Gephi is free software: you can redistribute it and/or modify
 
9
it under the terms of the GNU Affero General Public License as
 
10
published by the Free Software Foundation, either version 3 of the
 
11
License, or (at your option) any later version.
 
12
 
 
13
Gephi is distributed in the hope that it will be useful,
 
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
16
GNU Affero General Public License for more details.
 
17
 
 
18
You should have received a copy of the GNU Affero General Public License
 
19
along with Gephi.  If not, see <http://www.gnu.org/licenses/>.
 
20
*/
 
21
package org.gephi.ranking.spi;
 
22
 
 
23
import org.gephi.ranking.api.Transformer;
 
24
import javax.swing.Icon;
 
25
import javax.swing.JPanel;
 
26
import org.gephi.ranking.api.Ranking;
 
27
 
 
28
/**
 
29
 * Transformer user interface. Implement this interface to create panels associated
 
30
 * to a particular transformer.
 
31
 * <p>
 
32
 * The icon and display name are used to create the transformer button in the UI.
 
33
 * <p>
 
34
 * Implementors should add the <code>@ServiceProvider</code> annotation to be
 
35
 * registered by the system.
 
36
 * 
 
37
 * @see Transformer
 
38
 * @author Mathieu Bastian
 
39
 */
 
40
public interface TransformerUI {
 
41
 
 
42
    /**
 
43
     * Returns the transformer's icon
 
44
     * @return the icon of this transformer
 
45
     */
 
46
    public Icon getIcon();
 
47
 
 
48
    /**
 
49
     * Returns the display name of the transformer
 
50
     * @return the display name of this transformer
 
51
     */
 
52
    public String getDisplayName();
 
53
 
 
54
    /**
 
55
     * Returns the panel associated to this transformer.
 
56
     * @param transformer the transformer to build the panel for
 
57
     * @param ranking the ranking to be used by the transformer
 
58
     * @return the panel of this transformer
 
59
     */
 
60
    public JPanel getPanel(Transformer transformer, Ranking ranking);
 
61
    
 
62
    /**
 
63
     * Returns <code>true</code> if this UI is built for <code>transformer</code>.
 
64
     * @param transformer the transformer to test ownership
 
65
     * @return <code>true</code> if this UI is associated to <code>transformer</code>,
 
66
     * <code>false</code> otherwise
 
67
     */
 
68
    public boolean isUIForTransformer(Transformer transformer);
 
69
}