Java Doc for SWFWriter.java in  » Ajax » Laszlo-4.0.10 » org » openlaszlo » compiler » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Ajax » Laszlo 4.0.10 » org.openlaszlo.compiler 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.openlaszlo.compiler.ObjectWriter
      org.openlaszlo.compiler.SWFWriter

SWFWriter
class SWFWriter extends ObjectWriter (Code)
Accumulates code, XML, and assets to a SWF object file. Make heavy use of JGenerator API. Properties documented in Compiler.getProperties.


Field Summary
final public static  intDEFAULT_SIZE
    

Constructor Summary
 SWFWriter(Properties props, OutputStream stream, CompilerMediaCache cache, boolean importLibrary, CompilationEnvironment env)
     Initializes a SWFWriter with an OutputStream to which a new SWF will be written when SWFWriter.close() is called.

Method Summary
 voidaddPreloader(CompilationEnvironment env)
    
 voidaddPreloaderScript(String script)
    
 voidaddProgram(Program program)
    
public  intaddScript(String script)
     Compiles the specified script to bytecodes and add its bytecodes to the current frame in this movie.
 booleancheckFontExists(FontInfo fontInfo)
    
public  voidclose()
     Writes the SWF to the OutputStream that was supplied to the SWFWriter's constructor.
public  voidcloseSnippet()
    
static  doublefontHeight(Font font)
    
 DoActiongetFirstDoAction(String fileName)
    
 doublegetFontHeight(FontInfo fontInfo)
    
 FontManagergetFontManager()
    
 doublegetLFCLineHeight(FontInfo fontInfo, int fontsize)
    
 voidimportActions(String fileName)
    
public  voidimportBaseLibrary(String library, CompilationEnvironment env)
    
public  StringimportClickResource(File file)
     Imports this resource, if it has not previously been imported, as resource that can be used as a click region, and returns in any case the name of the clip that refers to it.
 voidimportFontStyle(String fileName, String face, String style, CompilationEnvironment env)
     Import a font of a given style into the SWF we are writing.
public  voidimportPreloadResource(String fileName, String name)
     Import a resource file into the preloader movie.
public  voidimportPreloadResource(File fFileName, String name)
    
public  voidimportPreloadResource(List sources, String name, File parent)
     Import a multiframe resource into the current movie.
public  voidimportResource(List sources, String name, File parent)
     Import a multiframe resource into the current movie.
public  voidimportResource(List sources, String name, File parent, int frameNum)
     Import a multiframe resource into the current movie.
public  voidimportResource(String fileName, String name)
     Import a resource file into the current movie.
public  voidimportResource(File fFile, String name)
    
public  voidimportResource(String fileName, String name, int frameNum)
     Import a resource file into the current movie.
public  voidimportResource(String fileName, String name, int frameNum, FontsCollector fontsCollector)
     Import a resource file into the current movie.
public  voidimportResource(List sources, String name, File parent, int frameNum, FontsCollector fontsCollector)
     Import a multiframe resource into the current movie.
public  voidimportResource(List sources, String name, File parent, int frameNum, FontsCollector fontsCollector, boolean addStop)
     Import a multiframe resource into the current movie.
public  booleanisDeviceFont(String face)
    
 doublelfcLineHeight(Font font, int fontsize)
    
public  voidopenSnippet(String liburl)
    
 Programprogram(String script)
    
 voidsetCanvas(Canvas canvas, String canvasConstructor)
    
 voidsetCanvasDefaults(Canvas canvas, CompilerMediaCache mc)
    
public  voidsetDeviceFont(String face)
    
public  voidsetFontManager(FontManager fm)
    
public static  StringstripBaseName(String fileName, CompilationEnvironment env)
    
 StringstripPragmas(String str)
    
 voidwarn(CompilationEnvironment env, String msg)
    

Field Detail
DEFAULT_SIZE
final public static int DEFAULT_SIZE(Code)
Height for generated advance (width) table




Constructor Detail
SWFWriter
SWFWriter(Properties props, OutputStream stream, CompilerMediaCache cache, boolean importLibrary, CompilationEnvironment env)(Code)
Initializes a SWFWriter with an OutputStream to which a new SWF will be written when SWFWriter.close() is called.
Parameters:
  stream - A java.io.OutputStream that themovie will be written to.
Parameters:
  props - list of properties
Parameters:
  cache - media cache
Parameters:
  importLibrary - If true, the compiler will add in the LaszloLibrary.




Method Detail
addPreloader
void addPreloader(CompilationEnvironment env)(Code)



addPreloaderScript
void addPreloaderScript(String script)(Code)



addProgram
void addProgram(Program program)(Code)
Adds the program to the next frame
Parameters:
  program - to be added



addScript
public int addScript(String script)(Code)
Compiles the specified script to bytecodes and add its bytecodes to the current frame in this movie.
Parameters:
  script - the script to be compiled the number of bytes



checkFontExists
boolean checkFontExists(FontInfo fontInfo)(Code)
true if the font existsIf this is the default bold font and it hasn't been declared, import it.



