From f36d4cc8219864448dd2a058573badc9afd0c45c Mon Sep 17 00:00:00 2001 From: jrobinso <933148+jrobinso@users.noreply.github.com> Date: Sun, 13 Oct 2024 22:57:47 -0700 Subject: [PATCH] Rename ENCODE items --- .../java/org/broad/igv/ui/IGVMenuBar.java | 32 ++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/broad/igv/ui/IGVMenuBar.java b/src/main/java/org/broad/igv/ui/IGVMenuBar.java index a0427907d..fda2e3510 100644 --- a/src/main/java/org/broad/igv/ui/IGVMenuBar.java +++ b/src/main/java/org/broad/igv/ui/IGVMenuBar.java @@ -303,7 +303,37 @@ JMenu createFileMenu() { menuItems.add(MenuAndToolbarUtils.createMenuItem(menuAction)); } - addEncodeItems(menuItems, genomeId); + // ENCODE items. These will be hidden / shown depending on genome chosen + JSeparator separator = new JSeparator(); + menuItems.add(separator); + + JLabel encodeLabel = new JLabel(" ENCODE"); + encodeLabel.setFont(encodeLabel.getFont().deriveFont(Font.BOLD)); + menuItems.add(encodeLabel); + + // Post 2012 ENCODE menu + JMenuItem chipItem = new JMenuItem(); + chipItem.setAction(new BrowseEncodeAction("Signals ChIP ...", 0, BrowseEncodeAction.Type.SIGNALS_CHIP, igv)); + encodeMenuItems.add(chipItem); + + JMenuItem otherSignalsItem = new JMenuItem(); + otherSignalsItem.setAction(new BrowseEncodeAction("Signals Other ...", 0, BrowseEncodeAction.Type.SIGNALS_OTHER, igv)); + encodeMenuItems.add(otherSignalsItem); + + JMenuItem otherItem = new JMenuItem(); + otherItem.setAction(new BrowseEncodeAction("Other ...", 0, BrowseEncodeAction.Type.OTHER, igv)); + encodeMenuItems.add(otherItem); + + for(JComponent item : encodeMenuItems) { + menuItems.add(item); + item.setVisible(EncodeTrackChooser.genomeSupported(genomeId)); + } + + // UCSC hosted ENCODE menu. + encodeUCSCMenuItem = MenuAndToolbarUtils.createMenuItem( + new BrowseEncodeAction("UCSC Repository (2012) ...", KeyEvent.VK_E, BrowseEncodeAction.Type.UCSC, igv)); + encodeUCSCMenuItem.setVisible(EncodeTrackChooser.genomeSupportedUCSC(genomeId)); + menuItems.add(encodeUCSCMenuItem); menuItems.add(new JSeparator()); menuAction = new ReloadTracksMenuAction("Reload Tracks", -1, igv);