From 684e01bb190c7d0b95347b732aeb3cdeda4740d7 Mon Sep 17 00:00:00 2001 From: abranson Date: Tue, 18 Oct 2011 17:00:33 +0200 Subject: Module support --- source/com/c2kernel/gui/MenuBuilder.java | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'source/com/c2kernel/gui/MenuBuilder.java') diff --git a/source/com/c2kernel/gui/MenuBuilder.java b/source/com/c2kernel/gui/MenuBuilder.java index 6d1bfbc..8acfca7 100644 --- a/source/com/c2kernel/gui/MenuBuilder.java +++ b/source/com/c2kernel/gui/MenuBuilder.java @@ -25,6 +25,7 @@ import javax.swing.event.HyperlinkEvent; import javax.swing.event.HyperlinkListener; import javax.swing.text.html.HTMLEditorKit; +import com.c2kernel.common.ObjectNotFoundException; import com.c2kernel.lookup.DomainPath; import com.c2kernel.lookup.Path; import com.c2kernel.persistency.ClusterStorage; @@ -218,14 +219,23 @@ public class MenuBuilder extends JMenuBar implements ActionListener, ItemListene JLabel title = new JLabel(aboutInfo); about.add(title); - about.add(new JLabel("Domain version: "+Resource.getDomainVersion())); about.add(new JLabel("Kernel version: "+Resource.getKernelVersion())); + about.add(new JLabel("Modules loaded: "+Gateway.getModuleManager().getModuleVersions())); // get license info + StringBuffer lictxt = new StringBuffer(); - String domlictxt = Resource.getTextResource("license.html"); - if (domlictxt != null) - lictxt.append(domlictxt); - lictxt.append(Resource.getTextResource("textFiles/license.html")); + try { + lictxt.append(Resource.getTextResource(null, "textFiles/license.html")); + } catch (ObjectNotFoundException e) { } // no kernel license found + for (String ns : Resource.getModuleBaseURLs().keySet()) { + String domlictxt; + try { + domlictxt = Resource.getTextResource(ns, "license.html"); + lictxt.append(domlictxt).append("\n"); + } catch (ObjectNotFoundException e) { } + + } + JEditorPane license = new JEditorPane(); license.setEditable(false); @@ -242,7 +252,7 @@ public class MenuBuilder extends JMenuBar implements ActionListener, ItemListene myPane.setMessageType(JOptionPane.INFORMATION_MESSAGE); JDialog dialog = myPane.createDialog(null, Language.translate("About")); dialog.setResizable(false); - Icon icon = Resource.getImageResource(Gateway.getProperty("banner")); + Icon icon = Resource.findImage(Gateway.getProperty("banner")); myPane.setIcon(icon); dialog.pack(); dialog.setVisible(true); -- cgit v1.2.3