@ -38,6 +38,7 @@ import javax.swing.UIManager;
public class SyncFailedPluginsDialog extends JDialog {
private UILabel detailsLabel ;
private JScrollPane scrollPane ;
private UITextArea detailsTextArea ;
public SyncFailedPluginsDialog ( Frame parent , JSONArray syncFailedPlugins ) {
super ( parent , true ) ;
JPanel body = FRGUIPaneFactory . createBorderLayout_L_Pane ( ) ;
@ -70,14 +71,9 @@ public class SyncFailedPluginsDialog extends JDialog {
detailsTitlePanel . add ( detailsLabel ) ;
detailsTitlePanel . setBorder ( BorderFactory . createEmptyBorder ( 0 , 0 , 5 , 0 ) ) ;
UITextArea detailsTextArea = new UITextArea ( ) ;
StringBuilder detailsText = new StringBuilder ( StringUtils . EMPTY ) ;
for ( int i = 0 ; i < syncFailedPlugins . size ( ) ; i + + ) {
JSONObject plugin = syncFailedPlugins . getJSONObject ( i ) ;
detailsText . append ( plugin . getString ( "name" ) ) . append ( "," ) . append ( Toolkit . i18nText ( "Fine-Design_Basic_Sync_Server_Version" ) ) . append ( plugin . getString ( "version" ) ) . append ( "\n" ) ;
}
detailsTextArea . setText ( detailsText . toString ( ) ) ;
detailsTextArea = new UITextArea ( ) ;
detailsTextArea . setEditable ( false ) ;
showSyncFailedPluginsInfo ( syncFailedPlugins ) ;
scrollPane = new JScrollPane ( detailsTextArea ) ;
centerPanel . add ( detailsTitlePanel , BorderLayout . NORTH ) ;
centerPanel . add ( scrollPane , BorderLayout . CENTER ) ;
@ -98,6 +94,18 @@ public class SyncFailedPluginsDialog extends JDialog {
GUICoreUtils . centerWindow ( this ) ;
}
public void showSyncFailedPluginsInfo ( JSONArray syncFailedPlugins ) {
if ( null = = syncFailedPlugins ) {
return ;
}
StringBuilder detailsText = new StringBuilder ( StringUtils . EMPTY ) ;
for ( int i = 0 ; i < syncFailedPlugins . size ( ) ; i + + ) {
JSONObject plugin = syncFailedPlugins . getJSONObject ( i ) ;
detailsText . append ( plugin . getString ( "name" ) ) . append ( "," ) . append ( Toolkit . i18nText ( "Fine-Design_Basic_Sync_Server_Version" ) ) . append ( plugin . getString ( "version" ) ) . append ( "\n" ) ;
}
detailsTextArea . setText ( detailsText . toString ( ) ) ;
}
private MouseListener detailsLabelClickListener = new MouseAdapter ( ) {
@Override
public void mouseClicked ( MouseEvent e ) {