DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

MyMedia.fx

01.15.2010
| 910 views |
  • submit to reddit
        Das hier ist meine MyMedia.fx sie ist aehnlich wie die JMFView.fx aus unserem PDF.

package mm1;

import javafx.scene.CustomNode;
import javafx.scene.Group;
import javafx.scene.Node;


public class MyMedia extends CustomNode {
    public var url: java.net.URL;
    public var view:SwingMediaView;
    
    public override function create(): Node{
        var player:MyJMFPlayer = new MyJMFPlayer();
        player.closePlayer();
        player = new MyJMFPlayer(url.toString());
        
        var comp:java.awt.Component = bind player.getVisualComponent();
        view = SwingMediaView{
                playerpanel: comp;
                translateX:10  //nutzt diese Zeilen um euere Componente richtig zu positionieren
                translateY:18
        };
        return Group{
            content: [view]
        }
    }
}