FileDocCategorySizeDatePackage
SessionControlDialog.javaAPI DocJMF 2.1.1e3431Mon May 12 12:20:32 BST 2003jmapps.rtp

SessionControlDialog

public class SessionControlDialog extends JMDialog

Fields Summary
private SessionManager
mngrSession
Constructors Summary
public SessionControlDialog(Frame frame, SessionManager mngrSession)

	    super ( frame, JMFI18N.getResource("jmstudio.rtpsessionctrl.title"), false );

        this.mngrSession = mngrSession;
        try {
            init();
        }
        catch (Exception e) {
            e.printStackTrace();
        }
    
Methods Summary
public voidactionPerformed(java.awt.event.ActionEvent event)

        String  strAction;

        strAction = event.getActionCommand ();
        if ( strAction.equals(ACTION_CLOSE) ) {
            setAction ( ACTION_CLOSE );
            this.setVisible ( false );
        }
    
private jmapps.ui.JMPanelcreateBufferControlPanel()

        JMPanel         panelBufferControl;
        BufferControl   bufferControl;
        Component       component = null;

        panelBufferControl = new JMPanel ( new FlowLayout() );

        bufferControl = (BufferControl) mngrSession.getControl ( "javax.media.control.BufferControl" );
        if ( bufferControl != null )
            component = bufferControl.getControlComponent ();

        if ( component != null )
            panelBufferControl.add ( component );

        return ( panelBufferControl );
    
private jmapps.ui.JMPanelcreateOverallStatsPanel()

        JMPanel     panelStats;

        panelStats = new PanelOverallRtpStats ( mngrSession );
        return ( panelStats );
    
private jmapps.ui.JMPanelcreateParticipantsPanel()

        JMPanel     panelParticipants;

        panelParticipants = new PanelParticipants ( mngrSession );
        return ( panelParticipants );
    
private voidinit()

        JMPanel     panel;
        JMPanel     panelContent;
        JMPanel     panelButtons;
        TabControl  tabControl;


        this.setLayout ( new BorderLayout(6,6) );
        panelContent = new JMPanel ( new BorderLayout(6,6) );
        panelContent.setEmptyBorder ( 6, 6, 6, 6 );
        this.add ( panelContent, BorderLayout.CENTER );

        tabControl = new TabControl ( TabControl.ALIGN_TOP );
        panelContent.add ( tabControl, BorderLayout.CENTER );

        panel = createOverallStatsPanel ();
        tabControl.addPage ( panel, JMFI18N.getResource("jmstudio.rtpsessionctrl.panel.overall") );
        panel = createParticipantsPanel ();
        tabControl.addPage ( panel, JMFI18N.getResource("jmstudio.rtpsessionctrl.panel.participants") );
        panel = createBufferControlPanel ();
        tabControl.addPage ( panel, JMFI18N.getResource("jmstudio.rtpsessionctrl.panel.bufferctrl") );

        panel = new JMPanel ( new BorderLayout(6,6) );
        panelContent.add ( panel, BorderLayout.SOUTH );
        panelButtons = createButtonPanel ( new String[] { ACTION_CLOSE } );
        panel.add ( panelButtons, BorderLayout.EAST );

        this.pack ();
        this.setResizable ( false );
    
public voidwindowClosing(java.awt.event.WindowEvent event)

        setAction ( ACTION_CLOSE );
        this.setVisible ( false );