Class AttributeNode
java.lang.Object
com.github.weisj.jsvg.parser.impl.AttributeNode
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Lengthprivate static final Lengthprivate static final MeasureContextprivate ParsedElementprivate static final Lengthprivate static final Percentageprivate final @NotNull List<@NotNull StyleSheet> private final @NotNull Stringprivate static final Length -
Constructor Summary
ConstructorsConstructorDescriptionAttributeNode(@NotNull String tagName, @NotNull Map<String, String> attributes, @NotNull List<@NotNull StyleSheet> styleSheets) -
Method Summary
Modifier and TypeMethodDescriptionprivate <T extends BaseAnimationNode>
List<@NotNull T> animateNodes(@NotNull String property, Class<T> type) @NotNull AttributeNodecopy()private @NotNull TransformValuecreateTransformValueFromParts(@NotNull List<TransformPart> parts) @NotNull ParsedDocumentdocument()@NotNull ParsedElementelement()@Nullable AnimatedColorgetAnimatedColor(@NotNull String property, @NotNull ColorValue initial) private @Nullable AnimatedFloatListgetAnimatedFloatList(@NotNull String property, @NotNull FloatListValue initial) @Nullable AnimatedLengthgetAnimatedLength(@NotNull String property, @NotNull LengthValue initial, @NotNull PercentageDimension dimension) private @Nullable AnimatedPaintgetAnimatedPaint(@NotNull String property, @NotNull SVGPaint initial) private @Nullable AnimatedPercentagegetAnimatedPercentage(@NotNull String property, @NotNull PercentageValue initial) @Nullable AnimatedTransformgetAnimatedTransform(@NotNull String property, @NotNull TransformValue initial) @Nullable ClipPath@NotNull Color@Nullable Colordouble @NotNull []getDoubleList(@NotNull String key) @NotNull DurationgetDuration(@NotNull String key, @NotNull Duration fallback) <T> TgetElementByHref(@NotNull Class<T> type, @NotNull Category category, @Nullable String value, AttributeNode.ElementRelation relation) <T> TgetElementByHref(@NotNull Class<T> type, @Nullable String value, AttributeNode.ElementRelation relation) private <T> TgetElementByUrl(@NotNull Class<T> type, @Nullable String value) <E extends Enum<E>>
E<E extends Enum<E>>
EgetEnumNullable(@NotNull String key, @NotNull Class<E> enumType) @Nullable Filter@NotNull FilterChannelKeygetFilterChannelKey(@NotNull String key, @NotNull FilterChannelKey fallback) floatfloat @NotNull []getFloatList(@NotNull String key) @NotNull FloatListValuegetFloatList(@NotNull String key, Inherited inherited, Animatable animatable) @NotNull LengthgetHorizontalReferenceLength(@NotNull String key) @Nullable StringgetHref()int@Nullable LengthgetLength(@NotNull String key, @NotNull PercentageDimension dimension) @NotNull LengthgetLength(@NotNull String key, @NotNull PercentageDimension dimension, float fallback) @Nullable LengthValuegetLength(@NotNull String key, @NotNull PercentageDimension dimension, Inherited inherited, Animatable animatable) @Nullable LengthValuegetLength(@NotNull String key, @NotNull PercentageDimension dimension, @Nullable LengthValue fallback, Inherited inherited, Animatable animatable) @Nullable LengthgetLength(@NotNull String key, @NotNull PercentageDimension dimension, @Nullable Length fallback) private @NotNull LengthgetLengthInternal(@NotNull String key, @NotNull PercentageDimension dimension) @NotNull Length @NotNull []getLengthList(@NotNull String key, @NotNull PercentageDimension dimension) @NotNull Length @Nullable []getLengthList(@NotNull String key, @NotNull Length @Nullable [] fallback, @NotNull PercentageDimension dimension) @Nullable MaskgetMask()floatgetNonNegativeFloat(@NotNull String name, float fallback) @Nullable SVGPaintgetPaint(@NotNull String key, Inherited inherited, Animatable animatable) @Nullable SVGPaintgetPaint(@NotNull String key, @Nullable SVGPaint fallback, Inherited inherited, Animatable animatable) private @Nullable SVGPaintgetPaintInternal(@NotNull String key, @Nullable SVGPaint fallback) @Nullable PercentageValuegetPercentage(@NotNull String key, Inherited inherited, Animatable animatable) @Nullable PercentageValuegetPercentage(@NotNull String key, @Nullable PercentageValue fallback, Inherited inherited, Animatable animatable) @Nullable PercentagegetPercentage(@NotNull String key, @Nullable Percentage fallback) @NotNull String @NotNull []getStringList(@NotNull String name) @NotNull String @NotNull []getStringList(@NotNull String name, SeparatorMode separatorMode) @Nullable String@NotNull LengthgetVerticalReferenceLength(@NotNull String key) @Nullable ViewBoxbooleanhasAttribute(@NotNull String name) private static booleanprivate @NotNull LoadHelperprivate static <T, A extends T, N extends BaseAnimationNode>
AmakeAnimated(@NotNull List<N> animationNodes, T initial, @NotNull BiFunction<N, T, A> factory) @Nullable SVGPaintparsePaint(@Nullable String value) @NotNull AttributeParserparser()private @NotNull LengthparseReferenceLength(@NotNull String key, @NotNull String topLeft, @NotNull String bottomRight, @NotNull PercentageDimension dimension) @Nullable TransformValueparseTransform(@NotNull String key) @Nullable TransformValueparseTransform(@NotNull String key, Inherited inherited, Animatable animatable) (package private) voidprivate static voidpreprocessAttributes(@NotNull Map<String, String> attributes, @NotNull Map<String, String> styleAttributes) private <T> TrecordIndirectChild(T child, String value, AttributeNode.ElementRelation relation) @Nullable URIresolveResourceURI(@NotNull String url) @NotNull ResourceLoader(package private) voidsetElement(ParsedElement element) (package private) @NotNull List<@NotNull StyleSheet> booleantagIsOneOf(@NotNull String... tags) @NotNull StringtagName()
-
Field Details
-
TopOrLeft
-
Center
-
BottomOrRight
-
FALLBACK_LENGTH
-
FALLBACK_PERCENTAGE
-
DUMMY_MEASURE_CONTEXT
-
tagName
-
attributes
-
styleSheets
-
element
-
-
Constructor Details
-
AttributeNode
-
-
Method Details
-
setElement
-
loadHelper
-
copy
-
prepareForNodeBuilding
void prepareForNodeBuilding() -
isBlank
-
preprocessAttributes
-
document
-
element
-
styleSheets
-
getElementByUrl
-
recordIndirectChild
-
getElementByHref
@Nullable public <T> T getElementByHref(@NotNull @NotNull Class<T> type, @Nullable @Nullable String value, AttributeNode.ElementRelation relation) -
getElementByHref
@Nullable public <T> T getElementByHref(@NotNull @NotNull Class<T> type, @NotNull @NotNull Category category, @Nullable @Nullable String value, AttributeNode.ElementRelation relation) -
attributes
-
tagName
-
tagIsOneOf
-
classNames
-
getValue
-
getColor
-
getColor
-
getPaint
@Nullable public @Nullable SVGPaint getPaint(@NotNull @NotNull String key, Inherited inherited, Animatable animatable) -
getPaint
@Contract("_,!null,_,_ -> !null") @Nullable public @Nullable SVGPaint getPaint(@NotNull @NotNull String key, @Nullable @Nullable SVGPaint fallback, Inherited inherited, Animatable animatable) -
getPaintInternal
-
parsePaint
-
getLength
@Nullable public @Nullable Length getLength(@NotNull @NotNull String key, @NotNull @NotNull PercentageDimension dimension) -
getLength
@NotNull public @NotNull Length getLength(@NotNull @NotNull String key, @NotNull @NotNull PercentageDimension dimension, float fallback) -
getLength
@Contract("_,_,!null -> !null") @Nullable public @Nullable Length getLength(@NotNull @NotNull String key, @NotNull @NotNull PercentageDimension dimension, @Nullable @Nullable Length fallback) -
getLength
@Nullable public @Nullable LengthValue getLength(@NotNull @NotNull String key, @NotNull @NotNull PercentageDimension dimension, Inherited inherited, Animatable animatable) -
getLength
@Contract("_,_,!null,_,_ -> !null") @Nullable public @Nullable LengthValue getLength(@NotNull @NotNull String key, @NotNull @NotNull PercentageDimension dimension, @Nullable @Nullable LengthValue fallback, Inherited inherited, Animatable animatable) -
getDuration
-
getLengthInternal
@NotNull private @NotNull Length getLengthInternal(@NotNull @NotNull String key, @NotNull @NotNull PercentageDimension dimension) -
getHorizontalReferenceLength
-
getVerticalReferenceLength
-
parseReferenceLength
@NotNull private @NotNull Length parseReferenceLength(@NotNull @NotNull String key, @NotNull @NotNull String topLeft, @NotNull @NotNull String bottomRight, @NotNull @NotNull PercentageDimension dimension) -
getPercentage
@Contract("_,!null -> !null") @Nullable public @Nullable Percentage getPercentage(@NotNull @NotNull String key, @Nullable @Nullable Percentage fallback) -
getPercentage
@Nullable public @Nullable PercentageValue getPercentage(@NotNull @NotNull String key, Inherited inherited, Animatable animatable) -
getPercentage
@Contract("_,!null,_,_ -> !null") @Nullable public @Nullable PercentageValue getPercentage(@NotNull @NotNull String key, @Nullable @Nullable PercentageValue fallback, Inherited inherited, Animatable animatable) -
getLengthList
@NotNull public @NotNull Length @NotNull [] getLengthList(@NotNull @NotNull String key, @NotNull @NotNull PercentageDimension dimension) -
getLengthList
@Contract("_,!null,_ -> !null") @NotNull public @NotNull Length @Nullable [] getLengthList(@NotNull @NotNull String key, @NotNull @NotNull Length @Nullable [] fallback, @NotNull @NotNull PercentageDimension dimension) -
getFloatList
-
getFloatList
@NotNull public @NotNull FloatListValue getFloatList(@NotNull @NotNull String key, Inherited inherited, Animatable animatable) -
getDoubleList
-
getEnum
-
getEnumNullable
-
getClipPath
-
getMask
-
getFilter
-
getFilterChannelKey
@NotNull public @NotNull FilterChannelKey getFilterChannelKey(@NotNull @NotNull String key, @NotNull @NotNull FilterChannelKey fallback) -
parseTransform
-
createTransformValueFromParts
@NotNull private @NotNull TransformValue createTransformValueFromParts(@NotNull @NotNull List<TransformPart> parts) -
parseTransform
@Nullable public @Nullable TransformValue parseTransform(@NotNull @NotNull String key, Inherited inherited, Animatable animatable) -
hasAttribute
-
getStringList
-
getStringList
@NotNull public @NotNull String @NotNull [] getStringList(@NotNull @NotNull String name, SeparatorMode separatorMode) -
getFloat
-
getNonNegativeFloat
-
getInt
-
getHref
-
getViewBox
-
parser
-
resourceLoader
-
resolveResourceURI
-
animateNodes
private <T extends BaseAnimationNode> List<@NotNull T> animateNodes(@NotNull @NotNull String property, Class<T> type) -
makeAnimated
@Nullable private static <T, A extends T, N extends BaseAnimationNode> A makeAnimated(@NotNull @NotNull List<N> animationNodes, @NotNull T initial, @NotNull @NotNull BiFunction<N, T, A> factory) -
getAnimatedLength
@Nullable public @Nullable AnimatedLength getAnimatedLength(@NotNull @NotNull String property, @NotNull @NotNull LengthValue initial, @NotNull @NotNull PercentageDimension dimension) -
getAnimatedFloatList
@Nullable private @Nullable AnimatedFloatList getAnimatedFloatList(@NotNull @NotNull String property, @NotNull @NotNull FloatListValue initial) -
getAnimatedPercentage
@Nullable private @Nullable AnimatedPercentage getAnimatedPercentage(@NotNull @NotNull String property, @NotNull @NotNull PercentageValue initial) -
getAnimatedPaint
@Nullable private @Nullable AnimatedPaint getAnimatedPaint(@NotNull @NotNull String property, @NotNull @NotNull SVGPaint initial) -
getAnimatedColor
@Nullable public @Nullable AnimatedColor getAnimatedColor(@NotNull @NotNull String property, @NotNull @NotNull ColorValue initial) -
getAnimatedTransform
@Nullable public @Nullable AnimatedTransform getAnimatedTransform(@NotNull @NotNull String property, @NotNull @NotNull TransformValue initial)
-