Package jmri.web.servlet.frameimage
Class JmriJFrameServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- jmri.web.servlet.frameimage.JmriJFrameServlet
-
- All Implemented Interfaces:
java.io.Serializable,javax.servlet.Servlet,javax.servlet.ServletConfig
@WebServlet(name="FrameServlet", urlPatterns="/frame") public class JmriJFrameServlet extends javax.servlet.http.HttpServletA simple servlet that returns a JMRI window as a PNG image or enclosing HTML file.The suffix of the request determines which.
- .html
- Returns a HTML file that displays the frame enabled for clicking via server side image map; see the .properties file for the content
- .png
- Just return the image
- no name
- Return an HTML page with links to available images
The associated .properties file contains the HTML fragments used to form replies.
Parts taken from Core Web Programming from Prentice Hall and Sun Microsystems Press, http://www.corewebprogramming.com/. © 2001 Marty Hall and Larry Brown; may be freely used or adapted.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description JmriJFrameServlet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclickOnEditorPane(java.awt.Component c, int x, int y, JmriJFrame f)protected voiddoGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)protected voiddoGetOnSwing(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)protected voiddoPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)protected java.util.Map<java.lang.String,java.lang.String[]>populateParameterMap(java.util.Map<java.lang.String,java.lang.String[]> map)(package private) voidsendClick(java.lang.String name, java.awt.Component c, int xg, int yg, java.awt.Container frameContentPane)-
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
-
-
-
-
Constructor Detail
-
JmriJFrameServlet
public JmriJFrameServlet()
-
-
Method Detail
-
sendClick
void sendClick(java.lang.String name, @Nonnull java.awt.Component c, int xg, int yg, java.awt.Container frameContentPane)
-
doGet
protected void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
- Overrides:
doGetin classjavax.servlet.http.HttpServlet- Throws:
javax.servlet.ServletExceptionjava.io.IOException
-
doGetOnSwing
protected void doGetOnSwing(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
- Throws:
javax.servlet.ServletExceptionjava.io.IOException
-
doPost
protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
- Overrides:
doPostin classjavax.servlet.http.HttpServlet- Throws:
javax.servlet.ServletExceptionjava.io.IOException
-
populateParameterMap
protected java.util.Map<java.lang.String,java.lang.String[]> populateParameterMap(@Nonnull java.util.Map<java.lang.String,java.lang.String[]> map)
-
clickOnEditorPane
public void clickOnEditorPane(@Nonnull java.awt.Component c, int x, int y, JmriJFrame f)
-
-