FileDocCategorySizeDatePackage
TransmitPlayerWindow.javaAPI DocJMF 2.1.1e4493Mon May 12 12:20:32 BST 2003jmapps.export

TransmitPlayerWindow

public class TransmitPlayerWindow extends PlayerWindow implements WindowListener, ActionListener

Fields Summary
private Vector
vectorMngrSessions
private Vector
vectorStreams
private Vector
vectorStreamLabels
private MenuBar
menuBar
private Menu
menuStats
private MenuItem
menuItemStats
private TransmissionStatsDialog
dlgTransmissionStats
private static final String
MENU_STATS
private static final String
MENU_STATS_TRANSMISSION
Constructors Summary
public TransmitPlayerWindow(Processor processor)



          
        super ( processor, JMFI18N.getResource("jmstudio.playerwindow.transcoding"), true );

        this.addWindowListener ( this );
    
Methods Summary
public voidactionPerformed(java.awt.event.ActionEvent event)

        String                  strCmd;
        String                  strAction;

        strCmd = event.getActionCommand ();
        if ( strCmd.equals(MENU_STATS_TRANSMISSION) ) {
            if ( dlgTransmissionStats == null )
                dlgTransmissionStats = new TransmissionStatsDialog ( this,
                                    vectorMngrSessions, vectorStreamLabels );
            dlgTransmissionStats.setVisible ( true );
            dlgTransmissionStats.toFront ();
        }
    
public voidaddNotify()

        createMenuStats ();
        super.addNotify ();
    
public voidaddSessionManager(javax.media.rtp.SessionManager mngrSession, javax.media.rtp.SendStream streamSend, java.lang.String strStreamLabel)


        vectorMngrSessions.addElement ( mngrSession );
        vectorStreams.addElement ( streamSend );
        vectorStreamLabels.addElement ( strStreamLabel );
        createMenuStats ();
    
private synchronized voidcreateMenuBar()

        menuBar = this.getMenuBar ();
        if ( menuBar == null ) {
            menuBar = new MenuBar ();
            setMenuBar ( menuBar );
        }
    
private synchronized voidcreateMenuStats()

        if ( menuItemStats != null )
            return;

        createMenuBar ();
        if ( menuStats == null ) {
            menuStats = new Menu ( MENU_STATS );
            menuBar.add ( this.menuStats );
        }

        menuItemStats = new MenuItem ( MENU_STATS_TRANSMISSION );
        menuStats.add ( menuItemStats );
        menuItemStats.setActionCommand ( MENU_STATS_TRANSMISSION );
        menuItemStats.addActionListener ( this );
    
public voidwindowActivated(java.awt.event.WindowEvent event)

    
public voidwindowClosed(java.awt.event.WindowEvent event)

        int                     i, j;
        int                     nCount;
        SendStream              streamSend;
        SessionManager          mngrSession;

        if ( dlgTransmissionStats != null ) {
            dlgTransmissionStats.dispose ();
            dlgTransmissionStats = null;
        }

        nCount = vectorStreams.size();
        for ( i = 0;  i < nCount;  i++ ) {
            streamSend = (SendStream) vectorStreams.elementAt ( i );
            streamSend.close ();
        }
        nCount = vectorMngrSessions.size();
        for ( i = 0;  i < nCount;  i++ ) {
            mngrSession = (SessionManager) vectorMngrSessions.elementAt ( i );
            mngrSession.closeSession ( "Transmission terminated" );
        }
        vectorMngrSessions.removeAllElements ();
        vectorStreams.removeAllElements ();
        vectorStreamLabels.removeAllElements ();
    
public voidwindowClosing(java.awt.event.WindowEvent event)

    
public voidwindowDeactivated(java.awt.event.WindowEvent event)

    
public voidwindowDeiconified(java.awt.event.WindowEvent event)

    
public voidwindowIconified(java.awt.event.WindowEvent event)

    
public voidwindowOpened(java.awt.event.WindowEvent event)