/** * Constructs a new panel. */ public SystemPropertiesPanel() { final String baseName = "org.jfree.ui.about.resources.AboutResources"; final ResourceBundle resources = ResourceBundle.getBundle(baseName); setLayout(new BorderLayout()); this.table = SystemProperties.createSystemPropertiesTable(); add(new JScrollPane(this.table)); // Add a popup menu to copy to the clipboard... this.copyPopupMenu = new JPopupMenu(); final String label = resources.getString("system-properties-panel.popup-menu.copy"); final KeyStroke accelerator = (KeyStroke) resources.getObject("system-properties-panel.popup-menu.copy.accelerator"); this.copyMenuItem = new JMenuItem(label); this.copyMenuItem.setAccelerator(accelerator); this.copyMenuItem.getAccessibleContext().setAccessibleDescription(label); this.copyMenuItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { copySystemPropertiesToClipboard(); } }); this.copyPopupMenu.add(this.copyMenuItem); // add popup Listener to the table this.copyPopupListener = new PopupListener(); this.table.addMouseListener(this.copyPopupListener); }
/** * Constructs a new panel. */ public SystemPropertiesPanel() { final String baseName = "org.jfree.ui.about.resources.AboutResources"; final ResourceBundle resources = ResourceBundleWrapper.getBundle( baseName); setLayout(new BorderLayout()); this.table = SystemProperties.createSystemPropertiesTable(); add(new JScrollPane(this.table)); // Add a popup menu to copy to the clipboard... this.copyPopupMenu = new JPopupMenu(); final String label = resources.getString( "system-properties-panel.popup-menu.copy"); final KeyStroke accelerator = (KeyStroke) resources.getObject( "system-properties-panel.popup-menu.copy.accelerator"); this.copyMenuItem = new JMenuItem(label); this.copyMenuItem.setAccelerator(accelerator); this.copyMenuItem.getAccessibleContext().setAccessibleDescription( label); this.copyMenuItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { copySystemPropertiesToClipboard(); } }); this.copyPopupMenu.add(this.copyMenuItem); // add popup Listener to the table this.copyPopupListener = new PopupListener(); this.table.addMouseListener(this.copyPopupListener); }
/** * Constructs a new panel. */ public SystemPropertiesPanel() { final String baseName = "org.jfree.ui.about.resources.AboutResources"; final ResourceBundle resources = ResourceBundleWrapper.getBundle( baseName); setLayout(new BorderLayout()); this.table = SystemProperties.createSystemPropertiesTable(); add(new JScrollPane(this.table)); // Add a popup menu to copy to the clipboard... this.copyPopupMenu = new JPopupMenu(); final String label = resources.getString( "system-properties-panel.popup-menu.copy"); final KeyStroke accelerator = (KeyStroke) resources.getObject( "system-properties-panel.popup-menu.copy.accelerator"); this.copyMenuItem = new JMenuItem(label); this.copyMenuItem.setAccelerator(accelerator); this.copyMenuItem.getAccessibleContext().setAccessibleDescription( label); this.copyMenuItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { copySystemPropertiesToClipboard(); } }); this.copyPopupMenu.add(this.copyMenuItem); // add popup Listener to the table this.copyPopupListener = new PopupListener(); this.table.addMouseListener(this.copyPopupListener); }