| 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.
|
Method Summary | |
void | addPreloader(CompilationEnvironment env) | void | addPreloaderScript(String script) | void | addProgram(Program program) | public int | addScript(String script) Compiles the specified script to bytecodes
and add its bytecodes to the current frame in this movie. | boolean | checkFontExists(FontInfo fontInfo) | public void | close() Writes the SWF to the OutputStream that was
supplied to the SWFWriter's constructor. | public void | closeSnippet() | static double | fontHeight(Font font) | DoAction | getFirstDoAction(String fileName) | double | getFontHeight(FontInfo fontInfo) | FontManager | getFontManager() | double | getLFCLineHeight(FontInfo fontInfo, int fontsize) | void | importActions(String fileName) | public void | importBaseLibrary(String library, CompilationEnvironment env) | public String | importClickResource(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. | void | importFontStyle(String fileName, String face, String style, CompilationEnvironment env) Import a font of a given style into the SWF we are writing. | public void | importPreloadResource(String fileName, String name) Import a resource file into the preloader movie. | public void | importPreloadResource(File fFileName, String name) | public void | importPreloadResource(List sources, String name, File parent) Import a multiframe resource into the current movie. | public void | importResource(List sources, String name, File parent) Import a multiframe resource into the current movie. | public void | importResource(List sources, String name, File parent, int frameNum) Import a multiframe resource into the current movie. | public void | importResource(String fileName, String name) Import a resource file into the current movie. | public void | importResource(File fFile, String name) | public void | importResource(String fileName, String name, int frameNum) Import a resource file into the current movie. | public void | importResource(String fileName, String name, int frameNum, FontsCollector fontsCollector) Import a resource file into the current movie. | public void | importResource(List sources, String name, File parent, int frameNum, FontsCollector fontsCollector) Import a multiframe resource into the current movie. | public void | importResource(List sources, String name, File parent, int frameNum, FontsCollector fontsCollector, boolean addStop) Import a multiframe resource into the current movie. | public boolean | isDeviceFont(String face) | double | lfcLineHeight(Font font, int fontsize) | public void | openSnippet(String liburl) | Program | program(String script) | void | setCanvas(Canvas canvas, String canvasConstructor) | void | setCanvasDefaults(Canvas canvas, CompilerMediaCache mc) | public void | setDeviceFont(String face) | public void | setFontManager(FontManager fm) | public static String | stripBaseName(String fileName, CompilationEnvironment env) | String | stripPragmas(String str) | void | warn(CompilationEnvironment env, String msg) |
DEFAULT_SIZE | final public static int DEFAULT_SIZE(Code) | | Height for generated advance (width) table
|
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. |
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 |
fontHeight | static double fontHeight(Font font)(Code) | | Compute font bounding box
Parameters: font - |
getFontHeight | double getFontHeight(FontInfo fontInfo)(Code) | | height of fontinfo in pixels Parameters: fontInfo - |
getLFCLineHeight | double getLFCLineHeight(FontInfo fontInfo, int fontsize)(Code) | | lineheight which lfc LzInputText expects for a given fontsize |
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.
|
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 |
lfcLineHeight | double lfcLineHeight(Font font, int fontsize)(Code) | | Compute font bounding box
Parameters: font - |
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
|
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)
|
|
|