annotate WebContent/index.jsp @ 39:b31c64b316c5

the orientation now uses a dropdown; some css work.
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Thu, 12 Dec 2013 17:08:58 +0000
parents 91ecbdda6f4a
children 65a26b38bf43
rev   line source
luis@0 1 <%@ page contentType="text/html;charset=UTF-8" language="java" %>
luis@32 2 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
luis@0 3 <html>
luis@0 4 <head>
luis@13 5 <title>Human Echolocation</title>
luis@0 6 <link rel="Stylesheet" type="text/css" media=all href="./StyleSheet.css" />
luis@0 7 <link href="StyleSheet.css" rel="stylesheet" type="text/css" />
luis@27 8
luis@38 9 <!-- no default value for distance -->
luis@32 10 <c:choose>
luis@32 11 <c:when test="${not empty param.dist}">
luis@32 12 <c:set var="dist" value="${param.dist}" />
luis@32 13 <c:set var="distSet" value="true" />
luis@32 14 </c:when>
luis@32 15 <c:otherwise>
luis@32 16 <c:set var="distSet" value="false" />
luis@32 17 </c:otherwise>
luis@32 18 </c:choose>
luis@32 19
luis@38 20 <!-- Default values for remaining parameters -->
luis@38 21 <c:set var="azim" value="0" />
luis@38 22 <c:set var="dirweight" value="0.2" />
luis@38 23 <c:set var="orient" value="horz" />
luis@38 24
luis@38 25 <c:if test="${not empty param.azim}">
luis@38 26 <c:set var="azim" value="${param.azim}" />
luis@38 27 </c:if>
luis@38 28 <c:if test="${not empty param.dirweight}">
luis@38 29 <c:set var="dirweight" value="${param.dirweight}" />
luis@38 30 </c:if>
luis@38 31 <c:if test="${not empty param.orient}">
luis@38 32 <c:set var="orient" value="${param.orient}" />
luis@38 33 </c:if>
luis@32 34
luis@0 35 </head>
luis@0 36
luis@0 37 <body>
luis@32 38 <form action="index.jsp" method="get">
luis@32 39 <div style="text-align: center">
luis@32 40 <table width="760" cellpadding="0" cellspacing="0">
luis@32 41 <tr>
luis@32 42 <td><img src="header_bg.jpg" alt="Header Image Not Found" width="779" height="72" /></td>
luis@32 43 </tr>
luis@32 44 </table>
luis@32 45 <br />
luis@27 46
luis@32 47 <h1>Human Echolocation WebApp Example Page</h1>
luis@0 48
luis@32 49 Input parameters:
luis@32 50 <br />
luis@32 51 Distance (typical value: 0.9):
luis@38 52 <input type="text" name="dist" size="8" value="${dist}">
luis@32 53 <br />
luis@32 54 Azimuth (-17 to +17):
luis@38 55 <input type="text" name="azim" size="8" value="${azim}" >
luis@32 56 <br />
luis@39 57
luis@39 58 Orientation:<br>
luis@39 59 <div align="left"><br>
luis@39 60 <input type="radio" name="orient" value="horz" checked> Horizontal<br>
luis@39 61 <input type="radio" name="orient" value="angled"> Angled<br />
luis@39 62 </div>
luis@39 63
luis@39 64
luis@39 65 Dirweight ():
luis@38 66 <input type="text" name="dirweight" size="8" value="${dirweight}">
luis@32 67 <br />
luis@32 68 <p class="description">Controls how easy it is to distinguish whether the reflector is to the left or the right (the lower .dirweight is, the easier).</p>
luis@0 69
luis@32 70 <input type="submit" value="Generate">
luis@32 71 <br />
luis@26 72
luis@32 73 <br />
luis@32 74 </div>
luis@32 75 </form>
luis@27 76
luis@39 77 <div class="player">
luis@32 78 <c:choose>
luis@32 79 <c:when test="${distSet==true}">
luis@38 80 <embed src="/echoapp/HumanEcho?dist=<c:out value="${dist}"/>&amp;azim=<c:out value="${azim}"/>&amp;dirweight=<c:out value="${dirweight}"/>&amp;orient=<c:out value="${orient}"/>" type="audio/x-wav"/>
luis@32 81 </c:when>
luis@32 82 <c:otherwise>
luis@32 83 <c:out value="Cowardly refusing to generate a player without distance parameter..."/>
luis@32 84 </c:otherwise>
luis@32 85 </c:choose>
luis@32 86 </div>
luis@32 87 <br />
luis@39 88
luis@39 89 <div class="debug">
luis@39 90 <h3>Debug info</h3>
luis@39 91 <p>
luis@39 92 Distance: <c:out value="${dist}"/>;
luis@39 93 Azim: <c:out value="${azim}"/>;
luis@39 94 Dirweight: <c:out value="${dirweight}"/>;
luis@39 95 Orient: <c:out value="${orient}"/>
luis@39 96 </p>
luis@39 97 </div>
luis@39 98
luis@0 99 </body>
luis@0 100 </html>
luis@0 101