aboutsummaryrefslogtreecommitdiff
path: root/src/uk/org/ury/testrig/DemoMenuPanel.java
diff options
context:
space:
mode:
authorMatt Windsor <matt@deling.(none)>2011-03-18 08:28:09 +0000
committerMatt Windsor <matt@deling.(none)>2011-03-18 08:28:09 +0000
commitd547f87da5f68c12dede7c9d45618cae11ff5699 (patch)
tree613aa95d94b363c72ba9a7be639c74f76edf81f8 /src/uk/org/ury/testrig/DemoMenuPanel.java
parentc8bb324e757587e742df0824304144e1eb881cee (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/testrig/DemoMenuPanel.java')
-rw-r--r--src/uk/org/ury/testrig/DemoMenuPanel.java90
1 files changed, 90 insertions, 0 deletions
diff --git a/src/uk/org/ury/testrig/DemoMenuPanel.java b/src/uk/org/ury/testrig/DemoMenuPanel.java
new file mode 100644
index 0000000..69cf982
--- /dev/null
+++ b/src/uk/org/ury/testrig/DemoMenuPanel.java
@@ -0,0 +1,90 @@
+package uk.org.ury.testrig;
+
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.JButton;
+
+import uk.org.ury.frontend.FrontendMaster;
+import uk.org.ury.frontend.FrontendModulePanel;
+import uk.org.ury.frontend.exceptions.LoadFailureException;
+
+public class DemoMenuPanel extends FrontendModulePanel
+{
+ /**
+ *
+ */
+ private static final long serialVersionUID = 5268978856289909262L;
+
+
+ /**
+ * Construct a new DemoMenuPanel.
+ *
+ * @param inMaster The new frontend master of the panel, if any.
+ */
+
+ public
+ DemoMenuPanel (FrontendMaster inMaster)
+ {
+ super (null, inMaster);
+
+ setLayout (new GridLayout (2, 1));
+
+ JButton lb = new JButton ("Library Viewer Demo");
+ JButton sb = new JButton ("Show Viewer Demo");
+
+ lb.addActionListener (new ActionListener ()
+ {
+ @Override
+ public void
+ actionPerformed (ActionEvent arg0)
+ {
+ try
+ {
+ master.loadModule ("library.viewer.LibraryViewer",
+ "testrig.DemoControlPanel");
+ }
+ catch (LoadFailureException e)
+ {
+ master.fatalError (e.getMessage ());
+ }
+ }
+ });
+
+
+ sb.addActionListener (new ActionListener ()
+ {
+ @Override
+ public void
+ actionPerformed (ActionEvent arg0)
+ {
+ try
+ {
+ master.loadModule ("show.viewer.ShowViewer",
+ "testrig.DemoControlPanel");
+ }
+ catch (LoadFailureException e)
+ {
+ master.fatalError (e.getMessage ());
+ }
+ }
+ });
+
+
+ add (lb);
+ add (sb);
+ }
+
+
+ /**
+ * @return the name of the module.
+ */
+
+ @Override
+ public String
+ getName ()
+ {
+ return "Demo Menu";
+ }
+}