Package org.apache.flex.swf

Examples of org.apache.flex.swf.SWFFrame


     *
     * @throws IOException error
     */
    protected void readTags() throws IOException
    {
        SWFFrame currentFrame = buildFrames ? new SWFFrame() : null;
        ITag tag;
        do
        {
            tag = nextTag();

View Full Code Here


            // managed tags   
            switch (tag.getTagType())
            {
                case ShowFrame:
                    swf.addFrame(currentFrame);
                    currentFrame = new SWFFrame();
                    break;
                case FrameLabel:
                    final FrameLabelTag frameLabel = (FrameLabelTag)tag;
                    currentFrame.setName(frameLabel.getName(), frameLabel.isNamedAnchorTag());
                    break;
View Full Code Here

    private void computeCharacterID()
    {
        int id = 1; // need to start at 1, as index 0 has special meaning
        for (int frameIndex = 0; frameIndex < swf.getFrameCount(); frameIndex++)
        {
            final SWFFrame frame = swf.getFrameAt(frameIndex);
            for (final ITag tag : frame)
            {
                if (tag instanceof CharacterTag)
                {
                    final CharacterTag characterTag = (CharacterTag)tag;
View Full Code Here

    private void writeFrames()
    {
        for (currentFrameIndex = 0; currentFrameIndex < swf.getFrameCount(); currentFrameIndex++)
        {
            final SWFFrame frame = swf.getFrameAt(currentFrameIndex);

            // If the SWF has a top level class name, the first frame must contain a SymbolClass tag.
            if (0 == currentFrameIndex && null != swf.getTopLevelClass())
            {
                SWFFrame.forceSymbolClassTag(frame);
View Full Code Here

        protected void createFrames(SWFTarget swfTarget, ISWF swf, ImmutableSet<ICompilationUnit> builtCompilationUnits, Set<ICompilationUnit> emittedCompilationUnits, Collection<ICompilerProblem> problems) throws InterruptedException
        {
            assert Iterables.size(frameInfos) == 1;
            SWFFrameInfo frameInfo = Iterables.getOnlyElement(frameInfos);
           
            final SWFFrame frame =
                createFrame(swfTarget, frameInfo, builtCompilationUnits, emittedCompilationUnits, problems);
           
            ModuleFactoryInfo moduleFactoryInfo = getModuleFactoryInfo();
           
            delegate.addGeneratedRootClassToSWFFrame(frame,
View Full Code Here

                                targetSettings,
                                rootClassDefinition,
                                delegate.getGenerateSystemManagerAndFlexInit(),
                                delegate.isFlexInfo(rootClassDefinition),
                                builtCompilationUnits);
            SWFFrame applicationSWFFrame = null;
            for (final SWFFrameInfo frameInfo : frameInfos)
            {
                SWFFrame swfFrame = createFrame(swfTarget, frameInfo, builtCompilationUnits, emittedCompilationUnits, problems);
                if (frameInfo == systemManagerFrame)
                {
                    assert delegate.getGenerateSystemManagerAndFlexInit() : "systemManagerFrame should be null, unless we are generating a system manager.";
                    delegate.addGeneratedSystemManagerToFrame(swfFrame, frame1Info, initialFactoryClass, builtCompilationUnits, problems);
                }
View Full Code Here

                }
            }
        }

        if (frame == null)
            frame = new SWFFrame();

        if (!addCompilationUnitsAndDependenciesToFrame(frame, rootedUnitsForFrame, allowExternals, emittedCompilationUnits))
            return null;

        return frame;
View Full Code Here

       
        setKeepAS3MetadataLinkerSetting(linkSettings);

        for (int i = 0; i < unLinked.getFrameCount(); ++i)
        {
            SWFFrame unlinkedFrame = unLinked.getFrameAt(i);
            SWFFrame resultFrame = new SWFFrame();

            if( unlinkedFrame.getName() != null )
                resultFrame.setName(unlinkedFrame.getName(), unlinkedFrame.hasNamedAnchor());

            LinkedList<DoABCTag> accumulatedABC = new LinkedList<DoABCTag>();
            for (ITag unlinkedTag : unlinkedFrame)
            {
                if (unlinkedTag instanceof DoABCTag)
                {
                    final DoABCTag abcTag = (DoABCTag)unlinkedTag;
                    accumulatedABC.add(abcTag);                       
                }
                else
                {
                    if (!accumulatedABC.isEmpty())
                    {
                        try
                        {
                            addLinkedABCToFrame(resultFrame, accumulatedABC, linkSettings);
                        }
                        catch (Exception e)
                        {
                            return unLinked;
                        }
                        accumulatedABC.clear();
                    }
                   
                    if (!(unlinkedTag instanceof IManagedTag))
                    {
                        resultFrame.addTag(unlinkedTag);
                    }
                    else if( unlinkedTag instanceof SymbolClassTag )
                    {
                        SymbolClassTag s = (SymbolClassTag)unlinkedTag;
                        for( String symbol_name : s.getSymbolNames() )
                        {
                            resultFrame.defineSymbol(s.getSymbol(symbol_name), symbol_name);
                        }
                    }
                }
            }
            if (!accumulatedABC.isEmpty())
View Full Code Here

         */
        protected final SWFFrame createFrame(SWFTarget swfTarget, SWFFrameInfo frameInfo, ImmutableSet<ICompilationUnit> builtCompilationUnits, Set<ICompilationUnit> emittedCompilationUnits, Collection<ICompilerProblem> problems) throws InterruptedException
        {
            Iterables.addAll(problems, frameInfo.problems);
           
            final SWFFrame swfFrame = new SWFFrame();
           
            if (frameInfo.frameLabel != null)
                swfFrame.setName(frameInfo.frameLabel, true);
           
            assert Sets.difference(frameInfo.rootedUnits, builtCompilationUnits).isEmpty()
                : "All compilation units to emit on this frame should have been built!";
           
            if (!swfTarget.addCompilationUnitsAndDependenciesToFrame(swfFrame, frameInfo.rootedUnits,
View Full Code Here

         */
        protected void createFrames(SWFTarget swfTarget, ISWF swf, ImmutableSet<ICompilationUnit> builtCompilationUnits, Set<ICompilationUnit> emittedCompilationUnits, Collection<ICompilerProblem> problems) throws InterruptedException
        {
            for (final SWFFrameInfo frameInfo : frameInfos)
            {
                SWFFrame swfFrame = createFrame(swfTarget, frameInfo, builtCompilationUnits, emittedCompilationUnits, problems);
                swf.addFrame(swfFrame);
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.flex.swf.SWFFrame

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.