final WebLabel nameLabel = new WebLabel ( name );
SwingUtils.setBoldFont ( nameLabel );
// Library license file
final WebLinkLabel fileLink = new WebLinkLabel ( child.getName () );
fileLink.setLink ( new Runnable ()
{
@Override
public void run ()
{
try
{
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