Package com.adobe.fxg

Examples of com.adobe.fxg.FXGException


            //id = value;
        }
        else
        {
          //Exception:Attribute, {0}, not supported by node: {1}.
            throw new FXGException(getStartLine(), getStartColumn(), "InvalidNodeAttribute", name, getNodeName());
        }
       
        // Remember attribute was set on this node.
        rememberAttribute(name, value);               
    }
View Full Code Here


    @Override
    public void setDelegate(FXGNode delegate)
    {
        if (!(delegate instanceof TextNode))
        {
            throw new FXGException(getStartLine(), getStartColumn(), "InvalidChildNode",  getNodeName(), delegate.getNodeName());  
        }
        else if (delegate instanceof RichTextNode && ((RichTextNode)delegate).content != null)
        {
            throw new FXGException(getStartLine(), getStartColumn(), "MultipleContentElements")
        }
        else
        {
            super.setDelegate(delegate);
        }
View Full Code Here

        {
            ((RichTextNode)delegate).addContentChild(child);
        }
        else
        {
            throw new FXGException(getStartLine(), getStartColumn(), "InvalidChildNode",  child.getNodeName(), getNodeName());  
        }
    }
View Full Code Here

        }
        else if (child instanceof MatrixNode)
        {
            if (translateSet || scaleSet || rotationSet)
              //Exception:Cannot supply a matrix child if transformation attributes were provided
                throw new FXGException(child.getStartLine(), child.getStartColumn(), "InvalidChildMatrixNode");

            matrix = (MatrixNode)child;
        }
        else if (child instanceof ColorTransformNode)
        {
            if (alphaSet)
              //Exception:Cannot supply a colorTransform child if alpha attribute was provided.
                throw new FXGException(child.getStartLine(), child.getStartColumn(), "InvalidChildColorTransformNode");

            colorTransform = (ColorTransformNode)child;
        }
        else
        {
View Full Code Here

        }
        else if (getFileVersion().equalTo(FXGVersion.v1_0))
        {
            // Rest of the attributes are not supported by FXG 1.0
            // Exception:Attribute {0} not supported by node {1}.
            throw new FXGException(getStartLine(), getStartColumn(), "InvalidNodeAttribute", name, getNodeName());
        }
        else if (FXG_LUMINOSITYCLIP_ATTRIBUTE.equals(name))
        {
            luminosityClip = DOMParserHelper.parseBoolean(this, value, name);
        }
View Full Code Here

        }
        else if (getFileVersion().equalTo(FXGVersion.v1_0))
        {
            // Rest of the blend modes are unknown for FXG 1.0
            //Exception:Unknown blend mode: {0}.
            throw new FXGException(getStartLine(), getStartColumn(), "UnknownBlendMode", value);
        }
        else if (isForMobile() && getCompilerVersion().equalTo(FXGVersion.v2_0)
                && (FXG_BLENDMODE_COLORDOGE_VALUE.equals(value) ||
                    FXG_BLENDMODE_COLORBURN_VALUE.equals(value) ||
                    FXG_BLENDMODE_EXCLUSION_VALUE.equals(value) ||
                    FXG_BLENDMODE_SOFTLIGHT_VALUE.equals(value) ||
                    FXG_BLENDMODE_HUE_VALUE.equals(value) ||
                    FXG_BLENDMODE_SATURATION_VALUE.equals(value) ||
                    FXG_BLENDMODE_COLOR_VALUE.equals(value) ||
                    FXG_BLENDMODE_LUMINOSITY_VALUE.equals(value)))
        {
                // The following pixel-bender based blend modes are not supported by FXG 2.0 on Mobile.
                // Log a warning and ignore the blend modes.
                FXGLog.getLogger().log(FXGLogger.WARN, "MobileUnsupportedPBBlendMode", null,
                        ((AbstractFXGNode)node).getDocumentName(), node.getStartLine(), node.getStartColumn(), value);          
                return BlendMode.NORMAL;
        }
        else if (FXG_BLENDMODE_COLORDOGE_VALUE.equals(value))
        {
            return BlendMode.COLORDODGE;
        }
        else if (FXG_BLENDMODE_COLORBURN_VALUE.equals(value))
        {
            return BlendMode.COLORBURN;
        }
        else if (FXG_BLENDMODE_EXCLUSION_VALUE.equals(value))
        {
            return BlendMode.EXCLUSION;
        }
        else if (FXG_BLENDMODE_SOFTLIGHT_VALUE.equals(value))
        {
            return BlendMode.SOFTLIGHT;
        }
        else if (FXG_BLENDMODE_HUE_VALUE.equals(value))
        {
            return BlendMode.HUE;
        }
        else if (FXG_BLENDMODE_SATURATION_VALUE.equals(value))
        {
            return BlendMode.SATURATION;
        }
        else if (FXG_BLENDMODE_COLOR_VALUE.equals(value))
        {
            return BlendMode.COLOR;
        }
        else if (FXG_BLENDMODE_LUMINOSITY_VALUE.equals(value))
        {
            return BlendMode.LUMINOSITY;
        }
        else if (FXG_BLENDMODE_AUTO_VALUE.equals(value))
        {
            return BlendMode.AUTO;
        }
        else
        {
            if (isVersionGreaterThanCompiler())
            {
                // Warning: Minor version of this FXG file is greater than minor
                // version supported by this compiler. Log a warning for an unknown
                // blend mode.
                FXGLog.getLogger().log(FXGLogger.WARN, "UnknownBlendMode", null, getDocumentName(), startLine, startColumn, value);
            }
            else
            {
              //Exception:Unknown blend mode: {0} for FXGVersion 2.0.
                throw new FXGException(getStartLine(), getStartColumn(), "UnknownBlendMode", value);
            }
        }
           

        return defMode;
