Search in sources :

Example 71 with GroupLayout

use of javax.swing.GroupLayout in project cytoscape-impl by cytoscape.

the class AbstractChartEditor method getRangePnl.

protected JPanel getRangePnl() {
    if (rangePnl == null) {
        rangePnl = new JPanel();
        // Transparent if Aqua
        rangePnl.setOpaque(!isAquaLAF());
        rangePnl.setVisible(setRange);
        if (!rangePnl.isVisible())
            return rangePnl;
        final GroupLayout layout = new GroupLayout(rangePnl);
        rangePnl.setLayout(layout);
        layout.setAutoCreateContainerGaps(false);
        layout.setAutoCreateGaps(!isAquaLAF());
        final JSeparator sep = new JSeparator();
        layout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING, true).addComponent(getGlobalRangeCkb()).addGroup(layout.createSequentialGroup().addComponent(getAutoRangeCkb()).addPreferredGap(ComponentPlacement.UNRELATED).addComponent(rangeMinLbl).addComponent(getRangeMinTxt()).addComponent(rangeMaxLbl).addComponent(getRangeMaxTxt()).addComponent(getRefreshRangeBtn())).addComponent(sep));
        layout.setVerticalGroup(layout.createSequentialGroup().addComponent(getGlobalRangeCkb()).addGroup(layout.createParallelGroup(Alignment.CENTER, false).addComponent(getAutoRangeCkb(), PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE).addComponent(rangeMinLbl).addComponent(getRangeMinTxt(), PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE).addComponent(rangeMaxLbl).addComponent(getRangeMaxTxt(), PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE).addComponent(getRefreshRangeBtn(), PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE)).addComponent(sep, PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE));
    }
    return rangePnl;
}
Also used : JPanel(javax.swing.JPanel) GroupLayout(javax.swing.GroupLayout) JSeparator(javax.swing.JSeparator)

Example 72 with GroupLayout

use of javax.swing.GroupLayout in project cytoscape-impl by cytoscape.

the class AbstractChartEditor method getOrientationPnl.

protected JPanel getOrientationPnl() {
    if (orientationPnl == null) {
        orientationPnl = new JPanel();
        // Transparent if Aqua
        orientationPnl.setOpaque(!isAquaLAF());
        orientationPnl.setVisible(setOrientation);
        if (!orientationPnl.isVisible())
            return orientationPnl;
        final GroupLayout layout = new GroupLayout(orientationPnl);
        orientationPnl.setLayout(layout);
        layout.setAutoCreateContainerGaps(false);
        layout.setAutoCreateGaps(!isAquaLAF());
        final JSeparator sep = new JSeparator();
        layout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING, true).addGroup(layout.createSequentialGroup().addComponent(getVerticalRd()).addComponent(getHorizontalRd())).addComponent(sep));
        layout.setVerticalGroup(layout.createSequentialGroup().addGroup(layout.createParallelGroup(Alignment.CENTER, false).addComponent(getVerticalRd()).addComponent(getHorizontalRd())).addComponent(sep, PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE));
    }
    return orientationPnl;
}
Also used : JPanel(javax.swing.JPanel) GroupLayout(javax.swing.GroupLayout) JSeparator(javax.swing.JSeparator)

Example 73 with GroupLayout

use of javax.swing.GroupLayout in project cytoscape-impl by cytoscape.

the class AbstractChartEditor method getBasicOptionsPnl.

protected JPanel getBasicOptionsPnl() {
    if (basicOptionsPnl == null) {
        basicOptionsPnl = new JPanel();
        // Transparent if Aqua
        basicOptionsPnl.setOpaque(!isAquaLAF());
        final GroupLayout layout = new GroupLayout(basicOptionsPnl);
        basicOptionsPnl.setLayout(layout);
        layout.setAutoCreateContainerGaps(true);
        layout.setAutoCreateGaps(!isAquaLAF());
        layout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING, true).addComponent(getOtherBasicOptionsPnl()).addComponent(getDataPnl()).addComponent(getRangePnl()));
        layout.setVerticalGroup(layout.createSequentialGroup().addComponent(getOtherBasicOptionsPnl(), PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE).addComponent(getDataPnl(), PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE).addComponent(getRangePnl(), PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE));
    }
    return basicOptionsPnl;
}
Also used : JPanel(javax.swing.JPanel) GroupLayout(javax.swing.GroupLayout)