close
public void close() throws IOException(Code)
Writes the SWF to the OutputStream that was supplied to the SWFWriter's constructor.
throws:
  IOException - if an error occurs



closeSnippet
public void closeSnippet() throws IOException(Code)



fontHeight
static double fontHeight(Font font)(Code)
Compute font bounding box
Parameters:
  font -



getFirstDoAction
DoAction getFirstDoAction(String fileName) throws FileNotFoundException, IVException(Code)
first action block



getFontHeight
double getFontHeight(FontInfo fontInfo)(Code)
height of fontinfo in pixels
Parameters:
  fontInfo -



getFontManager
FontManager getFontManager()(Code)



getLFCLineHeight
double getLFCLineHeight(FontInfo fontInfo, int fontsize)(Code)
lineheight which lfc LzInputText expects for a given fontsize



importActions
void importActions(String fileName) throws FileNotFoundException, IVException(Code)
Import all action script blocks



importBaseLibrary
public void importBaseLibrary(String library, CompilationEnvironment env)(Code)



importClickResource
public String importClickResource(File file) throws ImportResourceError(Code)
Imports this resource, if it has not previously been imported, as resource that can be used as a click region, and returns in any case the name of the clip that refers to it.



importFontStyle
void importFontStyle(String fileName, String face, String style, CompilationEnvironment env) throws FileNotFoundException, CompilationError(Code)
Import a font of a given style into the SWF we are writing.
Parameters:
  fileName - filename for font in LZX
Parameters:
  face - face name of font
Parameters:
  style - style of font



importPreloadResource
public void importPreloadResource(String fileName, String name) throws ImportResourceError(Code)
Import a resource file into the preloader movie. Using a name that already exists clobbers the old resource (for now).
Parameters:
  fileName - file name of the resource
Parameters:
  name - name of the MovieClip/Sprite
throws:
  CompilationError -



importPreloadResource
public void importPreloadResource(File fFileName, String name) throws ImportResourceError(Code)



importPreloadResource
public void importPreloadResource(List sources, String name, File parent) throws ImportResourceError(Code)
Import a multiframe resource into the current movie. Using a name that already exists clobbers the old resource (for now).



importResource
public void importResource(List sources, String name, File parent)(Code)
Import a multiframe resource into the current movie. Using a name that already exists clobbers the old resource (for now).
Parameters:
  sources - file names of the resources
Parameters:
  name - name of the MovieClip/Sprite
Parameters:
  parent - parent's File object



importResource
public void importResource(List sources, String name, File parent, int frameNum)(Code)
Import a multiframe resource into the current movie. Using a name that already exists clobbers the old resource (for now).
Parameters:
  sources - file names of the resources
Parameters:
  name - name of the MovieClip/Sprite
Parameters:
  parent - parent's File object
Parameters:
  frameNum - frame offset to add to



importResource
public void importResource(String fileName, String name) throws ImportResourceError(Code)
Import a resource file into the current movie. Using a name that already exists clobbers the old resource (for now).
Parameters:
  fileName - file name of the resource
Parameters:
  name - name of the MovieClip/Sprite
throws:
  CompilationError -



importResource
public void importResource(File fFile, String name) throws ImportResourceError(Code)



importResource
public void importResource(String fileName, String name, int frameNum) throws CompilationError(Code)
Import a resource file into the current movie. Using a name that already exists clobbers the old resource (for now).
Parameters:
  fileName - file name of the resource
Parameters:
  name - name of the MovieClip/Sprite
Parameters:
  frameNum - frame offset to add to
throws:
  CompilationError -



importResource
public void importResource(String fileName, String name, int frameNum, FontsCollector fontsCollector) throws CompilationError(Code)
Import a resource file into the current movie. Using a name that already exists clobbers the old resource (for now).
Parameters:
  fileName - file name of the resource
Parameters:
  name - name of the MovieClip/Sprite
Parameters:
  frameNum - frame offset to add to
Parameters:
  fontsCollector - fonts collector for resource (used by preloader)
throws:
  CompilationError -



importResource
public void importResource(List sources, String name, File parent, int frameNum, FontsCollector fontsCollector)(Code)
Import a multiframe resource into the current movie. Using a name that already exists clobbers the old resource (for now).
Parameters:
  sources - file names of the resources
Parameters:
  name - name of the MovieClip/Sprite
Parameters:
  parent - parent's File object
Parameters:
  frameNum - frame offset to add to
Parameters:
  fontsCollector - fonts collector for resource (used by preloader)



importResource
public void importResource(List sources, String name, File parent, int frameNum, FontsCollector fontsCollector, boolean addStop)(Code)
Import a multiframe resource into the current movie. Using a name that already exists clobbers the old resource (for now).
Parameters:
  sources - file names of the resources
Parameters:
  name - name of the MovieClip/Sprite
Parameters:
  parent - parent's File object
Parameters:
  frameNum - frame offset to add to
Parameters:
  fontsCollector - fonts collector for resource (used by preloader)
Parameters:
  addStop - if true, add a stop frame after each imported resource



isDeviceFont
public boolean isDeviceFont(String face)(Code)



