diff options
author | Matt Windsor <mbw500@student.cs.york.ac.uk> | 2011-03-07 13:50:24 +0000 |
---|---|---|
committer | Matt Windsor <mbw500@student.cs.york.ac.uk> | 2011-03-07 13:50:24 +0000 |
commit | 9b4647f1ae8c3f41163d0d4053504dab861d0c94 (patch) | |
tree | b621e8c0b75a5cadd69f938116b1637f7ad0c94d /src/uk/org/ury/show/viewer/ShowViewerPanel.java | |
parent | c33f098de8a43a2df778d4d694e0c07bbde59828 (diff) |
Emergency impending hard drive failure dump - lots of changes on the frontend, but they're all potentially controversial so I'm not pushing to master yet. Beginnings of show viewer. Application now run through demo menu, which allows for the links between modules to be tested.
Diffstat (limited to 'src/uk/org/ury/show/viewer/ShowViewerPanel.java')
-rw-r--r-- | src/uk/org/ury/show/viewer/ShowViewerPanel.java | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/src/uk/org/ury/show/viewer/ShowViewerPanel.java b/src/uk/org/ury/show/viewer/ShowViewerPanel.java new file mode 100644 index 0000000..d276420 --- /dev/null +++ b/src/uk/org/ury/show/viewer/ShowViewerPanel.java @@ -0,0 +1,82 @@ +/** + * + */ +package uk.org.ury.show.viewer; + +import javax.swing.JButton; +import javax.swing.JPanel; + +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; + + private JPanel channelGroupPanel; + + /* Panel widgets exposed by the SwiXML user interface. */ + + + /** + * 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++; + } + } + + + /** + * @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"); + } +} |