Package org.apache.batik.bridge
Class ViewBox.ViewHandler
- java.lang.Object
-
- org.apache.batik.parser.AWTTransformProducer
-
- org.apache.batik.bridge.ViewBox.ViewHandler
-
- All Implemented Interfaces:
FragmentIdentifierHandler
,PreserveAspectRatioHandler
,TransformListHandler
- Enclosing class:
- ViewBox
protected static class ViewBox.ViewHandler extends AWTTransformProducer implements FragmentIdentifierHandler
This class can be used to store the value of the attribute viewBox or can also be used to store the various attribute value that can be specified on a SVG URI fragments.
-
-
Field Summary
Fields Modifier and Type Field Description short
align
boolean
hasId
boolean
hasPreserveAspectRatio
boolean
hasTransform
boolean
hasViewBox
boolean
hasViewTargetParams
boolean
hasZoomAndPanParams
java.lang.String
id
boolean
isMagnify
boolean
meet
float[]
viewBox
java.lang.String
viewTargetParams
-
Fields inherited from class org.apache.batik.parser.AWTTransformProducer
affineTransform
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ViewHandler()
Constructs a newViewHandler
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
endFragmentIdentifier()
Invoked when the fragment identifier ends.void
endPreserveAspectRatio()
Invoked when the PreserveAspectRatio parsing ends.void
endTransformList()
ImplementsTransformListHandler.endTransformList()
.void
endViewTarget()
Invoked when a view target specification ends.void
idReference(java.lang.String s)
Invoked when an ID has been parsed.void
meet()
Invoked when 'meet' has been parsed.void
none()
Invoked when 'none' been parsed.void
slice()
Invoked when 'slice' has been parsed.void
startFragmentIdentifier()
Invoked when the fragment identifier starts.void
startPreserveAspectRatio()
Invoked when the PreserveAspectRatio parsing starts.void
startViewTarget()
Invoked when a view target specification starts.void
viewBox(float x, float y, float width, float height)
Invoked when 'viewBox(x,y,width,height)' has been parsed.void
viewTarget(java.lang.String name)
Invoked when a identifier has been parsed within a view target specification.void
xMaxYMax()
Invoked when 'xMaxYMax' has been parsed.void
xMaxYMid()
Invoked when 'xMaxYMid' has been parsed.void
xMaxYMin()
Invoked when 'xMaxYMin' has been parsed.void
xMidYMax()
Invoked when 'xMidYMax' has been parsed.void
xMidYMid()
Invoked when 'xMidYMid' has been parsed.void
xMidYMin()
Invoked when 'xMidYMin' has been parsed.void
xMinYMax()
Invoked when 'xMinYMax' has been parsed.void
xMinYMid()
Invoked when 'xMinYMid' has been parsed.void
xMinYMin()
Invoked when 'xMinYMin' has been parsed.void
zoomAndPan(boolean magnify)
Invoked when a 'zoomAndPan' specification has been parsed.-
Methods inherited from class org.apache.batik.parser.AWTTransformProducer
createAffineTransform, createAffineTransform, getAffineTransform, matrix, rotate, rotate, scale, scale, skewX, skewY, startTransformList, translate, translate
-
-
-
-
Field Detail
-
hasTransform
public boolean hasTransform
-
hasId
public boolean hasId
-
hasViewBox
public boolean hasViewBox
-
hasViewTargetParams
public boolean hasViewTargetParams
-
hasZoomAndPanParams
public boolean hasZoomAndPanParams
-
id
public java.lang.String id
-
viewBox
public float[] viewBox
-
viewTargetParams
public java.lang.String viewTargetParams
-
isMagnify
public boolean isMagnify
-
hasPreserveAspectRatio
public boolean hasPreserveAspectRatio
-
align
public short align
-
meet
public boolean meet
-
-
Method Detail
-
endTransformList
public void endTransformList() throws ParseException
Description copied from class:AWTTransformProducer
ImplementsTransformListHandler.endTransformList()
.- Specified by:
endTransformList
in interfaceTransformListHandler
- Overrides:
endTransformList
in classAWTTransformProducer
- Throws:
ParseException
- if an error occured while processing the transform
-
startFragmentIdentifier
public void startFragmentIdentifier() throws ParseException
Invoked when the fragment identifier starts.- Specified by:
startFragmentIdentifier
in interfaceFragmentIdentifierHandler
- Throws:
ParseException
- if an error occured while processing the fragment identifier
-
idReference
public void idReference(java.lang.String s) throws ParseException
Invoked when an ID has been parsed.- Specified by:
idReference
in interfaceFragmentIdentifierHandler
- Parameters:
s
- The string that represents the parsed ID.- Throws:
ParseException
- if an error occured while processing the fragment identifier
-
viewBox
public void viewBox(float x, float y, float width, float height) throws ParseException
Invoked when 'viewBox(x,y,width,height)' has been parsed.- Specified by:
viewBox
in interfaceFragmentIdentifierHandler
- Parameters:
x
- the viewbox x coordinatey
- the viewbox y coordinatewidth
- the viewbox widthheight
- the viewbox height- Throws:
ParseException
- if an error occured while processing the fragment identifier
-
startViewTarget
public void startViewTarget() throws ParseException
Invoked when a view target specification starts.- Specified by:
startViewTarget
in interfaceFragmentIdentifierHandler
- Throws:
ParseException
- if an error occured while processing the fragment identifier
-
viewTarget
public void viewTarget(java.lang.String name) throws ParseException
Invoked when a identifier has been parsed within a view target specification.- Specified by:
viewTarget
in interfaceFragmentIdentifierHandler
- Parameters:
name
- the target name.- Throws:
ParseException
- if an error occured while processing the fragment identifier
-
endViewTarget
public void endViewTarget() throws ParseException
Invoked when a view target specification ends.- Specified by:
endViewTarget
in interfaceFragmentIdentifierHandler
- Throws:
ParseException
- if an error occured while processing the fragment identifier
-
zoomAndPan
public void zoomAndPan(boolean magnify)
Invoked when a 'zoomAndPan' specification has been parsed.- Specified by:
zoomAndPan
in interfaceFragmentIdentifierHandler
- Parameters:
magnify
- true if 'magnify' has been parsed.- Throws:
ParseException
- if an error occured while processing the fragment identifier
-
endFragmentIdentifier
public void endFragmentIdentifier() throws ParseException
Invoked when the fragment identifier ends.- Specified by:
endFragmentIdentifier
in interfaceFragmentIdentifierHandler
- Throws:
ParseException
- if an error occured while processing the fragment identifier
-
startPreserveAspectRatio
public void startPreserveAspectRatio() throws ParseException
Invoked when the PreserveAspectRatio parsing starts.- Specified by:
startPreserveAspectRatio
in interfacePreserveAspectRatioHandler
- Throws:
ParseException
- if an error occured while processing the transform
-
none
public void none() throws ParseException
Invoked when 'none' been parsed.- Specified by:
none
in interfacePreserveAspectRatioHandler
- Throws:
ParseException
- if an error occured while processing the transform
-
xMaxYMax
public void xMaxYMax() throws ParseException
Invoked when 'xMaxYMax' has been parsed.- Specified by:
xMaxYMax
in interfacePreserveAspectRatioHandler
- Throws:
ParseException
- if an error occured while processing the transform
-
xMaxYMid
public void xMaxYMid() throws ParseException
Invoked when 'xMaxYMid' has been parsed.- Specified by:
xMaxYMid
in interfacePreserveAspectRatioHandler
- Throws:
ParseException
- if an error occured while processing the transform
-
xMaxYMin
public void xMaxYMin() throws ParseException
Invoked when 'xMaxYMin' has been parsed.- Specified by:
xMaxYMin
in interfacePreserveAspectRatioHandler
- Throws:
ParseException
- if an error occured while processing the transform
-
xMidYMax
public void xMidYMax() throws ParseException
Invoked when 'xMidYMax' has been parsed.- Specified by:
xMidYMax
in interfacePreserveAspectRatioHandler
- Throws:
ParseException
- if an error occured while processing the transform
-
xMidYMid
public void xMidYMid() throws ParseException
Invoked when 'xMidYMid' has been parsed.- Specified by:
xMidYMid
in interfacePreserveAspectRatioHandler
- Throws:
ParseException
- if an error occured while processing the transform
-
xMidYMin
public void xMidYMin() throws ParseException
Invoked when 'xMidYMin' has been parsed.- Specified by:
xMidYMin
in interfacePreserveAspectRatioHandler
- Throws:
ParseException
- if an error occured while processing the transform
-
xMinYMax
public void xMinYMax() throws ParseException
Invoked when 'xMinYMax' has been parsed.- Specified by:
xMinYMax
in interfacePreserveAspectRatioHandler
- Throws:
ParseException
- if an error occured while processing the transform
-
xMinYMid
public void xMinYMid() throws ParseException
Invoked when 'xMinYMid' has been parsed.- Specified by:
xMinYMid
in interfacePreserveAspectRatioHandler
- Throws:
ParseException
- if an error occured while processing the transform
-
xMinYMin
public void xMinYMin() throws ParseException
Invoked when 'xMinYMin' has been parsed.- Specified by:
xMinYMin
in interfacePreserveAspectRatioHandler
- Throws:
ParseException
- if an error occured while processing the transform
-
meet
public void meet() throws ParseException
Invoked when 'meet' has been parsed.- Specified by:
meet
in interfacePreserveAspectRatioHandler
- Throws:
ParseException
- if an error occured while processing the transform
-
slice
public void slice() throws ParseException
Invoked when 'slice' has been parsed.- Specified by:
slice
in interfacePreserveAspectRatioHandler
- Throws:
ParseException
- if an error occured while processing the transform
-
endPreserveAspectRatio
public void endPreserveAspectRatio() throws ParseException
Invoked when the PreserveAspectRatio parsing ends.- Specified by:
endPreserveAspectRatio
in interfacePreserveAspectRatioHandler
- Throws:
ParseException
- if an error occured while processing the transform
-
-