lfcLineHeight
double lfcLineHeight(Font font, int fontsize)(Code)
Compute font bounding box
Parameters:
  font -



openSnippet
public void openSnippet(String liburl) throws IOException(Code)



program
Program program(String script)(Code)
Create a program from the given script



setCanvas
void setCanvas(Canvas canvas, String canvasConstructor)(Code)
Sets the canvas for the movie
Parameters:
  canvas -



setCanvasDefaults
void setCanvasDefaults(Canvas canvas, CompilerMediaCache mc)(Code)
Get default fonts and stuff from canvas; used for snippet compilation



setDeviceFont
public void setDeviceFont(String face)(Code)



setFontManager
public void setFontManager(FontManager fm)(Code)



stripBaseName
public static String stripBaseName(String fileName, CompilationEnvironment env)(Code)



stripPragmas
String stripPragmas(String str)(Code)
strip compiler pragmas from script



warn
void warn(CompilationEnvironment env, String msg)(Code)
Generate a warning message



Fields inherited from org.openlaszlo.compiler.ObjectWriter
final protected int TWIP(Code)(Java Doc)
protected String liburl(Code)(Java Doc)
protected CompilerMediaCache mCache(Code)(Java Doc)
protected Map mClickResourceMap(Code)(Java Doc)
protected boolean mCloseCalled(Code)(Java Doc)
final protected CompilationEnvironment mEnv(Code)(Java Doc)
protected int mExecutionTimeout(Code)(Java Doc)
FontsCollector mFontsCollector(Code)(Java Doc)
protected int mHeight(Code)(Java Doc)
protected Element mInfo(Code)(Java Doc)
protected static Logger mLogger(Code)(Java Doc)
protected Map mMultiFrameResourceMap(Code)(Java Doc)
final protected HashSet mMultiFrameResourceSet(Code)(Java Doc)
protected SymbolGenerator mNameSupply(Code)(Java Doc)
protected boolean mPreloaderAdded(Code)(Java Doc)
protected Properties mProperties(Code)(Java Doc)
protected int mRecursionLimit(Code)(Java Doc)
protected Map mResourceMap(Code)(Java Doc)
protected OutputStream mStream(Code)(Java Doc)
protected int mWidth(Code)(Java Doc)

Methods inherited from org.openlaszlo.compiler.ObjectWriter
abstract void addPreloader(CompilationEnvironment env)(Code)(Java Doc)
abstract void addPreloaderScript(String script)(Code)(Java Doc)
abstract public int addScript(String script)(Code)(Java Doc)
abstract public void close() throws IOException(Code)(Java Doc)
abstract public void closeSnippet() throws IOException(Code)(Java Doc)
String createName()(Code)(Java Doc)
abstract FontManager getFontManager()(Code)(Java Doc)
protected Resource getMultiFrameResource(String fileName, String name, int fNum) throws ImportResourceError(Code)(Java Doc)
protected Resource getResource(String fileName, String name) throws ImportResourceError(Code)(Java Doc)
protected Resource getResource(String fileName, String name, boolean stop) throws ImportResourceError(Code)(Java Doc)
abstract public void importBaseLibrary(String library, CompilationEnvironment env)(Code)(Java Doc)
abstract public String importClickResource(File file) throws ImportResourceError(Code)(Java Doc)
abstract void importFontStyle(String fileName, String face, String style, CompilationEnvironment env) throws FileNotFoundException, CompilationError(Code)(Java Doc)
protected Resource importMP3(String fileName, String name) throws IVException, IOException(Code)(Java Doc)
abstract public void importPreloadResource(String fileName, String name) throws ImportResourceError(Code)(Java Doc)
abstract public void importPreloadResource(File fileName, String name) throws ImportResourceError(Code)(Java Doc)
abstract public void importPreloadResource(List sources, String name, File parent) throws ImportResourceError(Code)(Java Doc)
public String importResource(File file)(Code)(Java Doc)
abstract public void importResource(String fileName, String name) throws ImportResourceError(Code)(Java Doc)
abstract public void importResource(File fFile, String name) throws ImportResourceError(Code)(Java Doc)
abstract public void importResource(List sources, String name, File parent)(Code)(Java Doc)
protected Resource importSWF(String fileName, String name, boolean addStop) throws IVException, FileNotFoundException(Code)(Java Doc)
abstract public boolean isDeviceFont(String face)(Code)(Java Doc)
abstract public void openSnippet(String url) throws IOException(Code)(Java Doc)
abstract void setCanvas(Canvas canvas, String canvasConstructor)(Code)(Java Doc)
abstract void setCanvasDefaults(Canvas canvas, CompilerMediaCache mc)(Code)(Java Doc)
abstract public void setDeviceFont(String face)(Code)(Java Doc)
abstract public void setFontManager(FontManager fm)(Code)(Java Doc)
public void setScriptLimits(int recursion, int timeout)(Code)(Java Doc)
public static String stripBaseName(String fileName, CompilationEnvironment env)(Code)(Java Doc)
void warn(CompilationEnvironment env, String msg)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.