diff options
author | Matt Windsor <matt@deling.(none)> | 2011-03-18 08:28:09 +0000 |
---|---|---|
committer | Matt Windsor <matt@deling.(none)> | 2011-03-18 08:28:09 +0000 |
commit | d547f87da5f68c12dede7c9d45618cae11ff5699 (patch) | |
tree | 613aa95d94b363c72ba9a7be639c74f76edf81f8 /src/uk/org/ury/show/viewer/ShowViewerPanel.java | |
parent | c8bb324e757587e742df0824304144e1eb881cee (diff) |
Mega-commit to the rescue! Added Javadoc snapshot (admittedly old); show UI now fixed-layout; UI uses system selection colours for accents; now uses bapsserver password and can thus talk to show database relations; removed member relation dependencies until further notice; attempted to get application and applet launchers working but having issues with the latter; started working on a server communicating via a minimal implementation of HTTP 1.1 (standardisation required eventually).
Diffstat (limited to 'src/uk/org/ury/show/viewer/ShowViewerPanel.java')
-rw-r--r-- | src/uk/org/ury/show/viewer/ShowViewerPanel.java | 44 |
1 files changed, 37 insertions, 7 deletions
diff --git a/src/uk/org/ury/show/viewer/ShowViewerPanel.java b/src/uk/org/ury/show/viewer/ShowViewerPanel.java index e9cce90..ce1b794 100644 --- a/src/uk/org/ury/show/viewer/ShowViewerPanel.java +++ b/src/uk/org/ury/show/viewer/ShowViewerPanel.java @@ -4,17 +4,23 @@ package uk.org.ury.show.viewer; import java.awt.GridLayout; +import java.util.List; import javax.swing.JPanel; -import javax.swing.JSplitPane; +import uk.org.ury.database.exceptions.QueryFailureException; import uk.org.ury.frontend.FrontendMaster; import uk.org.ury.frontend.FrontendModulePanel; +import uk.org.ury.frontend.exceptions.LoadFailureException; +import uk.org.ury.frontend.exceptions.UICreationFailureException; import uk.org.ury.show.ShowChannel; /** - * Frontend panel providing access to an underlying lshow viewer. + * Frontend panel providing access to an underlying show viewer. + * + * The various show user interfaces (show editor, playout etc.) + * are derived from this. * * @author Matt Windsor, Nathan Lasseter */ @@ -29,21 +35,27 @@ public class ShowViewerPanel extends FrontendModulePanel /* Panel widgets exposed by the SwiXML user interface. */ - private JSplitPane mainSplit; - private JSplitPane binSplit; private JPanel channelGroupPanel; private JPanel binGroupPanel; + /** * Construct a new ShowViewerPanel. * + * The panel will interface with the given show viewer and is + * expected to be placed as a sub-component in the given + * FrontendMaster. + * * @param viewer The ShowViewer controlling this LibraryViewerPanel. * * @param master The FrontendMaster driving the frontend. + * + * @throws UICreationFailureException if the UI creation fails. */ public ShowViewerPanel (ShowViewer viewer, FrontendMaster master) + throws UICreationFailureException { super (viewer, "show_viewer_gui.xml", master); @@ -62,7 +74,17 @@ public class ShowViewerPanel extends FrontendModulePanel // TEST - String binNames[] = {"Jingles", "Beds", "Adverts"}; + List<String> binNames = null; + + try + { + binNames = viewer.getBins (); + } + catch (QueryFailureException e) + { + master.fatalError (e.getMessage ()); + } + TrackBin tb; for (String name : binNames) @@ -72,7 +94,7 @@ public class ShowViewerPanel extends FrontendModulePanel binGroupPanel.add (tb); } - binGroupPanel.setLayout (new GridLayout (1, 3)); + binGroupPanel.setLayout (new GridLayout (1, binNames.size ())); } @@ -98,6 +120,14 @@ public class ShowViewerPanel extends FrontendModulePanel public void search () { - master.loadModule ("library.viewer.LibraryViewer", "show.viewer.LibraryControlPanel"); + try + { + master.loadModule ("library.viewer.LibraryViewer", + "show.viewer.LibraryControlPanel"); + } + catch (LoadFailureException e) + { + master.fatalError (e.getMessage ()); + } } } |