~keheliya-gallaba/gephi/maven-build

« back to all changes in this revision

Viewing changes to exporter.api/src/main/java/org/gephi/io/exporter/spi/ExporterUI.java

  • Committer: Keheliya Gallaba
  • Date: 2011-07-31 09:31:25 UTC
  • Revision ID: keheliya.gallaba@gmail.com-20110731093125-kc48b8g95r9e3pl2
Adding Export API

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.io.exporter.spi;
 
22
 
 
23
import javax.swing.JPanel;
 
24
 
 
25
/**
 
26
 * Define exporter settings user interface.
 
27
 *
 
28
 * @author Mathieu Bastian
 
29
 */
 
30
public interface ExporterUI {
 
31
 
 
32
    /**
 
33
     * Returns the exporter settings panel.
 
34
     *
 
35
     * @return a settings panel, or <code>null</code>
 
36
     */
 
37
    public JPanel getPanel();
 
38
 
 
39
    /**
 
40
     * Link the UI to the exporter and therefore to settings values. This method
 
41
     * is called after <code>getPanel()</code> to push settings.
 
42
     *
 
43
     * @param exporter  the exporter that settings is to be set
 
44
     */
 
45
    public void setup(Exporter exporter);
 
46
 
 
47
    /**
 
48
     * Notify UI the settings panel has been closed and that new values can be
 
49
     * written.
 
50
     *
 
51
     * @param update    <code>true</code> if user clicked OK or <code>false</code>
 
52
     *                  if CANCEL.
 
53
     */
 
54
    public void unsetup(boolean update);
 
55
 
 
56
    /**
 
57
     * Returns <code>true</code> if this UI belongs to the given exporter.
 
58
     *
 
59
     * @param exporter  the exporter that has to be tested
 
60
     * @return          <code>true</code> if the UI is matching with <code>exporter</code>,
 
61
     *                  <code>false</code> otherwise.
 
62
     */
 
63
    public boolean isUIForExporter(Exporter exporter);
 
64
 
 
65
    /**
 
66
     * Returns the exporter display name
 
67
     * @return          the exporter display name
 
68
     */
 
69
    public String getDisplayName();
 
70
}