AudioRendererPresentation.java

  1. /*
  2.  * *********************************************************************************************************************
  3.  *
  4.  * blueMarine II: Semantic Media Centre
  5.  * http://tidalwave.it/projects/bluemarine2
  6.  *
  7.  * Copyright (C) 2015 - 2021 by Tidalwave s.a.s. (http://tidalwave.it)
  8.  *
  9.  * *********************************************************************************************************************
  10.  *
  11.  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
  12.  * the License. You may obtain a copy of the License at
  13.  *
  14.  *     http://www.apache.org/licenses/LICENSE-2.0
  15.  *
  16.  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
  17.  * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the
  18.  * specific language governing permissions and limitations under the License.
  19.  *
  20.  * *********************************************************************************************************************
  21.  *
  22.  * git clone https://bitbucket.org/tidalwave/bluemarine2-src
  23.  * git clone https://github.com/tidalwave-it/bluemarine2-src
  24.  *
  25.  * *********************************************************************************************************************
  26.  */
  27. package it.tidalwave.bluemarine2.ui.audio.renderer;

  28. import javax.annotation.Nonnull;
  29. import javafx.beans.property.DoubleProperty;
  30. import javafx.beans.property.Property;
  31. import javafx.beans.property.SimpleDoubleProperty;
  32. import javafx.beans.property.SimpleStringProperty;
  33. import it.tidalwave.role.ui.UserAction;
  34. import lombok.Getter;
  35. import lombok.ToString;
  36. import lombok.experimental.Accessors;

  37. /***********************************************************************************************************************
  38.  *
  39.  * The Presentation of the renderer of audio media files.
  40.  *
  41.  * @stereotype  Presentation
  42.  *
  43.  * @author  Fabrizio Giudici
  44.  *
  45.  **********************************************************************************************************************/
  46. public interface AudioRendererPresentation
  47.   {
  48.     /*******************************************************************************************************************
  49.      *
  50.      *
  51.      ******************************************************************************************************************/
  52.     @Getter @Accessors(fluent = true) @ToString
  53.     public static class Properties
  54.       {
  55.         private final Property<String> titleProperty = new SimpleStringProperty("");
  56.         private final Property<String> folderNameProperty = new SimpleStringProperty("");
  57.         private final Property<String> artistProperty = new SimpleStringProperty("");
  58.         private final Property<String> composerProperty = new SimpleStringProperty("");
  59.         private final Property<String> durationProperty = new SimpleStringProperty("");
  60.         private final Property<String> playTimeProperty = new SimpleStringProperty("");
  61.         private final Property<String> nextTrackProperty = new SimpleStringProperty("");
  62.         private final DoubleProperty progressProperty = new SimpleDoubleProperty(0);
  63.       }
  64.    
  65.     /*******************************************************************************************************************
  66.      *
  67.      *
  68.      ******************************************************************************************************************/
  69.     public void bind (@Nonnull Properties properties,
  70.                       @Nonnull UserAction prevAction,
  71.                       @Nonnull UserAction rewindAction,
  72.                       @Nonnull UserAction stopAction,
  73.                       @Nonnull UserAction pauseAction,
  74.                       @Nonnull UserAction playAction,
  75.                       @Nonnull UserAction fastForwardAction,
  76.                       @Nonnull UserAction nextAction);
  77.    
  78.     /*******************************************************************************************************************
  79.      *
  80.      * Shows this presentation on the screen.
  81.      *
  82.      ******************************************************************************************************************/
  83.     public void showUp (@Nonnull Object control);
  84.    
  85.     /*******************************************************************************************************************
  86.      *
  87.      * Put focus on the play button.
  88.      *
  89.      ******************************************************************************************************************/
  90.     public void focusOnPlayButton();

  91.     /*******************************************************************************************************************
  92.      *
  93.      * Put focus on the stop button.
  94.      *
  95.      ******************************************************************************************************************/
  96.     public void focusOnStopButton();
  97.   }