View Full Code Here

            // Add child matrix to the node.
            this.addChild(matrixNode);
        }
        catch (Throwable t)
        {
            throw new FXGException(mask.getStartLine(), mask.getStartColumn(), "InvalidChildMatrixNode", t);
        }       

    }
View Full Code Here

            copy.blendMode = blendMode;
            copy.scalingGrid = scalingGrid;
        }
        catch (CloneNotSupportedException e)
        {
            throw new FXGException("InternalProcessingError", e);
        }
        return copy;
    }
View Full Code Here

          /**
           * According to FXG 2.0 spec., <mask> must be before any graphical element.
           */
          if (children != null)
          {
                throw new FXGException(child.getStartLine(), child.getStartColumn(), "InvalidMaskElement");
         
          if (mask == null)
          {
            mask = ((MaskPropertyNode)child).mask;
          }
          else
          {
                throw new FXGException(child.getStartLine(), child.getStartColumn(), "MultipleMaskElements");
          }          
        }
        else if (child instanceof LibraryNode)
        {  
          /**
           * According to FXG 2.0 spec., <Library> must be before <mask> and any graphical element.
           */
          if (mask != null || children != null)
          {
                throw new FXGException(child.getStartLine(), child.getStartColumn(), "InvalidLibraryElement");
         
            if (library == null)
            {
                library = (LibraryNode)child;
            }
            else
            {
                throw new FXGException(child.getStartLine(), child.getStartColumn(), "MultipleLibraryElements");
            }
        }
        else if (child instanceof GraphicContentNode)
        {
            if (children == null)
View Full Code Here

            {
                version = FXGVersion.newInstance(DOMParserHelper.parseDouble(this, value, name));
            }
            catch (FXGException e)
            {
                throw new FXGException("InvalidVersionNumber", e);
            }
        }
        else if (FXG_MASKTYPE_ATTRIBUTE.equals(name))
        {
            maskType = DOMParserHelper.parseMaskType(this, value, name, maskType);
        }
        else if ((version != null) && (version.equalTo(FXGVersion.v1_0)))
        {
            // Rest of the attributes are not supported by FXG 1.0
            // Exception:Attribute {0} not supported by node {1}.
            throw new FXGException(getStartLine(), getStartColumn(), "InvalidNodeAttribute", name, getNodeName());
        }
        else if (FXG_LUMINOSITYINVERT_ATTRIBUTE.equals(name))
        {
            luminosityInvert = DOMParserHelper.parseBoolean(this, value, name);
        }       
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.