blob: e9cce9010566cea38d58295407ca10820d280b40 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
/**
*
*/
package uk.org.ury.show.viewer;
import java.awt.GridLayout;
import javax.swing.JPanel;
import javax.swing.JSplitPane;
import uk.org.ury.frontend.FrontendMaster;
import uk.org.ury.frontend.FrontendModulePanel;
import uk.org.ury.show.ShowChannel;
/**
* Frontend panel providing access to an underlying lshow viewer.
*
* @author Matt Windsor, Nathan Lasseter
*/
public class ShowViewerPanel extends FrontendModulePanel
{
/**
*
*/
private static final long serialVersionUID = -2441616418398056712L;
/* Panel widgets exposed by the SwiXML user interface. */
private JSplitPane mainSplit;
private JSplitPane binSplit;
private JPanel channelGroupPanel;
private JPanel binGroupPanel;
/**
* Construct a new ShowViewerPanel.
*
* @param viewer The ShowViewer controlling this LibraryViewerPanel.
*
* @param master The FrontendMaster driving the frontend.
*/
public
ShowViewerPanel (ShowViewer viewer, FrontendMaster master)
{
super (viewer, "show_viewer_gui.xml", master);
int channelNumber = 1;
ChannelPanel cp;
for (ShowChannel channel : viewer.getChannels ())
{
cp = new ChannelPanel (channelNumber, channel);
channelGroupPanel.add (cp);
channelNumber++;
}
channelGroupPanel.setLayout (new GridLayout (1, channelNumber - 1));
// TEST
String binNames[] = {"Jingles", "Beds", "Adverts"};
TrackBin tb;
for (String name : binNames)
{
tb = new TrackBin (name);
binGroupPanel.add (tb);
}
binGroupPanel.setLayout (new GridLayout (1, 3));
}
/**
* @return the name of the panel.
*
* @see uk.org.ury.frontend.FrontendModulePanel#getName()
*/
@Override
public String
getName ()
{
return "Show Viewer Demo";
}
/**
* Initialise the library viewer for the purposes of adding tracks
* and/or browsing the library.
*/
public void
search ()
{
master.loadModule ("library.viewer.LibraryViewer", "show.viewer.LibraryControlPanel");
}
}
|