org.apache.batik.dom.svg

Class AbstractSVGPreserveAspectRatio

public abstract class AbstractSVGPreserveAspectRatio extends Object implements SVGPreserveAspectRatio, SVGConstants

Abstract implementation for SVGPreservAspectRatio This is the base implementation for SVGPreservAspectRatio
Nested Class Summary
protected classAbstractSVGPreserveAspectRatio.PreserveAspectRatioParserHandler
Field Summary
protected static String[]ALIGN_VALUES
Strings for the 'align' values.
protected shortalign
align property by default the value is SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMIDYMID
protected shortmeetOrSlice
meetOrSlice property by default the value is SVGPreserveAspectRatio.SVG_MEETORSLICE_MEET;
protected static String[]MEET_OR_SLICE_VALUES
Strings for the 'meet-or-slice' values.
Constructor Summary
AbstractSVGPreserveAspectRatio()
Creates a new instance of AbstractSVGPreserveAspectRatio
Method Summary
protected abstract DOMExceptioncreateDOMException(short type, String key, Object[] args)
shortgetAlign()
shortgetMeetOrSlice()
static StringgetValueAsString(short align, short meetOrSlice)
Returns a string representation of a preserve aspect ratio value specified numerically.
protected StringgetValueAsString()
Returns the string representation of the preserve aspect ratio value.
voidreset()
voidsetAlign(short align)
protected abstract voidsetAttributeValue(String value)
voidsetMeetOrSlice(short meetOrSlice)
protected voidsetValueAsString(String value)

Field Detail

ALIGN_VALUES

protected static final String[] ALIGN_VALUES
Strings for the 'align' values.

align

protected short align
align property by default the value is SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMIDYMID

meetOrSlice

protected short meetOrSlice
meetOrSlice property by default the value is SVGPreserveAspectRatio.SVG_MEETORSLICE_MEET;

MEET_OR_SLICE_VALUES

protected static final String[] MEET_OR_SLICE_VALUES
Strings for the 'meet-or-slice' values.

Constructor Detail

AbstractSVGPreserveAspectRatio

public AbstractSVGPreserveAspectRatio()
Creates a new instance of AbstractSVGPreserveAspectRatio

Method Detail

createDOMException

protected abstract DOMException createDOMException(short type, String key, Object[] args)

getAlign

public short getAlign()

getMeetOrSlice

public short getMeetOrSlice()

getValueAsString

public static String getValueAsString(short align, short meetOrSlice)
Returns a string representation of a preserve aspect ratio value specified numerically.

Parameters: align the align value, one of the SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_* constants meetOrSlice the meet-or-slice value, one of the SVGPreserveAspectRatio.SVG_MEETORSLICE_* constants

getValueAsString

protected String getValueAsString()
Returns the string representation of the preserve aspect ratio value.

reset

public void reset()

setAlign

public void setAlign(short align)

setAttributeValue

protected abstract void setAttributeValue(String value)

setMeetOrSlice

public void setMeetOrSlice(short meetOrSlice)

setValueAsString

protected void setValueAsString(String value)
Copyright B) 2007 Apache Software Foundation. All Rights Reserved.