Package com.adobe.fxg

Examples of com.adobe.fxg.FXGException


            return Winding.EVEN_ODD;
        else if (FXG_WINDING_NONZERO_VALUE.equals(value))
            return Winding.NON_ZERO;
        else
          //Exception:Unknown winding value: {0}.
            throw new FXGException(getStartLine(), getStartColumn(), "UnknownWindingValue", value);
    }
View Full Code Here


     * delegate node.
     */
    public void setAttribute(String name, String value)
    {
        //Exception: Attribute {0} not supported by node {1}
        throw new FXGException(getStartLine(), getStartColumn(), "InvalidNodeAttribute", name, getNodeName());
    }
View Full Code Here

            return Kerning.ON;
        else if (FXG_KERNING_OFF_VALUE.equals(value))
            return Kerning.OFF;
        else
          //Exception: Unknown kerning: {0}
            throw new FXGException(node.getStartLine(), node.getStartColumn(), "UnknownKerning", value);
    }
View Full Code Here

            return LineBreak.TOFIT;
        else if (FXG_LINEBREAK_EXPLICIT_VALUE.equals(value))
            return LineBreak.EXPLICIT;
        else
          //Exception:Unknown line break: {0}.
            throw new FXGException(node.getStartLine(), node.getStartColumn(), "UnknownLineBreak", value);
    }
View Full Code Here

            return WhiteSpaceCollapse.PRESERVE;
        else if (FXG_WHITESPACE_COLLAPSE_VALUE.equals(value))
            return WhiteSpaceCollapse.COLLAPSE;
        else
          //Exception: Unknown white space collapse: {0}
            throw new FXGException(node.getStartLine(), node.getStartColumn(), "UnknownWhiteSpaceCollapse", value);
    }
View Full Code Here

     * @param propertyName - child property name
     * @param node - the FXG text node.
     */
    public void addTextProperty(String propertyName, TextNode node)
    {
        throw new FXGException(node.getStartLine(), node.getStartColumn(), "InvalidChildNode",  node.getNodeName(), propertyName);           
    }
View Full Code Here

                return BaselineShift.newInstance(BaselineShiftAsEnum.SUBSCRIPT);
            }
            else
            {
                //Exception: Unknown baseline shift: {0}
                throw new FXGException(node.getStartLine(), node.getStartColumn(), "UnknownBaselineShift", value);           
            }
        }
    }
View Full Code Here

                return NumberInherit.newInstance(NumberInheritAsEnum.INHERIT);
            }
            else
            {
                //Exception: Unknown number inherit: {0}
                throw new FXGException(node.getStartLine(), node.getStartColumn(), errorCode, value);           
            }
        }
    }
View Full Code Here

                    properties.put(propertyName, linkActiveFormat);
                }
                else
                {
                    // Exception: Multiple LinkFormat elements are not allowed.
                    throw new FXGException(getStartLine(), getStartColumn(), "MultipleLinkFormatElements");
                }
            }
            else if (FXG_LINKHOVERFORMAT_PROPERTY_ELEMENT.equals(propertyName))
            {
                if (linkHoverFormat == null)
                {
                    linkHoverFormat = (TextLayoutFormatNode)node;
                    linkHoverFormat.setParent(this);

                    if (properties == null)
                        properties = new HashMap<String, TextNode>(3);
                    properties.put(propertyName, linkHoverFormat);
                }
                else
                {
                    // Exception: Multiple LinkFormat elements are not allowed.
                    throw new FXGException(getStartLine(), getStartColumn(), "MultipleLinkFormatElements");
                }
            }
            else if (FXG_LINKNORMALFORMAT_PROPERTY_ELEMENT.equals(propertyName))
            {
                if (linkNormalFormat == null)
                {
                    linkNormalFormat = (TextLayoutFormatNode)node;
                    linkNormalFormat.setParent(this);

                    if (properties == null)
                        properties = new HashMap<String, TextNode>(3);
                    properties.put(propertyName, linkNormalFormat);
                }
                else
                {
                    // Exception: Multiple LinkFormat elements are not allowed.
                    throw new FXGException(getStartLine(), getStartColumn(), "MultipleLinkFormatElements");
                }
            }
            else
            {
                // Exception: Unknown LinkFormat element.
                throw new FXGException(node.getStartLine(), node.getStartColumn(), "UnknownLinkFormat", propertyName);
            }
        }
        else
        {
            super.addTextProperty(propertyName, node);
View Full Code Here

                || child instanceof CDATANode)
        {
          if (child instanceof LinkNode && (((LinkNode)child).href == null))
          {
            // Exception: Missing href attribute in <a> element.
                throw new FXGException(getStartLine(), getStartColumn(), "MissingHref");           
         
          /**
           * When <a> has a <tcy> child, the <tcy> child is FORBIDDEN to have
           * an <a> child of its own. AND vice versa. If a <tcy> has an <a>
           * child, the <a> child is FORBIDDEN to have a <tcy> child.
           */
          if (child instanceof LinkNode && this.parentNode instanceof LinkNode)
          {
                // Exception: <tcy> element is forbidden as child of <a>, which
            // is child of another <tcy>. And vice versa.
                throw new FXGException(getStartLine(), getStartColumn(), "InvalidNestingElements");
          }
            if (content == null)
                content = new ArrayList<TextNode>();

            content.add((TextNode)child);       
View Full Code Here

TOP

Related Classes of com.adobe.fxg.FXGException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.