Class AbstractSVGPrimitiveTranslator<E extends Element,O extends AbstractPrimitiveDefinition<?>>
- java.lang.Object
-
- org.kie.workbench.common.stunner.svg.gen.translator.impl.AbstractSVGPrimitiveTranslator<E,O>
-
- All Implemented Interfaces:
SVGElementTranslator<E,O>,Translator<E>
- Direct Known Subclasses:
AbstractSVGShapeTranslator,SVGGroupTranslator
public abstract class AbstractSVGPrimitiveTranslator<E extends Element,O extends AbstractPrimitiveDefinition<?>> extends Object implements SVGElementTranslator<E,O>
-
-
Constructor Summary
Constructors Constructor Description AbstractSVGPrimitiveTranslator()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract OdoTranslate(E pathElement, SVGTranslatorContext context)protected static voidfailIfEmpty(String key, String value)protected static StringgetId(Element element)protected StringgetXAttributeName()protected StringgetYAttributeName()protected static booleanisEmpty(String s)Otranslate(E element, SVGTranslatorContext context)Process the given input and generates the SVG view definition instance for it.protected LayoutDefinitiontranslateLayout(E element, O def)protected voidtranslatePosition(E element, O def, SVGTranslatorContext context)protected voidtranslatePrimitiveDefinition(E element, O def, SVGTranslatorContext context)protected booleantranslatePrimitiveExcluded(E element)protected StyleDefinitiontranslateStyles(E element, O def, SVGTranslatorContext context)protected voidtranslateTransformDefinition(E element, O def)protected TransformDefinitiontranslateTransforms(E element, O def)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.kie.workbench.common.stunner.svg.gen.translator.SVGElementTranslator
getTagName
-
Methods inherited from interface org.kie.workbench.common.stunner.svg.gen.translator.Translator
getInputType
-
-
-
-
Field Detail
-
ID
protected static final String ID
- See Also:
- Constant Field Values
-
X
protected static final String X
- See Also:
- Constant Field Values
-
Y
protected static final String Y
- See Also:
- Constant Field Values
-
-
Method Detail
-
doTranslate
protected abstract O doTranslate(E pathElement, SVGTranslatorContext context) throws TranslatorException
- Throws:
TranslatorException
-
translate
public O translate(E element, SVGTranslatorContext context) throws TranslatorException
Description copied from interface:SVGElementTranslatorProcess the given input and generates the SVG view definition instance for it.- Specified by:
translatein interfaceSVGElementTranslator<E extends Element,O extends AbstractPrimitiveDefinition<?>>- Parameters:
element- The source element.context- The translator context.- Throws:
TranslatorException
-
translatePrimitiveExcluded
protected boolean translatePrimitiveExcluded(E element)
-
translatePrimitiveDefinition
protected void translatePrimitiveDefinition(E element, O def, SVGTranslatorContext context) throws TranslatorException
- Throws:
TranslatorException
-
translatePosition
protected void translatePosition(E element, O def, SVGTranslatorContext context) throws TranslatorException
- Throws:
TranslatorException
-
getXAttributeName
protected String getXAttributeName()
-
getYAttributeName
protected String getYAttributeName()
-
translateLayout
protected LayoutDefinition translateLayout(E element, O def)
-
translateTransforms
protected TransformDefinition translateTransforms(E element, O def) throws TranslatorException
- Throws:
TranslatorException
-
translateStyles
protected StyleDefinition translateStyles(E element, O def, SVGTranslatorContext context) throws TranslatorException
- Throws:
TranslatorException
-
failIfEmpty
protected static void failIfEmpty(String key, String value) throws TranslatorException
- Throws:
TranslatorException
-
isEmpty
protected static boolean isEmpty(String s)
-
-