public class AboutDialog extends BDialog {
private Preferences preferences = Preferences.userNodeForPackage( NtrViewer.class );
public AboutDialog() {
String version = preferences.get("version","0.01");
BorderContainer mainPane = new BorderContainer();
mainPane.setDefaultLayout( new LayoutInfo(LayoutInfo.CENTER, LayoutInfo.NONE, new Insets(5,5,5,5), null));
String htmlText = "<html><body>" +
"<span style=\"font-size:110%; text-decoration: underline;\">NtrViewer v. " + version + "</span><br><br>" +
"NtrViewer is a part of<br>" +
"a parallel programming<br>" +
"language Parus.<br><br>" +
"NtrViewer has been written<br>" +
"in 100% pure Java<br>" +
"by Sergey Nebolsin.<br><br>" +
"© Sergey Nebolsin, 2006" +
"</body></html>";
mainPane.add( new BLabel(htmlText), BorderContainer.CENTER );
BLabel logo = new BLabel( ResourceManager.loadIconFromFile("logo.png") );
mainPane.add(logo, BorderContainer.WEST );
this.addEventLink( MousePressedEvent.class, this, "doClose" );
this.addEventLink( WindowClosingEvent.class, this, "doClose" );
this.setTitle( "About Parus / NtrViewer");
this.setContent( mainPane );