2
Copyright 2008-2010 Gephi
3
Authors : Mathieu Bastian <mathieu.bastian@gephi.org>
4
Website : http://www.gephi.org
6
This file is part of Gephi.
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.
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.
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/>.
21
package org.gephi.ranking.spi;
23
import org.gephi.ranking.api.Transformer;
24
import javax.swing.Icon;
25
import javax.swing.JPanel;
26
import org.gephi.ranking.api.Ranking;
29
* Transformer user interface. Implement this interface to create panels associated
30
* to a particular transformer.
32
* The icon and display name are used to create the transformer button in the UI.
34
* Implementors should add the <code>@ServiceProvider</code> annotation to be
35
* registered by the system.
38
* @author Mathieu Bastian
40
public interface TransformerUI {
43
* Returns the transformer's icon
44
* @return the icon of this transformer
46
public Icon getIcon();
49
* Returns the display name of the transformer
50
* @return the display name of this transformer
52
public String getDisplayName();
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
60
public JPanel getPanel(Transformer transformer, Ranking ranking);
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
68
public boolean isUIForTransformer(Transformer transformer);