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/TrackBin.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/TrackBin.java')
-rw-r--r-- | src/uk/org/ury/show/viewer/TrackBin.java | 51 |
1 files changed, 17 insertions, 34 deletions
diff --git a/src/uk/org/ury/show/viewer/TrackBin.java b/src/uk/org/ury/show/viewer/TrackBin.java index a95b183..7234912 100644 --- a/src/uk/org/ury/show/viewer/TrackBin.java +++ b/src/uk/org/ury/show/viewer/TrackBin.java @@ -3,16 +3,10 @@ */ package uk.org.ury.show.viewer; -import java.net.URL; - import javax.swing.JLabel; -import javax.swing.JList; -import javax.swing.JPanel; - -import org.swixml.SwingEngine; -import uk.org.ury.frontend.FrontendError; -import uk.org.ury.frontend.FrontendSubBanner; +import uk.org.ury.frontend.FrontendPanel; +import uk.org.ury.frontend.exceptions.UICreationFailureException; /** @@ -21,10 +15,17 @@ import uk.org.ury.frontend.FrontendSubBanner; * @author Matt Windsor. */ -public class TrackBin extends JPanel +public class TrackBin extends FrontendPanel { + /** + * + */ + private static final long serialVersionUID = -5414923374901972511L; + + + /* Components created and exposed by the XML engine. */ + private JLabel binName; - private JList itemList; /** @@ -34,37 +35,19 @@ public class TrackBin extends JPanel * XML manifest "track_bin.xml" in the same directory as * this class file. * + * TODO: add track list into constructor + * * @param name The name of the bin. * - * TODO: add track list into constructor + * @throws UICreationFailureException if the UI creation fails. */ public TrackBin (String name) + throws UICreationFailureException { - super (); - - // Acquire path. - - URL path = getClass ().getResource ("track_bin.xml"); - - if (path == null) - FrontendError.reportFatal ("UI creation failure: XML layout does not exist.", null); - - SwingEngine se = new SwingEngine (this); - se.getTaglib ().registerTag ("subbanner", FrontendSubBanner.class); - - // Read the XML. - - try - { - se.insert (path, this); - } - catch (Exception e) - { - FrontendError.reportFatal ("UI creation failure: " + e.getMessage (), null); - } - + super ("track_bin.xml", null); + // Tweak name. binName.setText (name); |