use of org.baderlab.csplugins.enrichmentmap.AfterInjection in project EnrichmentMapApp by BaderLab.
the class ControlPanel method createContents.
@AfterInjection
private void createContents() {
setMinimumSize(new Dimension(390, 400));
setPreferredSize(new Dimension(390, 600));
JButton helpButton = SwingUtil.createOnlineHelpButton(EnrichmentMapBuildProperties.USER_MANUAL_URL, "Online Manual...", serviceRegistrar);
makeSmall(getAboutButton(), getClosePanelButton());
final GroupLayout layout = new GroupLayout(this);
setLayout(layout);
layout.setAutoCreateContainerGaps(LookAndFeelUtil.isWinLAF());
layout.setAutoCreateGaps(!LookAndFeelUtil.isAquaLAF());
layout.setHorizontalGroup(layout.createParallelGroup(CENTER, true).addGroup(layout.createSequentialGroup().addComponent(getEmViewCombo(), DEFAULT_SIZE, DEFAULT_SIZE, Short.MAX_VALUE).addPreferredGap(ComponentPlacement.RELATED).addComponent(getCreateEmButton(), PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE).addPreferredGap(ComponentPlacement.RELATED).addComponent(getOptionsButton(), PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE)).addComponent(getCtrlPanelsContainer(), DEFAULT_SIZE, DEFAULT_SIZE, Short.MAX_VALUE).addGroup(layout.createSequentialGroup().addComponent(helpButton, PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE).addComponent(getAboutButton(), PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE).addGap(0, 0, Short.MAX_VALUE).addComponent(getClosePanelButton(), PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE)));
layout.setVerticalGroup(layout.createSequentialGroup().addGroup(layout.createParallelGroup(CENTER, false).addComponent(getEmViewCombo(), PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE).addComponent(getCreateEmButton(), PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE).addComponent(getOptionsButton(), PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE)).addComponent(getCtrlPanelsContainer(), DEFAULT_SIZE, DEFAULT_SIZE, Short.MAX_VALUE).addGroup(layout.createParallelGroup(CENTER, false).addComponent(helpButton, PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE).addComponent(getAboutButton(), PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE).addComponent(getClosePanelButton(), PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE)));
if (LookAndFeelUtil.isAquaLAF())
setOpaque(false);
}
use of org.baderlab.csplugins.enrichmentmap.AfterInjection in project EnrichmentMapApp by BaderLab.
the class ControlPanelMediator method init.
@AfterInjection
private void init() {
ControlPanel ctrlPanel = getControlPanel();
ctrlPanel.getCreateEmButton().addActionListener(evt -> {
masterMapDialogAction.actionPerformed(evt);
});
ctrlPanel.getCreateEmButton().setToolTipText("" + masterMapDialogAction.getValue(Action.NAME));
ctrlPanel.getOptionsButton().addActionListener(evt -> {
getOptionsMenu().show(ctrlPanel.getOptionsButton(), 0, ctrlPanel.getOptionsButton().getHeight());
});
ctrlPanel.getClosePanelButton().addActionListener(evt -> {
closeControlPanel();
});
ctrlPanel.update(applicationManager.getCurrentNetworkView());
// Wait until the UI is initialized to add this listener to the combo box
JComboBox<CyNetworkView> cmb = ctrlPanel.getEmViewCombo();
cmb.addActionListener(evt -> {
if (!updating)
setCurrentView((CyNetworkView) cmb.getSelectedItem());
});
}
use of org.baderlab.csplugins.enrichmentmap.AfterInjection in project EnrichmentMapApp by BaderLab.
the class MannWhitneyRanksDialog method createContents.
@AfterInjection
private void createContents() {
JPanel dataSetPanel = createDataSetPanel();
JPanel buttonPanel = createButtonPanel();
buttonPanel.setBorder(BorderFactory.createMatteBorder(1, 0, 0, 0, UIManager.getColor("Separator.foreground")));
JPanel panel = new JPanel(new BorderLayout());
panel.add(dataSetPanel, BorderLayout.CENTER);
panel.add(buttonPanel, BorderLayout.SOUTH);
setContentPane(panel);
}
use of org.baderlab.csplugins.enrichmentmap.AfterInjection in project EnrichmentMapApp by BaderLab.
the class LegendPanelMediator method init.
@AfterInjection
@SuppressWarnings("serial")
private void init() {
invokeOnEDTAndWait(() -> {
dialog = new JDialog(swingApplication.getJFrame(), "EnrichmentMap Legend", ModalityType.MODELESS);
dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
dialog.setMinimumSize(new Dimension(440, 380));
JButton closeButton = new JButton(new AbstractAction("Close") {
@Override
public void actionPerformed(ActionEvent e) {
dialog.dispose();
}
});
creationParamsButton.addActionListener(e -> showCreationParamsDialog());
JPanel bottomPanel = LookAndFeelUtil.createOkCancelPanel(null, closeButton, creationParamsButton);
dialog.getContentPane().add(legendPanelProvider.get(), BorderLayout.CENTER);
dialog.getContentPane().add(bottomPanel, BorderLayout.SOUTH);
LookAndFeelUtil.setDefaultOkCancelKeyStrokes(dialog.getRootPane(), null, closeButton.getAction());
dialog.getRootPane().setDefaultButton(closeButton);
dialog.setLocationRelativeTo(swingApplication.getJFrame());
});
}
use of org.baderlab.csplugins.enrichmentmap.AfterInjection in project EnrichmentMapApp by BaderLab.
the class HeatMapParentPanel method CreateContents.
@AfterInjection
public void CreateContents() {
setLayout(new BorderLayout());
setOpaque(false);
showEmptyView();
}
Aggregations