Class AbstractSVGGeneratingCanvasProvider

All Implemented Interfaces:
CanvasProvider
Direct Known Subclasses:
SVGCanvasProvider

public abstract class AbstractSVGGeneratingCanvasProvider extends AbstractXMLGeneratingCanvasProvider
Abstract base class for implementations that generate SVG.
Version:
$Id: AbstractSVGGeneratingCanvasProvider.java,v 1.3 2006-11-07 16:43:36 jmaerki Exp $
Author:
Jeremias Maerki
  • Field Details

    • SVG_NAMESPACE

      public static final String SVG_NAMESPACE
      the SVG namespace: http://www.w3.org/2000/svg
      See Also:
  • Constructor Details

    • AbstractSVGGeneratingCanvasProvider

      public AbstractSVGGeneratingCanvasProvider(boolean useNamespace, String namespacePrefix, int orientation) throws BarcodeCanvasSetupException
      Creates a new AbstractSVGCanvasProvider.
      Parameters:
      useNamespace - Controls whether namespaces should be used
      namespacePrefix - the namespace prefix to use, null for no prefix
      Throws:
      BarcodeCanvasSetupException - if setting up the provider fails
    • AbstractSVGGeneratingCanvasProvider

      public AbstractSVGGeneratingCanvasProvider(String namespacePrefix, int orientation) throws BarcodeCanvasSetupException
      Creates a new AbstractSVGCanvasProvider with namespaces enabled.
      Parameters:
      namespacePrefix - the namespace prefix to use, null for no prefix
      Throws:
      BarcodeCanvasSetupException - if setting up the provider fails
    • AbstractSVGGeneratingCanvasProvider

      public AbstractSVGGeneratingCanvasProvider(boolean useNamespace, int orientation) throws BarcodeCanvasSetupException
      Creates a new AbstractSVGCanvasProvider.
      Parameters:
      useNamespace - Controls whether namespaces should be used
      Throws:
      BarcodeCanvasSetupException - if setting up the provider fails
    • AbstractSVGGeneratingCanvasProvider

      public AbstractSVGGeneratingCanvasProvider(int orientation) throws BarcodeCanvasSetupException
      Creates a new AbstractSVGCanvasProvider with default settings (with namespaces, but without namespace prefix).
      Throws:
      BarcodeCanvasSetupException - if setting up the provider fails
  • Method Details

    • isNamespaceEnabled

      public boolean isNamespaceEnabled()
      Indicates whether namespaces are enabled.
      Returns:
      true if namespaces are enabled
    • getNamespacePrefix

      public String getNamespacePrefix()
      Returns the namespace prefix
      Returns:
      the namespace prefix (may be null)
    • getQualifiedName

      protected String getQualifiedName(String localName)
      Constructs a fully qualified element name based on the namespace settings.
      Parameters:
      localName - the local name
      Returns:
      the fully qualified name