001    package nl.cwi.sen1.visplugin.linechart;
002    
003    import nl.cwi.sen1.visplugin.VisualizationPluginController;
004    import nl.cwi.sen1.visplugin.VisualizationPluginWindow;
005    import aterm.ATerm;
006    
007    /**
008     * LineChart Plugin Visualisation Controller. Controller for the Line Chart
009     * Window.
010     * 
011     * @author Raymond Bergen
012     * @date 14-03-2007
013     */
014    public class LCVisualizationController extends
015            VisualizationPluginController {
016    
017        /**
018         * Constructor.
019         * 
020         * @author Raymond Bergen
021         * @date 14-03-2007
022         */
023        public LCVisualizationController() {
024            super();
025        }
026    
027        /**
028         * Creates a LineChartVisualizationWindow.
029         * 
030         * @author Raymond Bergen
031         * @date 14-03-2007
032         */
033        public VisualizationPluginWindow createWindow() {
034            return new LCVisualizationWindow();
035        }
036    
037        /**
038         * Creates a LineChartVisualizationWindow.
039         * 
040         * @return Name of this plugin.
041         * @author Raymond Bergen
042         * @date 14-03-2007
043         */
044        public String getPluginName() {
045            return "Line chart";
046        }
047    
048        /**
049         * Returns array holding the types supported by this plugin.
050         * 
051         * @return Array of supported ATerms
052         * @author Raymond Bergen
053         * @date 07-3-2007
054         */
055        public ATerm[] getSupportedTypes() {
056            ATerm[] atermList = { makeATerm("relation([int,int])") };
057            return atermList;
058        }
059    
060        /**
061         * Creates an aterm based on a String.
062         * 
063         * @return ATerms created from String
064         * @author A. Belgraver
065         * @author R. van Remortel
066         * @date 07-3-2007
067         */
068        private ATerm makeATerm(String type) {
069            return m_factory.RTypeFromString(type);
070        }
071    
072    }