Package org.apache.batik.apps.svgbrowser
Class SVGInputHandler
- java.lang.Object
-
- org.apache.batik.apps.svgbrowser.SVGInputHandler
-
- All Implemented Interfaces:
SquiggleInputHandler
public class SVGInputHandler extends java.lang.Object implements SquiggleInputHandler
This implementation of theSquiggleInputHandlerclass simply displays an SVG file into the JSVGCanvas.- Version:
- $Id: SVGInputHandler.java 1805419 2017-08-18 13:04:30Z ssteiner $
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String[]SVG_FILE_EXTENSIONSstatic java.lang.String[]SVG_MIME_TYPES
-
Constructor Summary
Constructors Constructor Description SVGInputHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaccept(java.io.File f)Returns true if the input file can be handled.booleanaccept(java.lang.String path)Returns true if the resource at the given path can be handledbooleanaccept(ParsedURL purl)Returns true if the input URI can be handled by the handlerjava.lang.StringgetDescription()Returns a description for this handler.java.lang.String[]getHandledExtensions()Returns the list of file extensions handled by this handlerjava.lang.String[]getHandledMimeTypes()Returns the list of mime types handled by this handler.voidhandle(ParsedURL purl, JSVGViewerFrame svgViewerFrame)Handles the given input for the given JSVGViewerFrame
-
-
-
Method Detail
-
getHandledMimeTypes
public java.lang.String[] getHandledMimeTypes()
Returns the list of mime types handled by this handler.- Specified by:
getHandledMimeTypesin interfaceSquiggleInputHandler
-
getHandledExtensions
public java.lang.String[] getHandledExtensions()
Returns the list of file extensions handled by this handler- Specified by:
getHandledExtensionsin interfaceSquiggleInputHandler
-
getDescription
public java.lang.String getDescription()
Returns a description for this handler.- Specified by:
getDescriptionin interfaceSquiggleInputHandler
-
handle
public void handle(ParsedURL purl, JSVGViewerFrame svgViewerFrame)
Handles the given input for the given JSVGViewerFrame- Specified by:
handlein interfaceSquiggleInputHandler
-
accept
public boolean accept(java.io.File f)
Returns true if the input file can be handled.- Specified by:
acceptin interfaceSquiggleInputHandler
-
accept
public boolean accept(ParsedURL purl)
Returns true if the input URI can be handled by the handler- Specified by:
acceptin interfaceSquiggleInputHandler- Parameters:
purl- URL describing the candidate input
-
accept
public boolean accept(java.lang.String path)
Returns true if the resource at the given path can be handled
-
-