~ubuntu-branches/ubuntu/trusty/mediathekview/trusty

« back to all changes in this revision

Viewing changes to src/mediathek/controller/filmeLaden/ListenerFilmeLaden.java

  • Committer: Package Import Robot
  • Author(s): Markus Koschany
  • Date: 2014-01-07 17:25:52 UTC
  • mfrom: (4.1.6 sid)
  • Revision ID: package-import@ubuntu.com-20140107172552-vkv6uixpou3sa5og
Tags: 4-1
* Imported Upstream version 4.
* Declare compliance with Standards-Version 3.9.5.
* Correct a mistake in the last changelog entry.
  - build-dependencies <-> dependencies
* Override lintian warning:incompatible-java-bytecode-format Java7 because
  Java7 is the current default JRE for Jessie. MediathekView also requires
  Java7 to run and is incompatible with Java6 or earlier.
* debian/control: Add libjackson2-core-java, libtimingframework-java and
  libxz-java to Build-Depends-Indep.
* Drop README.source. Now upstream provides a source tarball.
* Refresh modify-ant-build-system.patch.
* debian/rules: Remove get-orig-source target. No longer needed.
* Update mediathekview.manifest. Add new required libraries to classpath.
* Update debian/watch for new versioning scheme.
* Update debian/copyright for new release. Add BSD-3-clause license.
* Update man pages and remove unsupported options.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * MediathekView
3
 
 * Copyright (C) 2008 W. Xaver
4
 
 * W.Xaver[at]googlemail.com
5
 
 * http://zdfmediathk.sourceforge.net/
6
 
 *
7
 
 * This program is free software: you can redistribute it and/or modify
8
 
 * it under the terms of the GNU General Public License as published by
9
 
 * the Free Software Foundation, either version 3 of the License, or
10
 
 * any later version.
11
 
 *
12
 
 * This program is distributed in the hope that it will be useful,
13
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
 
 * GNU General Public License for more details.
16
 
 *
17
 
 * You should have received a copy of the GNU General Public License
18
 
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19
 
 */
20
 
package mediathek.controller.filmeLaden;
21
 
 
22
 
import java.util.EventListener;
23
 
import javax.swing.SwingUtilities;
24
 
import mediathek.tool.Log;
25
 
 
26
 
public class ListenerFilmeLaden implements EventListener {
27
 
 
28
 
    ListenerFilmeLadenEvent event;
29
 
 
30
 
    public void start(ListenerFilmeLadenEvent e) {
31
 
        event = e;
32
 
        run_(new Runnable() {
33
 
            @Override
34
 
            public void run() {
35
 
                // oder da
36
 
                start_(event);
37
 
            }
38
 
        });
39
 
 
40
 
    }
41
 
 
42
 
    public void progress(ListenerFilmeLadenEvent e) {
43
 
        event = e;
44
 
        run_(new Runnable() {
45
 
            @Override
46
 
            public void run() {
47
 
                // oder da
48
 
                progress_(event);
49
 
            }
50
 
        });
51
 
    }
52
 
 
53
 
    public void fertig(ListenerFilmeLadenEvent e) {
54
 
        event = e;
55
 
        run_(new Runnable() {
56
 
            @Override
57
 
            public void run() {
58
 
                // oder da
59
 
                fertig_(event);
60
 
            }
61
 
        });
62
 
    }
63
 
 
64
 
    public void start_(ListenerFilmeLadenEvent event) {
65
 
    }
66
 
 
67
 
    public void progress_(ListenerFilmeLadenEvent event) {
68
 
    }
69
 
 
70
 
    public void fertig_(ListenerFilmeLadenEvent event) {
71
 
    }
72
 
 
73
 
    private void run_(Runnable r) {
74
 
        try {
75
 
            if (SwingUtilities.isEventDispatchThread()) {
76
 
                // entweder hier
77
 
                r.run();
78
 
            } else {
79
 
                SwingUtilities.invokeLater(r);
80
 
            }
81
 
        } catch (Exception ex) {
82
 
            Log.fehlerMeldung(461025879, Log.FEHLER_ART_PROG, "ListenerFilmeLaden.fertig", ex);
83
 
        }
84
 
 
85
 
    }
86
 
}