use of javax.swing.GroupLayout in project zaproxy by zaproxy.
the class CertificateView method initComponents.
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
private void initComponents() {
closeButton = new JButton();
certificateScrollPane = new JScrollPane();
certificateTextArea = new ZapTextArea();
//TODO: Constant for messages.properties
setTitle("Certificate");
//TODO: Constant for messages.properties
closeButton.setText("Close");
closeButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
closeButtonActionPerformed(evt);
}
});
certificateScrollPane.setViewportView(certificateTextArea);
GroupLayout layout = new GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addContainerGap().addGroup(layout.createParallelGroup(GroupLayout.Alignment.TRAILING).addComponent(closeButton, GroupLayout.PREFERRED_SIZE, 93, GroupLayout.PREFERRED_SIZE).addComponent(certificateScrollPane, GroupLayout.DEFAULT_SIZE, 658, Short.MAX_VALUE)).addContainerGap()));
layout.setVerticalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addContainerGap().addComponent(certificateScrollPane, GroupLayout.DEFAULT_SIZE, 439, Short.MAX_VALUE).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(closeButton).addContainerGap()));
pack();
}
use of javax.swing.GroupLayout in project EnrichmentMapApp by BaderLab.
the class PostAnalysisInputPanel method createNamePanel.
private JPanel createNamePanel() {
nameText = new JTextField();
makeSmall(nameText);
JPanel panel = new JPanel();
panel.setBorder(LookAndFeelUtil.createTitledBorder("Data Set Name (optional)"));
final GroupLayout layout = new GroupLayout(panel);
panel.setLayout(layout);
layout.setAutoCreateContainerGaps(true);
layout.setAutoCreateGaps(!LookAndFeelUtil.isAquaLAF());
layout.setHorizontalGroup(layout.createSequentialGroup().addComponent(nameText, DEFAULT_SIZE, DEFAULT_SIZE, Short.MAX_VALUE));
layout.setVerticalGroup(layout.createParallelGroup(Alignment.CENTER, false).addComponent(nameText, PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE));
if (LookAndFeelUtil.isAquaLAF())
panel.setOpaque(false);
return panel;
}
use of javax.swing.GroupLayout in project EnrichmentMapApp by BaderLab.
the class EdgeWidthDialog method createContents.
private void createContents() {
JPanel genesetOverlapPanel = createGenesetOverlapPanel();
JPanel signatureSetPanel = createSignatureSetPanel();
JPanel widthPanel = new JPanel();
widthPanel.setLayout(new BoxLayout(widthPanel, BoxLayout.Y_AXIS));
widthPanel.add(genesetOverlapPanel);
widthPanel.add(Box.createVerticalStrut(5));
widthPanel.add(signatureSetPanel);
JPanel buttonPanel = createButtonPanel();
JPanel panel = new JPanel();
final GroupLayout layout = new GroupLayout(panel);
panel.setLayout(layout);
layout.setAutoCreateContainerGaps(true);
layout.setAutoCreateGaps(!LookAndFeelUtil.isAquaLAF());
layout.setHorizontalGroup(layout.createParallelGroup(Alignment.CENTER, true).addComponent(widthPanel, DEFAULT_SIZE, DEFAULT_SIZE, Short.MAX_VALUE).addComponent(buttonPanel, DEFAULT_SIZE, DEFAULT_SIZE, Short.MAX_VALUE));
layout.setVerticalGroup(layout.createSequentialGroup().addComponent(widthPanel, PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE).addComponent(buttonPanel, PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE));
add(panel);
}
use of javax.swing.GroupLayout in project EnrichmentMapApp by BaderLab.
the class LegendPanel method updateNodeColorPanel.
private void updateNodeColorPanel(Collection<EMDataSet> dataSets, EnrichmentMap map) {
JPanel p = getNodeColorPanel();
p.removeAll();
if (dataSets != null && dataSets.size() == 1) {
EMDataSet ds = dataSets.iterator().next();
ColorLegendPanel clp = new ColorLegendPanel(Colors.MAX_PHENOTYPE_1, Colors.MAX_PHENOTYPE_2, ds.getEnrichments().getPhenotype1(), ds.getEnrichments().getPhenotype2());
GroupLayout layout = (GroupLayout) p.getLayout();
layout.setHorizontalGroup(layout.createSequentialGroup().addGap(0, 0, Short.MAX_VALUE).addComponent(clp, PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE).addGap(0, 0, Short.MAX_VALUE));
layout.setVerticalGroup(layout.createParallelGroup(Alignment.CENTER, false).addComponent(clp));
p.setVisible(true);
} else {
p.setVisible(false);
}
}
use of javax.swing.GroupLayout in project EnrichmentMapApp by BaderLab.
the class LegendPanel method getNodeChartPanel.
private JPanel getNodeChartPanel() {
if (nodeChartPanel == null) {
nodeChartPanel = createStyleLegendPanel(null);
nodeChartPanel.setToolTipText("Node Charts");
int h = 200;
if (options.getChartOptions() != null) {
if (options.getChartOptions().getType() == ChartType.HEAT_STRIPS && options.getDataSets().size() > 4)
h = 300;
else if (options.getChartOptions().getType() == ChartType.HEAT_MAP)
h = Math.max(180, 62 + options.getDataSets().size() * 24);
}
GroupLayout layout = (GroupLayout) nodeChartPanel.getLayout();
layout.setHorizontalGroup(layout.createSequentialGroup().addComponent(chartLegendPanel, DEFAULT_SIZE, DEFAULT_SIZE, Short.MAX_VALUE));
layout.setVerticalGroup(layout.createSequentialGroup().addComponent(chartLegendPanel, PREFERRED_SIZE, h, h));
}
return nodeChartPanel;
}
Aggregations