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));
}
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());
}
}
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;
}
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()));
}
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;
}
Aggregations