|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JPanel chrriis.dj.nativeswing.swtimpl.NSPanelComponent chrriis.dj.nativeswing.swtimpl.components.JFlashPlayer
public class JFlashPlayer
A native Flash player. It is a browser-based component, which relies on the Flash plugin.
Methods execute when this component is initialized. If the component is not initialized, methods will be executed as soon as it gets initialized.
If the initialization fails, the methods will not have any effect. The results from methods have relevant values only when the component is valid.
Nested Class Summary | |
---|---|
static interface |
JFlashPlayer.FlashPlayerDecoratorFactory
A factory that creates the decorators for flash players. |
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary |
---|
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
JFlashPlayer(NSOption... options)
Construct a flash player. |
Method Summary | |
---|---|
void |
addFlashPlayerListener(FlashPlayerListener listener)
Add a flash player listener. |
protected FlashPlayerDecorator |
createFlashPlayerDecorator(Component renderingComponent)
Create a decorator for this flash player. |
void |
disposeNativePeer()
Explicitely dispose the native resources. |
protected void |
finalize()
|
FlashPlayerListener[] |
getFlashPlayerListeners()
Get the flash player listeners. |
Object |
getVariable(String name)
Get the value of a variable, or an object property if the web browser used is Internet Explorer. |
JWebBrowser |
getWebBrowser()
Get the web browser that contains this component. |
void |
invokeFlashFunction(String functionName,
Object... args)
Invoke a function on the Flash object, with optional arguments (Strings, numbers, booleans). |
Object |
invokeFlashFunctionWithResult(String functionName,
Object... args)
Invoke a function on the Flash object and waits for a result, with optional arguments (Strings, numbers, booleans). |
boolean |
isControlBarVisible()
Indicate whether the control bar is visible. |
void |
load(Class<?> clazz,
String resourcePath)
Load a file from the classpath. |
void |
load(Class<?> clazz,
String resourcePath,
FlashPluginOptions options)
Load a file from the classpath. |
void |
load(String resourceLocation)
Load a file. |
void |
load(String resourceLocation,
FlashPluginOptions options)
Load a file. |
void |
pause()
Pause the execution of timeline-based flash applications. |
void |
play()
Play a timeline-based flash applications. |
void |
removeFlashPlayerListener(FlashPlayerListener listener)
Remove a flash player listener. |
void |
removeNotify()
|
void |
setControlBarVisible(boolean isControlBarVisible)
Set whether the control bar is visible. |
static NSOption |
setCustomJavascriptDefinitions(String javascript)
Create an option to set some custom Javascript definitions (functions) that are added to the HTML page that contains the plugin. |
static void |
setFlashPlayerDecoratorFactory(JFlashPlayer.FlashPlayerDecoratorFactory flashPlayerDecoratorFactory)
Set the decorator that will be used for future flash player instances. |
void |
setVariable(String name,
String value)
Set the value of a variable. |
void |
stop()
Stop the execution of timeline-based flash applications. |
Methods inherited from class chrriis.dj.nativeswing.swtimpl.NSPanelComponent |
---|
constrainVisibility, destroyOnFinalization, getNativeComponent, initialize, initializeNativePeer, isNativePeerDisposed, isNativePeerInitialized, isNativePeerValid, proxyComponentHierarchy, runInSequence |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public JFlashPlayer(NSOption... options)
options
- the options to configure the behavior of this component.Method Detail |
---|
public static NSOption setCustomJavascriptDefinitions(String javascript)
public static void setFlashPlayerDecoratorFactory(JFlashPlayer.FlashPlayerDecoratorFactory flashPlayerDecoratorFactory)
flashPlayerDecoratorFactory
- the factory that creates the decorators, or null for default decorators.protected FlashPlayerDecorator createFlashPlayerDecorator(Component renderingComponent)
renderingComponent
- the component to add to the decorator's component hierarchy.
public void load(Class<?> clazz, String resourcePath)
clazz
- the reference clazz of the file to load.resourcePath
- the path to the file.public void load(Class<?> clazz, String resourcePath, FlashPluginOptions options)
clazz
- the reference clazz of the file to load.resourcePath
- the path to the file.options
- the options to better configure the initialization of the flash plugin.public void load(String resourceLocation)
resourceLocation
- the path or URL to the file.public void load(String resourceLocation, FlashPluginOptions options)
resourceLocation
- the path or URL to the file.options
- the options to better configure the initialization of the flash plugin.public void play()
public void pause()
public void stop()
public void setVariable(String name, String value)
name
- the name of the variable.value
- the new value of the variable.public Object getVariable(String name)
public void invokeFlashFunction(String functionName, Object... args)
functionName
- the name of the function to invoke.args
- optional arguments.public Object invokeFlashFunctionWithResult(String functionName, Object... args)
functionName
- the name of the function to invoke.args
- optional arguments.
public JWebBrowser getWebBrowser()
public boolean isControlBarVisible()
public void setControlBarVisible(boolean isControlBarVisible)
isControlBarVisible
- true if the control bar should be visible, false otherwise.public void addFlashPlayerListener(FlashPlayerListener listener)
listener
- The flash player listener to add.public void removeFlashPlayerListener(FlashPlayerListener listener)
listener
- the flash player listener to remove.public FlashPlayerListener[] getFlashPlayerListeners()
protected void finalize() throws Throwable
finalize
in class Object
Throwable
public void removeNotify()
removeNotify
in class JComponent
public void disposeNativePeer()
NSComponent
disposeNativePeer
in interface NSComponent
disposeNativePeer
in class NSPanelComponent
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |