%--
Document : demo
Created on : Dec 18, 2013, 3:04:09 PM
Author : jbf
--%>
<%@page import="java.io.FilenameFilter"%>
<%@page import="java.io.File"%>
<%@page import="org.autoplot.servlet.ServletUtil"%>
<%@page import="org.autoplot.servlet.SimpleServlet"%>
<%@page import="java.net.URLEncoder"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
Autoplot Servlet Image Zoom
<%
String vap= request.getParameter("vap");
String uri= request.getParameter("uri");
String id= request.getParameter("id");
String[] dropList= null;
String loadingMessage= null;
if ( id!=null ) {
File f= new File( new File( ServletUtil.getServletHome(), "users" ), id );
if ( f.exists() ) {
String s= f.getAbsolutePath();
String[] ss= f.list( );
int count=0;
for ( int i=0; i0 ) {
ssArg= "vap="+URLEncoder.encode(dropList[0],"US-ASCII");
} else {
if ( id!=null ) {
throw new IllegalArgumentException("id specified contains no vap files in "+ ServletUtil.getServletHome().toString()+"/users" );
} else {
out.println("vap file or uri not specified, or id can be one of: ");
File f= new File( ServletUtil.getServletHome().toString()+"/users" );
String[] ff= f.list();
if ( ff==null ) {
out.println("Server has not been configured. It should contain folders in " +ServletUtil.getServletHome().toString()+"/users");
} else {
for ( String s: ff ) {
out.println(""+s+" ");
}
}
out.println("
<%
if ( id!=null ) {
File f= new File( new File( ServletUtil.getServletHome(), "users" ), id );
out.println( ".vap files in " + f + ":");
if ( dropList!=null ) {
for ( String s: dropList ) {
String label= s.substring(f.toString().length()+1);
out.println( ""+label+"" );
}
}
}
%>
Click and drag a range on the plot to zoom in. Buttons below zoom out
and scan. Click to read coordinates, and the center button will center the
plot on this click position.
Note there is also a version of this at http://autoplot.org/git/web/thin/zoom/demo.html.
<%= SimpleServlet.version %>