@ -158,7 +158,7 @@ public class MediaServiceImpl
/ * *
* Audio configuration panel .
* /
private SIPCommDialog audioConfig uration = null ;
private SIPCommDialog audioConfig Dialog = null ;
/ * *
* Create a < tt > MediaStream < / tt > which will use a specific
@ -574,7 +574,7 @@ void start()
final Component panel = MediaConfiguration . createBasicControls (
DeviceConfigurationComboBoxModel . AUDIO , false ) ;
audioConfig uration = new SIPCommDialog ( )
audioConfig Dialog = new SIPCommDialog ( )
{
/ * *
* Serial version UID .
@ -591,26 +591,57 @@ protected void close(boolean isEscaped)
}
} ;
TransparentPanel mainPanel = new TransparentPanel ( new
BorderLayout ( ) ) ;
TransparentPanel btnPanel = new TransparentPanel ( new
FlowLayout ( FlowLayout . RIGHT ) ) ;
TransparentPanel mainPanel
= new TransparentPanel ( new BorderLayout ( 20 , 5 ) ) ;
TransparentPanel fieldsPanel
= new TransparentPanel ( new BorderLayout ( 10 , 5 ) ) ;
mainPanel . setBorder (
BorderFactory . createEmptyBorder ( 20 , 20 , 20 , 20 ) ) ;
TransparentPanel btnPanel
= new TransparentPanel ( new FlowLayout ( FlowLayout . RIGHT ) ) ;
JButton btn = new JButton ( NeomediaActivator . getResources ( ) .
getI18NString ( "service.gui.CLOSE" ) ) ;
btn . addActionListener ( new ActionListener ( )
{
public void actionPerformed ( ActionEvent evt )
{
audioConfiguration . setVisible ( false ) ;
audioConfig Dialog . setVisible ( false ) ;
}
} ) ;
btnPanel . add ( btn ) ;
mainPanel . add ( panel , BorderLayout . CENTER ) ;
mainPanel . add ( btnPanel , BorderLayout . SOUTH ) ;
audioConfiguration . add ( mainPanel ) ;
audioConfiguration . validate ( ) ;
audioConfiguration . pack ( ) ;
JTextArea infoTextArea = new JTextArea ( ) ;
infoTextArea . setOpaque ( false ) ;
infoTextArea . setEditable ( false ) ;
infoTextArea . setWrapStyleWord ( true ) ;
infoTextArea . setLineWrap ( true ) ;
infoTextArea . setText ( NeomediaActivator . getResources ( )
. getI18NString (
"impl.media.configform.AUDIO_DEVICE_CONNECTED_REMOVED" ) ) ;
fieldsPanel . add ( infoTextArea , BorderLayout . NORTH ) ;
fieldsPanel . add ( panel , BorderLayout . CENTER ) ;
fieldsPanel . add ( btnPanel , BorderLayout . SOUTH ) ;
TransparentPanel iconPanel
= new TransparentPanel ( new BorderLayout ( ) ) ;
iconPanel . add ( new JLabel ( NeomediaActivator . getResources ( )
. getImage ( "plugin.mediaconfig.AUDIO_ICON_64x64" ) ) ,
BorderLayout . NORTH ) ;
mainPanel . add ( iconPanel , BorderLayout . WEST ) ;
mainPanel . add ( fieldsPanel , BorderLayout . CENTER ) ;
audioConfigDialog . setTitle ( NeomediaActivator . getResources ( )
. getI18NString ( "impl.media.configform.AUDIO_DEVICE_CONFIG" ) ) ;
audioConfigDialog . add ( mainPanel ) ;
audioConfigDialog . validate ( ) ;
audioConfigDialog . pack ( ) ;
PortAudio . addDeviceChangedCallback ( this ) ;
}
@ -1393,7 +1424,7 @@ public void deviceChanged()
* /
private void showAudioConfiguration ( )
{
if ( audioConfig uration = = null )
if ( audioConfig Dialog = = null )
{
return ;
}
@ -1411,13 +1442,13 @@ public void run()
}
SwingUtilities . updateComponentTreeUI (
audioConfig uration . getComponent ( 0 ) ) ;
audioConfig uration . pack ( ) ;
audioConfig uration . repaint ( ) ;
audioConfig Dialog . getComponent ( 0 ) ) ;
audioConfig Dialog . pack ( ) ;
audioConfig Dialog . repaint ( ) ;
if ( ! audioConfig uration . isVisible ( ) )
if ( ! audioConfig Dialog . isVisible ( ) )
{
audioConfig uration . setVisible ( true ) ;
audioConfig Dialog . setVisible ( true ) ;
}
}
}