Search in sources :

Example 66 with CardLayout

use of java.awt.CardLayout in project zaproxy by zaproxy.

the class ContextForcedUserPanel method initialize.

/**
	 * Initialize the panel.
	 */
private void initialize() {
    this.setLayout(new CardLayout());
    this.setName(getContextIndex() + ": " + PANEL_NAME);
    this.setLayout(new GridBagLayout());
    this.setBorder(new EmptyBorder(2, 2, 2, 2));
    this.add(new JLabel("<html><p>" + Constant.messages.getString("forceduser.panel.label.description") + "</p></html>"), LayoutHelper.getGBC(0, 0, 1, 1.0D));
    // Forced User combo box
    this.add(getUsersComboBox(), LayoutHelper.getGBC(0, 2, 1, 1.0D, new Insets(5, 0, 0, 0)));
    // Padding
    this.add(new JLabel(), LayoutHelper.getGBC(0, 99, 1, 1.0D, 1.0D));
}
Also used : CardLayout(java.awt.CardLayout) Insets(java.awt.Insets) GridBagLayout(java.awt.GridBagLayout) JLabel(javax.swing.JLabel) EmptyBorder(javax.swing.border.EmptyBorder)

Example 67 with CardLayout

use of java.awt.CardLayout in project intellij-community by JetBrains.

the class VGapProperty method setValueImpl.

protected void setValueImpl(final RadContainer component, final Integer value) throws Exception {
    if (component.getLayout() instanceof BorderLayout) {
        BorderLayout layout = (BorderLayout) component.getLayout();
        layout.setVgap(value.intValue());
    } else if (component.getLayout() instanceof FlowLayout) {
        FlowLayout layout = (FlowLayout) component.getLayout();
        layout.setVgap(value.intValue());
    } else if (component.getLayout() instanceof CardLayout) {
        CardLayout layout = (CardLayout) component.getLayout();
        layout.setVgap(value.intValue());
    } else {
        final AbstractLayout layoutManager = (AbstractLayout) component.getLayout();
        layoutManager.setVGap(value.intValue());
    }
}
Also used : CardLayout(java.awt.CardLayout) FlowLayout(java.awt.FlowLayout) BorderLayout(java.awt.BorderLayout) AbstractLayout(com.intellij.uiDesigner.core.AbstractLayout)

Example 68 with CardLayout

use of java.awt.CardLayout in project intellij-community by JetBrains.

the class RadCardLayoutManager method switchContainerToChild.

@Override
public boolean switchContainerToChild(RadContainer container, RadComponent child) {
    CardLayout cardLayout = (CardLayout) container.getLayout();
    String card = (String) child.getCustomLayoutConstraints();
    cardLayout.show(container.getDelegee(), card);
    return true;
}
Also used : CardLayout(java.awt.CardLayout)

Example 69 with CardLayout

use of java.awt.CardLayout in project intellij-community by JetBrains.

the class RadCardLayoutManager method createSnapshotLayout.

@Override
public void createSnapshotLayout(final SnapshotContext context, final JComponent parent, final RadContainer container, final LayoutManager layout) {
    CardLayout cardLayout = (CardLayout) layout;
    container.setLayout(new CardLayout(cardLayout.getHgap(), cardLayout.getVgap()));
}
Also used : CardLayout(java.awt.CardLayout)

Example 70 with CardLayout

use of java.awt.CardLayout in project zaproxy by zaproxy.

the class BrowserDialog method getJPanel.

/**
     * This method initializes jPanel	
     * 	
     * @return javax.swing.JPanel	
     */
private JPanel getJPanel() {
    if (jPanel == null) {
        jPanel = new JPanel();
        jPanel.setLayout(new CardLayout());
        jPanel.setPreferredSize(new java.awt.Dimension(400, 300));
    // ZAP: Disabled the platform specific browser
    //jPanel.add(getEmbeddedBrowser(), getEmbeddedBrowser().getName());
    }
    return jPanel;
}
Also used : JPanel(javax.swing.JPanel) CardLayout(java.awt.CardLayout)

Aggregations

CardLayout (java.awt.CardLayout)92 JPanel (javax.swing.JPanel)37 BorderLayout (java.awt.BorderLayout)16 JLabel (javax.swing.JLabel)14 JScrollPane (javax.swing.JScrollPane)12 Dimension (java.awt.Dimension)9 GridBagLayout (java.awt.GridBagLayout)8 Insets (java.awt.Insets)8 JButton (javax.swing.JButton)7 ImageIcon (javax.swing.ImageIcon)6 ListSelectionEvent (javax.swing.event.ListSelectionEvent)6 JSplitPane (javax.swing.JSplitPane)5 ListSelectionListener (javax.swing.event.ListSelectionListener)5 FlowLayout (java.awt.FlowLayout)4 Font (java.awt.Font)4 Point (java.awt.Point)4 JList (javax.swing.JList)4 EmptyBorder (javax.swing.border.EmptyBorder)4 AWTException (java.awt.AWTException)3 GridBagConstraints (java.awt.GridBagConstraints)3