Skip to content

Package: AudioRendererPresentation

AudioRendererPresentation

Coverage

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:
29: import javax.annotation.Nonnull;
30: import javafx.beans.property.DoubleProperty;
31: import javafx.beans.property.Property;
32: import javafx.beans.property.SimpleDoubleProperty;
33: import javafx.beans.property.SimpleStringProperty;
34: import it.tidalwave.role.ui.UserAction;
35: import lombok.Getter;
36: import lombok.ToString;
37: import lombok.experimental.Accessors;
38:
39: /***********************************************************************************************************************
40: *
41: * The Presentation of the renderer of audio media files.
42: *
43: * @stereotype Presentation
44: *
45: * @author Fabrizio Giudici
46: *
47: **********************************************************************************************************************/
48: public interface AudioRendererPresentation
49: {
50: /*******************************************************************************************************************
51: *
52: *
53: ******************************************************************************************************************/
54: @Getter @Accessors(fluent = true) @ToString
55: public static class Properties
56: {
57: private final Property<String> titleProperty = new SimpleStringProperty("");
58: private final Property<String> folderNameProperty = new SimpleStringProperty("");
59: private final Property<String> artistProperty = new SimpleStringProperty("");
60: private final Property<String> composerProperty = new SimpleStringProperty("");
61: private final Property<String> durationProperty = new SimpleStringProperty("");
62: private final Property<String> playTimeProperty = new SimpleStringProperty("");
63: private final Property<String> nextTrackProperty = new SimpleStringProperty("");
64: private final DoubleProperty progressProperty = new SimpleDoubleProperty(0);
65: }
66:
67: /*******************************************************************************************************************
68: *
69: *
70: ******************************************************************************************************************/
71: public void bind (@Nonnull Properties properties,
72: @Nonnull UserAction prevAction,
73: @Nonnull UserAction rewindAction,
74: @Nonnull UserAction stopAction,
75: @Nonnull UserAction pauseAction,
76: @Nonnull UserAction playAction,
77: @Nonnull UserAction fastForwardAction,
78: @Nonnull UserAction nextAction);
79:
80: /*******************************************************************************************************************
81: *
82: * Shows this presentation on the screen.
83: *
84: ******************************************************************************************************************/
85: public void showUp (@Nonnull Object control);
86:
87: /*******************************************************************************************************************
88: *
89: * Put focus on the play button.
90: *
91: ******************************************************************************************************************/
92: public void focusOnPlayButton();
93:
94: /*******************************************************************************************************************
95: *
96: * Put focus on the stop button.
97: *
98: ******************************************************************************************************************/
99: public void focusOnStopButton();
100: }