Class AbstractSVGGeneratingCanvasProvider
java.lang.Object
org.krysalis.barcode4j.output.AbstractCanvasProvider
org.krysalis.barcode4j.output.AbstractXMLGeneratingCanvasProvider
org.krysalis.barcode4j.output.svg.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 Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringthe SVG namespace: http://www.w3.org/2000/svgFields inherited from class org.krysalis.barcode4j.output.AbstractCanvasProvider
bardim -
Constructor Summary
ConstructorsConstructorDescriptionAbstractSVGGeneratingCanvasProvider(boolean useNamespace, int orientation) Creates a new AbstractSVGCanvasProvider.AbstractSVGGeneratingCanvasProvider(boolean useNamespace, String namespacePrefix, int orientation) Creates a new AbstractSVGCanvasProvider.AbstractSVGGeneratingCanvasProvider(int orientation) Creates a new AbstractSVGCanvasProvider with default settings (with namespaces, but without namespace prefix).AbstractSVGGeneratingCanvasProvider(String namespacePrefix, int orientation) Creates a new AbstractSVGCanvasProvider with namespaces enabled. -
Method Summary
Modifier and TypeMethodDescriptionReturns the namespace prefixprotected StringgetQualifiedName(String localName) Constructs a fully qualified element name based on the namespace settings.booleanIndicates whether namespaces are enabled.Methods inherited from class org.krysalis.barcode4j.output.AbstractXMLGeneratingCanvasProvider
addUnit, getDecimalFormatMethods inherited from class org.krysalis.barcode4j.output.AbstractCanvasProvider
deviceCenteredText, deviceJustifiedText, establishDimensions, getDimensions, getOrientationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.krysalis.barcode4j.output.CanvasProvider
deviceFillRect, deviceText
-
Field Details
-
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 usednamespacePrefix- 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
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
Returns the namespace prefix- Returns:
- the namespace prefix (may be null)
-
getQualifiedName
Constructs a fully qualified element name based on the namespace settings.- Parameters:
localName- the local name- Returns:
- the fully qualified name
-