Skip to content

Commit 875b0c8

Browse files
committed
Move "Online Help" to the main panel menu
1 parent fbe3378 commit 875b0c8

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

EnrichmentMapPlugin/src/main/java/org/baderlab/csplugins/enrichmentmap/view/control/ControlPanel.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import static javax.swing.GroupLayout.Alignment.CENTER;
66
import static javax.swing.GroupLayout.Alignment.LEADING;
77
import static javax.swing.GroupLayout.Alignment.TRAILING;
8-
import static org.baderlab.csplugins.enrichmentmap.EMBuildProps.HELP_URL_CONTROL;
98
import static org.baderlab.csplugins.enrichmentmap.view.util.IconUtil.*;
109
import static org.baderlab.csplugins.enrichmentmap.view.util.SwingUtil.makeSmall;
1110
import static org.cytoscape.util.swing.IconManager.*;
@@ -155,8 +154,6 @@ private void createContents() {
155154
setMinimumSize(new Dimension(390, 400));
156155
setPreferredSize(new Dimension(390, 600));
157156

158-
JButton helpButton = SwingUtil.createOnlineHelpButton(HELP_URL_CONTROL, "Online Manual...", serviceRegistrar);
159-
160157
makeSmall(getClosePanelButton());
161158

162159
final GroupLayout layout = new GroupLayout(this);
@@ -168,8 +165,6 @@ private void createContents() {
168165
.addGroup(layout.createSequentialGroup()
169166
.addComponent(getEmViewCombo(), DEFAULT_SIZE, DEFAULT_SIZE, Short.MAX_VALUE)
170167
.addPreferredGap(ComponentPlacement.RELATED)
171-
.addComponent(helpButton, PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE)
172-
.addPreferredGap(ComponentPlacement.RELATED)
173168
.addComponent(getCreateEmButton(), PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE)
174169
.addPreferredGap(ComponentPlacement.RELATED)
175170
.addComponent(getOptionsButton(), PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE)
@@ -183,7 +178,6 @@ private void createContents() {
183178
layout.setVerticalGroup(layout.createSequentialGroup()
184179
.addGroup(layout.createParallelGroup(CENTER, false)
185180
.addComponent(getEmViewCombo(), PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE)
186-
.addComponent(helpButton, PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE)
187181
.addComponent(getCreateEmButton(), PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE)
188182
.addComponent(getOptionsButton(), PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE)
189183
)

EnrichmentMapPlugin/src/main/java/org/baderlab/csplugins/enrichmentmap/view/control/ControlPanelMediator.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package org.baderlab.csplugins.enrichmentmap.view.control;
22

3+
import static org.baderlab.csplugins.enrichmentmap.EMBuildProps.HELP_URL_CONTROL;
34
import static org.baderlab.csplugins.enrichmentmap.style.EMStyleBuilder.Columns.EDGE_DATASET_VALUE_COMPOUND;
45
import static org.baderlab.csplugins.enrichmentmap.style.EMStyleBuilder.Columns.EDGE_INTERACTION_VALUE_SIG;
56
import static org.baderlab.csplugins.enrichmentmap.style.EMStyleBuilder.Columns.NODE_GS_TYPE;
@@ -96,6 +97,7 @@
9697
import org.baderlab.csplugins.enrichmentmap.view.postanalysis.EdgeWidthDialog;
9798
import org.baderlab.csplugins.enrichmentmap.view.postanalysis.PADialogMediator;
9899
import org.baderlab.csplugins.enrichmentmap.view.util.IconUtil;
100+
import org.baderlab.csplugins.enrichmentmap.view.util.OpenBrowser;
99101
import org.baderlab.csplugins.enrichmentmap.view.util.SliderBarPanel;
100102
import org.baderlab.csplugins.enrichmentmap.view.util.SwingUtil;
101103
import org.cytoscape.application.CyApplicationManager;
@@ -998,10 +1000,16 @@ private JPopupMenu getOptionsMenu() {
9981000
menu.addSeparator();
9991001

10001002

1001-
JMenuItem setEdgeWidthItem = new JMenuItem("Set Signature Edge Width...");
1003+
JMenuItem setEdgeWidthItem = new JMenuItem("Set Signature Edge Width...");
10021004
setEdgeWidthItem.addActionListener(evt -> showEdgeWidthDialog());
10031005
menu.add(setEdgeWidthItem);
10041006

1007+
menu.addSeparator();
1008+
1009+
JMenuItem helpItem = new JMenuItem("Online Help...");
1010+
helpItem.addActionListener(evt -> new OpenBrowser().openURL(HELP_URL_CONTROL));
1011+
menu.add(helpItem);
1012+
10051013
menu.add(new JMenuItem(showAboutDialogActionProvider.get()));
10061014

10071015
return menu;

0 commit comments

Comments
 (0)