~ubuntu-branches/ubuntu/trusty/freeguide/trusty

« back to all changes in this revision

Viewing changes to src/freeguide/plugins/grabber/kulichki/KulichkiConfigurationUIController.java

  • Committer: Bazaar Package Importer
  • Author(s): Shaun Jackman
  • Date: 2007-09-11 16:52:59 UTC
  • mfrom: (1.2.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070911165259-4r32oke21i1ezbmv
Tags: 0.10.5-1
* New upstream release.
* Update the watch file.
* Change Debian policy to version 3.7.2.2. No changes necessary.
* Add ant-optional to build dependencies. Closes: #441762.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
    implements IModuleConfigurationUI
20
20
{
21
21
    final protected GrabberKulichki parent;
22
 
    final protected KulichkiConfigurationUIPanel panel;
 
22
    protected KulichkiConfigurationUIPanel panel;
23
23
    final protected KulichkiConfig config;
24
24
 
25
25
/**
32
32
        this.parent = parent;
33
33
 
34
34
        this.config = (KulichkiConfig)parent.config.clone(  );
35
 
 
36
 
        panel = new KulichkiConfigurationUIPanel( parent.getLocalizer(  ) );
37
 
 
38
 
        panel.getTreeChannels(  ).setData( config.channels );
39
 
 
40
 
        panel.getBtnRefresh(  ).addActionListener( 
41
 
            new ActionListener(  )
42
 
            {
43
 
                public void actionPerformed( ActionEvent e )
44
 
                {
45
 
                    try
46
 
                    {
47
 
                        config.channels.allChannels = parent.getChannelsList(  );
48
 
 
49
 
                        config.channels.normalize(  );
50
 
 
51
 
                        panel.getTreeChannels(  ).setData( config.channels );
52
 
                    }
53
 
                    catch( Exception ex )
54
 
                    {
55
 
                        Application.getInstance(  ).getLogger(  )
56
 
                                   .log( 
57
 
                            Level.WARNING,
58
 
                            "Error load channels list from tv.kulichki.net", ex );
59
 
                    }
60
 
                }
61
 
            } );
62
35
    }
63
36
 
64
37
    /**
68
41
     */
69
42
    public Component getPanel(  )
70
43
    {
 
44
        if( panel == null )
 
45
        {
 
46
            panel = new KulichkiConfigurationUIPanel( parent.getLocalizer(  ) );
 
47
 
 
48
            panel.getTreeChannels(  ).setData( config.channels );
 
49
 
 
50
            panel.getBtnRefresh(  ).addActionListener( 
 
51
                new ActionListener(  )
 
52
                {
 
53
                    public void actionPerformed( ActionEvent e )
 
54
                    {
 
55
                        try
 
56
                        {
 
57
                            config.channels.allChannels = parent
 
58
                                .getChannelsList(  );
 
59
 
 
60
                            config.channels.normalize(  );
 
61
 
 
62
                            panel.getTreeChannels(  ).setData( 
 
63
                                config.channels );
 
64
                        }
 
65
                        catch( Exception ex )
 
66
                        {
 
67
                            Application.getInstance(  ).getLogger(  )
 
68
                                       .log( 
 
69
                                Level.WARNING,
 
70
                                "Error load channels list from tv.kulichki.net",
 
71
                                ex );
 
72
                        }
 
73
                    }
 
74
                } );
 
75
        }
 
76
 
71
77
        return panel;
72
 
 
73
78
    }
74
79
 
75
80
    /**