@Nonnull private String getName() { final ModuleInfo info = Modules.getDefault().ownerOf(getClass()); return String.format("%s (%s)", info.getDisplayName(), info.getCodeNameBase()); } }
private JPanel createVersionPanel() { final JPanel panel = new JPanel(); panel.setLayout(new BoxLayout(panel, BoxLayout.LINE_AXIS)); final ModuleInfo moduleInfo = Modules.getDefault().ownerOf(S2tbxAboutBox.class); panel.add(new JLabel("<html><b>Sentinel-2 Toolbox (S2TBX) version " + moduleInfo.getImplementationVersion() + "</b>", SwingConstants.RIGHT)); final URI releaseNotesURI = getReleaseNotesURI(); if (releaseNotesURI != null) { final JLabel releaseNoteLabel = new JLabel("<html><a href=\"" + releaseNotesURI.toString() + "\">Release Notes</a>", SwingConstants.RIGHT); releaseNoteLabel.setCursor(new Cursor(Cursor.HAND_CURSOR)); releaseNoteLabel.addMouseListener(new BrowserUtils.URLClickAdaptor(releaseNotesHTTP)); panel.add(releaseNoteLabel); } return panel; }
public SnapAboutBox() { super(new BorderLayout(4, 4)); ModuleInfo desktopModuleInfo = Modules.getDefault().ownerOf(SnapAboutBox.class); ModuleInfo engineModuleInfo = Modules.getDefault().ownerOf(Product.class); ImageIcon image = new ImageIcon(SnapAboutBox.class.getResource("SNAP_Banner.png")); JLabel banner = new JLabel(image);
ModuleInfo m = Modules.getDefault().ownerOf(l.getClass()); if (m != null && m.isEnabled()) { if (err.isLoggable(Level.FINE)) err.fine("belongs to module: " + m.getCodeNameBase());