Example 74 with GroupLayout

use of javax.swing.GroupLayout in project cytoscape-impl by cytoscape.

the class AbstractChartEditor method getAdvancedOptionsPnl.

protected JPanel getAdvancedOptionsPnl() {
    if (advancedOptionsPnl == null) {
        advancedOptionsPnl = new JPanel();
        // Transparent if Aqua
        advancedOptionsPnl.setOpaque(!isAquaLAF());
        final GroupLayout layout = new GroupLayout(advancedOptionsPnl);
        advancedOptionsPnl.setLayout(layout);
        layout.setAutoCreateContainerGaps(true);
        layout.setAutoCreateGaps(!isAquaLAF());
        layout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING, true).addComponent(getColorSchemeEditor()).addComponent(getLabelsPnl()).addComponent(getOrientationPnl()).addComponent(getAxesPnl()).addComponent(getBorderPnl()).addComponent(getOtherAdvancedOptionsPnl()));
        layout.setVerticalGroup(layout.createSequentialGroup().addComponent(getColorSchemeEditor()).addComponent(getLabelsPnl()).addComponent(getOrientationPnl()).addComponent(getAxesPnl()).addComponent(getBorderPnl()).addComponent(getOtherAdvancedOptionsPnl()));
    }
    return advancedOptionsPnl;
}
Also used : JPanel(javax.swing.JPanel) GroupLayout(javax.swing.GroupLayout)

Example 75 with GroupLayout

use of javax.swing.GroupLayout in project cytoscape-impl by cytoscape.

the class LinearGradientEditor method getOtherOptionsPnl.

@Override
protected JPanel getOtherOptionsPnl() {
    final JPanel p = super.getOtherOptionsPnl();
    p.setVisible(true);
    final GroupLayout layout = new GroupLayout(p);
    p.setLayout(layout);
    layout.setAutoCreateContainerGaps(false);
    layout.setAutoCreateGaps(true);
    layout.setHorizontalGroup(layout.createSequentialGroup().addComponent(angleLbl).addComponent(getAngleCmb(), PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE));
    layout.setVerticalGroup(layout.createParallelGroup(Alignment.CENTER, false).addComponent(angleLbl).addComponent(getAngleCmb(), PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE));
    return p;
}
Also used : JPanel(javax.swing.JPanel) GroupLayout(javax.swing.GroupLayout)

Aggregations

GroupLayout (javax.swing.GroupLayout)194 JPanel (javax.swing.JPanel)132 JLabel (javax.swing.JLabel)79 JButton (javax.swing.JButton)53 ActionEvent (java.awt.event.ActionEvent)42 JScrollPane (javax.swing.JScrollPane)39 ActionListener (java.awt.event.ActionListener)23 JTextField (javax.swing.JTextField)22 Dimension (java.awt.Dimension)21 AbstractAction (javax.swing.AbstractAction)20 JSeparator (javax.swing.JSeparator)15 JCheckBox (javax.swing.JCheckBox)14 ParallelGroup (javax.swing.GroupLayout.ParallelGroup)11 SequentialGroup (javax.swing.GroupLayout.SequentialGroup)11 JComboBox (javax.swing.JComboBox)10 JTable (javax.swing.JTable)10 Color (java.awt.Color)9 Font (java.awt.Font)9 PropertyChangeListener (java.beans.PropertyChangeListener)8 AfterInjection (org.baderlab.csplugins.enrichmentmap.AfterInjection)8