Search in sources :

Example 1 with VisualizationToggle

use of annis.libgui.VisualizationToggle in project ANNIS by korpling.

the class MediaControllerImpl method play.

@Override
public void play(String resultID, double startTime, double endTime) {
    boolean foundPlayer = false;
    lock.readLock().lock();
    try {
        MediaPlayer player = getPlayerForResult(resultID);
        if (player != null) {
            closeOtherPlayers(player);
            VisualizationToggle t = visToggle.get(player);
            if (t != null) {
                foundPlayer = true;
                t.toggleVisualizer(true, new CallbackImpl(player, startTime, endTime));
            }
        }
    } finally {
        lock.readLock().unlock();
    }
    if (!foundPlayer) {
        Notification.show("Could not play media.", "If this is a match reference open the actual search interface by following the \"Show in ANNIS search interface\" link.", Notification.Type.WARNING_MESSAGE);
    }
}
Also used : VisualizationToggle(annis.libgui.VisualizationToggle) MediaPlayer(annis.libgui.media.MediaPlayer)

Aggregations

VisualizationToggle (annis.libgui.VisualizationToggle)1 MediaPlayer (annis.libgui.media.MediaPlayer)1