Top Inners Fields Constructors Methods
org.apache.poi.sl.draw.geom

pack-priv Class PresetParser

extends Object
Class Inheritance
Annotations
@Internal
Imports
java.util.HashMap, .Map, java.util.function.BiConsumer, javax.xml.stream.XMLStreamConstants, .XMLStreamException, .XMLStreamReader, org.apache.logging.log4j.LogManager, .Logger, org.apache.poi.sl.usermodel.PaintStyle.PaintModifier, org.apache.poi.util.Internal

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static enum

Field Summary

Modifier and TypeField and Description
private CustomGeometry
private final Map<String, CustomGeometry>
private static final Logger
private PresetParser.Mode
private Path
private boolean

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private void
private void
private void
private void
private void
private static String
collapseString(String text)

Removes leading and trailing whitespaces of the string given as the parameter, then truncate any sequence of tab, CR, LF, and SP by a single whitespace character ' '.

private void
private void
pack-priv Map<String, CustomGeometry>
private static boolean
isWhiteSpace(char ch)

returns true if the specified char is a white space character.

private void
private static PaintStyle.PaintModifier
private void
private static int

Returns:

the next tag type (START_ELEMENT, END_ELEMENT, END_DOCUMENT)
nextTag
(XMLStreamReader
the stream reader
sr
)

Reimplement XMLStreamReader#nextTag() because of differences of XmlBeans and Xerces XMLStreamReader.

pack-priv void
private AdjustPoint
parseAdjPoint(XMLStreamReader sr, boolean closeOuter, String name)

private void
private AdjustPoint
private AdjustPoint
parsePtPoint(XMLStreamReader sr, boolean closeOuter)

private void
private void
private void
private void
private void
private void
private void
private void
private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

customGeometryback to summary
private CustomGeometry customGeometry
geomback to summary
private final Map<String, CustomGeometry> geom
LOGback to summary
private static final Logger LOG
modeback to summary
private PresetParser.Mode mode
pathback to summary
private Path path
useAdjustValueback to summary
private boolean useAdjustValue

Constructor Detail

PresetParserback to summary
pack-priv PresetParser(PresetParser.Mode mode)

Method Detail

addPolarback to summary
private void addPolar(XMLStreamReader sr) throws XMLStreamException
addRectangleback to summary
private void addRectangle(XMLStreamReader sr) throws XMLStreamException
addXYback to summary
private void addXY(XMLStreamReader sr) throws XMLStreamException
arcToback to summary
private void arcTo(XMLStreamReader sr) throws XMLStreamException
closePathback to summary
private void closePath(XMLStreamReader sr) throws XMLStreamException
collapseStringback to summary
private static String collapseString(String text)

Removes leading and trailing whitespaces of the string given as the parameter, then truncate any sequence of tab, CR, LF, and SP by a single whitespace character ' '.

cubicBezToback to summary
private void cubicBezTo(XMLStreamReader sr) throws XMLStreamException
endContextback to summary
private void endContext()
getGeomback to summary
pack-priv Map<String, CustomGeometry> getGeom()
isWhiteSpaceback to summary
private static boolean isWhiteSpace(char ch)

returns true if the specified char is a white space character.

lineToback to summary
private void lineTo(XMLStreamReader sr) throws XMLStreamException
mapFillback to summary
private static PaintStyle.PaintModifier mapFill(String fill)
moveToback to summary
private void moveTo(XMLStreamReader sr) throws XMLStreamException
nextTagback to summary
private static int nextTag(XMLStreamReader sr) throws XMLStreamException

Reimplement XMLStreamReader#nextTag() because of differences of XmlBeans and Xerces XMLStreamReader. XmlBeans doesn't return the END_ELEMENT on nextTag()

Parameters
sr:XMLStreamReader

the stream reader

Returns:int

the next tag type (START_ELEMENT, END_ELEMENT, END_DOCUMENT)

Exceptions
XMLStreamException:
if reading the next tag fails
parseback to summary
pack-priv void parse(XMLStreamReader sr) throws XMLStreamException
parseAdjPointback to summary
private AdjustPoint parseAdjPoint(XMLStreamReader sr, boolean closeOuter, String name) throws XMLStreamException
parseAttributesback to summary
private void parseAttributes(XMLStreamReader sr, BiConsumer<String, String> c)
parsePosPointback to summary
private AdjustPoint parsePosPoint(XMLStreamReader sr) throws XMLStreamException
parsePtPointback to summary
private AdjustPoint parsePtPoint(XMLStreamReader sr, boolean closeOuter) throws XMLStreamException
quadBezToback to summary
private void quadBezTo(XMLStreamReader sr) throws XMLStreamException
updateAhListback to summary
private void updateAhList(XMLStreamReader sr) throws XMLStreamException
updateCxnListback to summary
private void updateCxnList(XMLStreamReader sr) throws XMLStreamException
updateFileback to summary
private void updateFile(XMLStreamReader sr)
updateGuideListback to summary
private void updateGuideList(XMLStreamReader sr) throws XMLStreamException
updatePathback to summary
private void updatePath(XMLStreamReader sr) throws XMLStreamException
updatePathLstback to summary
private void updatePathLst(XMLStreamReader sr)
updateShapeback to summary
private void updateShape(XMLStreamReader sr) throws XMLStreamException
updateShapeListback to summary
private void updateShapeList(XMLStreamReader sr)
org.apache.poi.sl.draw.geom back to summary

pack-priv final Enum PresetParser.Mode

extends Enum<PresetParser.Mode>
Class Inheritance

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static interface

Field Summary

Modifier and TypeField and Description
public static final PresetParser.Mode
public static final PresetParser.Mode
public static final PresetParser.Mode
public static final PresetParser.Mode
pack-priv final PresetParser.Mode.Handler
public static final PresetParser.Mode
public static final PresetParser.Mode
public static final PresetParser.Mode
public static final PresetParser.Mode

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static PresetParser.Mode
public static PresetParser.Mode[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

AH_LSTback to summary
public static final PresetParser.Mode AH_LST
CXN_LSTback to summary
public static final PresetParser.Mode CXN_LST
FILEback to summary
public static final PresetParser.Mode FILE
GUIDE_LSTback to summary
public static final PresetParser.Mode GUIDE_LST
handlerback to summary
pack-priv final PresetParser.Mode.Handler handler
PATHback to summary
public static final PresetParser.Mode PATH
PATH_LSTback to summary
public static final PresetParser.Mode PATH_LST
SHAPEback to summary
public static final PresetParser.Mode SHAPE
SHAPE_LSTback to summary
public static final PresetParser.Mode SHAPE_LST

Constructor Detail

Modeback to summary
private Mode(PresetParser.Mode.Handler handler)

Method Detail

valueOfback to summary
public static PresetParser.Mode valueOf(String name)
valuesback to summary
public static PresetParser.Mode[] values()
org.apache.poi.sl.draw.geom back to summary

pack-priv Interface PresetParser.Mode.Handler


Method Summary

Modifier and TypeMethod and Description
public void

Method Detail

updateback to summary
public void update(PresetParser parser, XMLStreamReader sr) throws XMLStreamException