{
final String license = FileUtils.readToString ( structure.getEntryInputStream ( child ) );
final WebPopup licensePopup = new WebPopup ();
final WebTextArea textArea = new WebTextArea ( license );
textArea.setEditable ( false );
licensePopup.add ( new WebScrollPane ( textArea, false ) );
licensePopup.showPopupAsModal ( fileLink, true, true );
HotkeyManager.registerHotkey ( textArea, Hotkey.ESCAPE, new HotkeyRunnable ()
{
@Override
public void run ( final KeyEvent e )
{
licensePopup.hidePopup ();
}
} );
}
catch ( final IOException e )
{
Log.error ( this, e );
}
}
} );
final WebLabel licenseLabel = new WebLabel ();
licenseLabel.setLanguage ( "weblaf.info.libraries.license" );
final GroupPanel fileLinkPanel = new GroupPanel ( 5, licenseLabel, fileLink );
// Library site URL
final WebLinkLabel urlLink = new WebLinkLabel ( url );
urlLink.setLink ( url, false );
final WebLabel siteLabel = new WebLabel ();
siteLabel.setLanguage ( "weblaf.info.libraries.site" );
final GroupPanel urlLinkPanel = new GroupPanel ( 5, siteLabel, urlLink );
// Single library panel
final GroupPanel libraryPanel = new GroupPanel ( false, nameLabel, fileLinkPanel, urlLinkPanel );
libraryPanel.setUndecorated ( false );
libraryPanel.setMargin ( 5 );
libraryPanel.setPreferredWidth ( 0 );
librariesPanel.add ( libraryPanel );
}
}
// Libraries panel scroll
final WebScrollPane scrollPane = new WebScrollPane ( librariesPanel, false );
scrollPane.setPreferredHeight ( 0 );
return scrollPane;
}
catch ( final Throwable e )
{
Log.error ( this, e );