Example usage for java.awt GridBagConstraints BOTH

List of usage examples for java.awt GridBagConstraints BOTH

Introduction

In this page you can find the example usage for java.awt GridBagConstraints BOTH.

Prototype

int BOTH

To view the source code for java.awt GridBagConstraints BOTH.

Click Source Link

Document

Resize the component both horizontally and vertically.

Usage

From source file:com.atlassian.theplugin.idea.config.serverconfig.GenericServerConfigForm.java

/**
 * Method generated by IntelliJ IDEA GUI Designer
 * >>> IMPORTANT!! <<<
 * DO NOT edit this method OR call it in your code!
 *
 * @noinspection ALL/*from w w w.j av  a2s  .c o  m*/
 */
private void $$$setupUI$$$() {
    rootComponent = new JPanel();
    rootComponent.setLayout(new GridBagLayout());
    final JPanel panel1 = new JPanel();
    panel1.setLayout(new GridLayoutManager(7, 3, new Insets(0, 0, 0, 0), -1, -1));
    GridBagConstraints gbc;
    gbc = new GridBagConstraints();
    gbc.gridx = 0;
    gbc.gridy = 0;
    gbc.weightx = 1.0;
    gbc.fill = GridBagConstraints.BOTH;
    rootComponent.add(panel1, gbc);
    serverName = new JTextField();
    serverName.setText("");
    panel1.add(serverName,
            new GridConstraints(1, 1, 1, 2, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                    GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
    final JLabel label1 = new JLabel();
    label1.setHorizontalAlignment(4);
    label1.setHorizontalTextPosition(4);
    label1.setText("Server Name:");
    label1.setDisplayedMnemonic('S');
    label1.setDisplayedMnemonicIndex(0);
    panel1.add(label1,
            new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
                    GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, new Dimension(80, -1),
                    new Dimension(92, 16), null, 0, false));
    serverUrl = new JTextField();
    panel1.add(serverUrl,
            new GridConstraints(2, 1, 1, 2, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                    GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
    username = new JTextField();
    panel1.add(username,
            new GridConstraints(3, 1, 1, 2, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                    GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
    password = new JPasswordField();
    panel1.add(password,
            new GridConstraints(4, 1, 1, 2, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                    GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
    final JLabel label2 = new JLabel();
    label2.setHorizontalAlignment(4);
    label2.setText("Server URL:");
    label2.setDisplayedMnemonic('U');
    label2.setDisplayedMnemonicIndex(7);
    panel1.add(label2,
            new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
                    GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, new Dimension(80, -1),
                    new Dimension(92, 16), null, 0, false));
    final JLabel label3 = new JLabel();
    label3.setHorizontalAlignment(4);
    label3.setText("Username:");
    label3.setDisplayedMnemonic('N');
    label3.setDisplayedMnemonicIndex(4);
    panel1.add(label3,
            new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
                    GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null,
                    new Dimension(92, 16), null, 0, false));
    final JLabel label4 = new JLabel();
    label4.setHorizontalAlignment(4);
    label4.setText("Password:");
    label4.setDisplayedMnemonic('P');
    label4.setDisplayedMnemonicIndex(0);
    panel1.add(label4,
            new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
                    GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null,
                    new Dimension(92, 16), null, 0, false));
    testConnection = new JButton();
    testConnection.setText("Test Connection");
    testConnection.setMnemonic('T');
    testConnection.setDisplayedMnemonicIndex(0);
    panel1.add(testConnection,
            new GridConstraints(5, 2, 1, 1, GridConstraints.ANCHOR_NORTHEAST, GridConstraints.FILL_NONE,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                    GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
    //      chkPasswordRemember = new JCheckBox();
    //      chkPasswordRemember.setSelected(true);
    //      chkPasswordRemember.setText("Remember Password");
    //      chkPasswordRemember.setMnemonic('R');
    //      chkPasswordRemember.setDisplayedMnemonicIndex(0);
    //      panel1.add(chkPasswordRemember, new GridConstraints(5, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
    //            GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED,
    //            null, null, null, 0, false));
    cbEnabled = new JCheckBox();
    cbEnabled.setEnabled(false);
    cbEnabled.setHorizontalTextPosition(11);
    cbEnabled.setText("Server Enabled");
    cbEnabled.setMnemonic('E');
    cbEnabled.setDisplayedMnemonicIndex(7);
    panel1.add(cbEnabled,
            new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                    GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(115, 25), null, 0, false));
    useDefault = new JCheckBox();
    useDefault.setText("Use Default Credentials");
    panel1.add(useDefault,
            new GridConstraints(6, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                    GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
    final JPanel spacer1 = new JPanel();
    gbc = new GridBagConstraints();
    gbc.gridx = 0;
    gbc.gridy = 1;
    gbc.weighty = 1.0;
    gbc.fill = GridBagConstraints.VERTICAL;
    rootComponent.add(spacer1, gbc);
    label1.setLabelFor(serverName);
    label2.setLabelFor(serverUrl);
    label3.setLabelFor(username);
    label4.setLabelFor(password);
}

From source file:com.vgi.mafscaling.VECalc.java

protected void createChart(JPanel plotPanel, String xAxisName, String yAxisName) {
    JFreeChart chart = ChartFactory.createScatterPlot(null, null, null, null, PlotOrientation.VERTICAL, false,
            true, false);/* w w w . j av  a  2s  .  c  om*/
    chart.setBorderVisible(true);

    chartPanel = new ChartPanel(chart, true, true, true, true, true);
    chartPanel.setAutoscrolls(true);
    chartPanel.setMouseZoomable(false);

    GridBagConstraints gbl_chartPanel = new GridBagConstraints();
    gbl_chartPanel.anchor = GridBagConstraints.CENTER;
    gbl_chartPanel.insets = new Insets(3, 3, 3, 3);
    gbl_chartPanel.weightx = 1.0;
    gbl_chartPanel.weighty = 1.0;
    gbl_chartPanel.fill = GridBagConstraints.BOTH;
    gbl_chartPanel.gridx = 0;
    gbl_chartPanel.gridy = 1;
    plotPanel.add(chartPanel, gbl_chartPanel);

    XYLineAndShapeRenderer lineRenderer = new XYLineAndShapeRenderer();
    lineRenderer.setUseFillPaint(true);
    lineRenderer.setBaseToolTipGenerator(
            new StandardXYToolTipGenerator(StandardXYToolTipGenerator.DEFAULT_TOOL_TIP_FORMAT,
                    new DecimalFormat("0.00"), new DecimalFormat("0.00")));

    Stroke stroke = new BasicStroke(2.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND, 1.0f, null, 0.0f);
    lineRenderer.setSeriesStroke(0, stroke);
    lineRenderer.setSeriesPaint(0, Color.RED);
    lineRenderer.setSeriesShape(0, ShapeUtilities.createDiamond((float) 2.5));

    lineRenderer.setLegendItemLabelGenerator(new StandardXYSeriesLabelGenerator() {
        private static final long serialVersionUID = 7593430826693873496L;

        public String generateLabel(XYDataset dataset, int series) {
            XYSeries xys = ((XYSeriesCollection) dataset).getSeries(series);
            return xys.getDescription();
        }
    });

    NumberAxis xAxis = new NumberAxis(xAxisName);
    xAxis.setAutoRangeIncludesZero(false);
    NumberAxis yAxis = new NumberAxis(yAxisName);
    yAxis.setAutoRangeIncludesZero(false);

    XYSeriesCollection lineDataset = new XYSeriesCollection();

    XYPlot plot = chart.getXYPlot();
    plot.setRangePannable(true);
    plot.setDomainPannable(true);
    plot.setDomainGridlinePaint(Color.DARK_GRAY);
    plot.setRangeGridlinePaint(Color.DARK_GRAY);
    plot.setBackgroundPaint(new Color(224, 224, 224));

    plot.setDataset(0, lineDataset);
    plot.setRenderer(0, lineRenderer);
    plot.setDomainAxis(0, xAxis);
    plot.setRangeAxis(0, yAxis);
    plot.mapDatasetToDomainAxis(0, 0);
    plot.mapDatasetToRangeAxis(0, 0);

    LegendTitle legend = new LegendTitle(plot.getRenderer());
    legend.setItemFont(new Font("Arial", 0, 10));
    legend.setPosition(RectangleEdge.TOP);
    chart.addLegend(legend);
}

From source file:ca.uhn.hl7v2.testpanel.ui.conn.Hl7ConnectionPanel.java

/**
 * Create the panel.//from w w  w  . j  av  a 2  s  . c  o m
 */
public Hl7ConnectionPanel(Controller theController) {
    setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
    GridBagLayout gridBagLayout = new GridBagLayout();
    gridBagLayout.columnWidths = new int[] { 150, 0 };
    gridBagLayout.rowHeights = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 };
    gridBagLayout.columnWeights = new double[] { 0.0, 1.0 };
    gridBagLayout.rowWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, Double.MIN_VALUE };
    setLayout(gridBagLayout);

    mySinglePortRadio = new JRadioButton("Single Port MLLP");
    mySinglePortRadio.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            updatePortsModel();
            updatePortsUi();
        }
    });
    myPortButtonGroup.add(mySinglePortRadio);
    GridBagConstraints gbc_SinglePortRadio = new GridBagConstraints();
    gbc_SinglePortRadio.anchor = GridBagConstraints.WEST;
    gbc_SinglePortRadio.insets = new Insets(0, 0, 5, 5);
    gbc_SinglePortRadio.gridx = 0;
    gbc_SinglePortRadio.gridy = 0;
    add(mySinglePortRadio, gbc_SinglePortRadio);

    JPanel panel_4 = new JPanel();
    panel_4.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
    GridBagConstraints gbc_panel_4 = new GridBagConstraints();
    gbc_panel_4.fill = GridBagConstraints.BOTH;
    gbc_panel_4.insets = new Insets(0, 0, 5, 0);
    gbc_panel_4.gridx = 1;
    gbc_panel_4.gridy = 0;
    add(panel_4, gbc_panel_4);
    GridBagLayout gbl_panel_4 = new GridBagLayout();
    gbl_panel_4.columnWidths = new int[] { 0, 0, 0 };
    gbl_panel_4.rowHeights = new int[] { 0, 0 };
    gbl_panel_4.columnWeights = new double[] { 0.0, 1.0, Double.MIN_VALUE };
    gbl_panel_4.rowWeights = new double[] { 0.0, Double.MIN_VALUE };
    panel_4.setLayout(gbl_panel_4);

    mySinglePortTextBox = new JTextField();
    mySinglePortTextBox.getDocument().addDocumentListener(new SimpleDocumentListener() {
        @Override
        public void update(DocumentEvent theE) {
            String text = mySinglePortTextBox.getText();
            text = text.replaceAll("[^0-9]+", "");
            if (!StringUtils.equals(mySinglePortTextBox.getText(), text)) {
                final String newVal = text;
                SwingUtilities.invokeLater(new Runnable() {
                    public void run() {
                        mySinglePortTextBox.setText(newVal);
                    }
                });
            }
            if (mySinglePortRadio.isSelected()) {
                if (text.length() > 0) {
                    myConnection.setIncomingOrSinglePort(Integer.parseInt(text));
                } else {
                    myConnection.setIncomingOrSinglePort(-1);
                }
            }
        }
    });

    mylabel = new JLabel("Port");
    mylabel.setHorizontalAlignment(SwingConstants.CENTER);
    mylabel.setPreferredSize(new Dimension(60, 16));
    mylabel.setMinimumSize(new Dimension(60, 16));
    mylabel.setMaximumSize(new Dimension(60, 16));
    GridBagConstraints gbc_label = new GridBagConstraints();
    gbc_label.anchor = GridBagConstraints.EAST;
    gbc_label.insets = new Insets(0, 0, 0, 5);
    gbc_label.gridx = 0;
    gbc_label.gridy = 0;
    panel_4.add(mylabel, gbc_label);
    GridBagConstraints gbc_SinglePortTextBox = new GridBagConstraints();
    gbc_SinglePortTextBox.insets = new Insets(0, 5, 0, 0);
    gbc_SinglePortTextBox.anchor = GridBagConstraints.WEST;
    gbc_SinglePortTextBox.gridx = 1;
    gbc_SinglePortTextBox.gridy = 0;
    panel_4.add(mySinglePortTextBox, gbc_SinglePortTextBox);
    mySinglePortTextBox.setMinimumSize(new Dimension(100, 28));
    mySinglePortTextBox.setMaximumSize(new Dimension(100, 2147483647));
    mySinglePortTextBox.setColumns(10);

    myDualPortRadio = new JRadioButton("Dual Port MLLP");
    myDualPortRadio.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            updatePortsModel();
            updatePortsUi();
        }
    });
    myPortButtonGroup.add(myDualPortRadio);
    GridBagConstraints gbc_DualPortRadio = new GridBagConstraints();
    gbc_DualPortRadio.anchor = GridBagConstraints.WEST;
    gbc_DualPortRadio.insets = new Insets(0, 0, 5, 5);
    gbc_DualPortRadio.gridx = 0;
    gbc_DualPortRadio.gridy = 1;
    add(myDualPortRadio, gbc_DualPortRadio);

    JPanel panel = new JPanel();
    panel.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
    GridBagConstraints gbc_BottomPanel = new GridBagConstraints();
    gbc_BottomPanel.insets = new Insets(0, 0, 5, 0);
    gbc_BottomPanel.fill = GridBagConstraints.BOTH;
    gbc_BottomPanel.gridx = 1;
    gbc_BottomPanel.gridy = 1;
    add(panel, gbc_BottomPanel);
    GridBagLayout gbl_panel = new GridBagLayout();
    gbl_panel.columnWidths = new int[] { 0, 0, 0, 0, 0, 0 };
    gbl_panel.rowHeights = new int[] { 0, 0 };
    gbl_panel.columnWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE };
    gbl_panel.rowWeights = new double[] { 0.0, Double.MIN_VALUE };
    panel.setLayout(gbl_panel);

    JLabel lblInbound = new JLabel("Inbound");
    lblInbound.setHorizontalAlignment(SwingConstants.CENTER);
    lblInbound.setPreferredSize(new Dimension(60, 16));
    lblInbound.setMinimumSize(new Dimension(60, 16));
    lblInbound.setMaximumSize(new Dimension(60, 16));
    GridBagConstraints gbc_lblInbound = new GridBagConstraints();
    gbc_lblInbound.insets = new Insets(0, 5, 0, 5);
    gbc_lblInbound.anchor = GridBagConstraints.EAST;
    gbc_lblInbound.gridx = 0;
    gbc_lblInbound.gridy = 0;
    panel.add(lblInbound, gbc_lblInbound);

    myDualIncomingTextBox = new JTextField();
    myDualIncomingTextBox.getDocument().addDocumentListener(new SimpleDocumentListener() {
        @Override
        public void update(DocumentEvent theE) {
            String text = myDualIncomingTextBox.getText();
            text = text.replaceAll("[^0-9]+", "");
            if (!StringUtils.equals(myDualIncomingTextBox.getText(), text)) {
                final String newVal = text;
                SwingUtilities.invokeLater(new Runnable() {
                    public void run() {
                        myDualIncomingTextBox.setText(newVal);
                    }
                });
            }
            if (myDualPortRadio.isSelected()) {
                if (text.length() > 0) {
                    myConnection.setIncomingOrSinglePort(Integer.parseInt(text));
                } else {
                    myConnection.setIncomingOrSinglePort(-1);
                }
            }
        }
    });
    myDualIncomingTextBox.setMaximumSize(new Dimension(100, 2147483647));
    myDualIncomingTextBox.setMinimumSize(new Dimension(100, 28));
    GridBagConstraints gbc_DualIncomingTextBox = new GridBagConstraints();
    gbc_DualIncomingTextBox.anchor = GridBagConstraints.WEST;
    gbc_DualIncomingTextBox.insets = new Insets(0, 0, 0, 5);
    gbc_DualIncomingTextBox.gridx = 1;
    gbc_DualIncomingTextBox.gridy = 0;
    panel.add(myDualIncomingTextBox, gbc_DualIncomingTextBox);
    myDualIncomingTextBox.setColumns(10);

    JLabel lblOutbound = new JLabel("Outbound");
    GridBagConstraints gbc_lblOutbound = new GridBagConstraints();
    gbc_lblOutbound.anchor = GridBagConstraints.EAST;
    gbc_lblOutbound.insets = new Insets(0, 0, 0, 5);
    gbc_lblOutbound.gridx = 2;
    gbc_lblOutbound.gridy = 0;
    panel.add(lblOutbound, gbc_lblOutbound);

    myDualOutgoingTextBox = new JTextField();
    myDualOutgoingTextBox.getDocument().addDocumentListener(new SimpleDocumentListener() {
        @Override
        public void update(DocumentEvent theE) {
            String text = myDualOutgoingTextBox.getText();
            text = text.replaceAll("[^0-9]+", "");
            if (!StringUtils.equals(myDualOutgoingTextBox.getText(), text)) {
                final String newVal = text;
                SwingUtilities.invokeLater(new Runnable() {
                    public void run() {
                        myDualOutgoingTextBox.setText(newVal);
                    }
                });
            }
            if (myDualPortRadio.isSelected()) {
                if (text.length() > 0) {
                    myConnection.setOutgoingPort(Integer.parseInt(text));
                } else {
                    myConnection.setOutgoingPort(-1);
                }
            }
        }
    });
    myDualOutgoingTextBox.setMinimumSize(new Dimension(100, 28));
    myDualOutgoingTextBox.setMaximumSize(new Dimension(100, 2147483647));
    GridBagConstraints gbc_DualOutgoingTextBox = new GridBagConstraints();
    gbc_DualOutgoingTextBox.insets = new Insets(0, 0, 0, 5);
    gbc_DualOutgoingTextBox.anchor = GridBagConstraints.WEST;
    gbc_DualOutgoingTextBox.gridx = 3;
    gbc_DualOutgoingTextBox.gridy = 0;
    panel.add(myDualOutgoingTextBox, gbc_DualOutgoingTextBox);
    myDualOutgoingTextBox.setColumns(10);

    myHl7OverHttpRadioButton = new JRadioButton("HL7 over HTTP");
    myHl7OverHttpRadioButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            updatePortsModel();
            updatePortsUi();
        }
    });
    myPortButtonGroup.add(myHl7OverHttpRadioButton);
    GridBagConstraints gbc_Hl7OverHttpRadioButton = new GridBagConstraints();
    gbc_Hl7OverHttpRadioButton.anchor = GridBagConstraints.WEST;
    gbc_Hl7OverHttpRadioButton.insets = new Insets(0, 0, 5, 5);
    gbc_Hl7OverHttpRadioButton.gridx = 0;
    gbc_Hl7OverHttpRadioButton.gridy = 2;
    add(myHl7OverHttpRadioButton, gbc_Hl7OverHttpRadioButton);

    mypanel = new JPanel();
    mypanel.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
    GridBagConstraints gbc_panel = new GridBagConstraints();
    gbc_panel.insets = new Insets(0, 0, 5, 0);
    gbc_panel.fill = GridBagConstraints.BOTH;
    gbc_panel.gridx = 1;
    gbc_panel.gridy = 2;
    add(mypanel, gbc_panel);
    GridBagLayout gbl_panel2 = new GridBagLayout();
    gbl_panel2.columnWidths = new int[] { 0, 0 };
    gbl_panel2.rowHeights = new int[] { 0, 0 };
    gbl_panel2.columnWeights = new double[] { 0.0, 1.0 };
    gbl_panel2.rowWeights = new double[] { 0.0, Double.MIN_VALUE };
    mypanel.setLayout(gbl_panel2);

    mylabel_1 = new JLabel("URL");
    mylabel_1.setHorizontalAlignment(SwingConstants.CENTER);
    mylabel_1.setPreferredSize(new Dimension(60, 16));
    mylabel_1.setMinimumSize(new Dimension(60, 16));
    mylabel_1.setMaximumSize(new Dimension(60, 16));
    GridBagConstraints gbc_label_1 = new GridBagConstraints();
    gbc_label_1.anchor = GridBagConstraints.EAST;
    gbc_label_1.insets = new Insets(0, 0, 0, 5);
    gbc_label_1.gridx = 0;
    gbc_label_1.gridy = 0;
    mypanel.add(mylabel_1, gbc_label_1);

    myHoHUrlTextField = new JTextField();
    myHoHUrlTextField.getDocument().addDocumentListener(new SimpleDocumentListener() {
        @Override
        public void update(DocumentEvent theE) {
            if (myHohUrlTextFieldUpdating) {
                return;
            }

            String value = myHoHUrlTextField.getText();
            try {
                URL url = new URL(value);
                boolean tls;
                if (url.getProtocol().equals("http")) {
                    tls = false;
                } else if (url.getProtocol().equals("https")) {
                    tls = true;
                } else {
                    ourLog.info("Unknown protocol: {}", url.getProtocol());
                    myHoHUrlTextField.setBackground(ERROR_BG);
                    return;
                }

                myConnection.setTls(tls);
                myConnection.setHost(url.getHost());
                myConnection
                        .setIncomingOrSinglePort(url.getPort() != -1 ? url.getPort() : url.getDefaultPort());
                myConnection.setHttpUriPath(url.getPath());

                myHohUrlTextFieldUpdating = true;
                updatePortsUi();
                myHohUrlTextFieldUpdating = false;

                myTlsCheckbox.setSelected(tls);
                myHohTlsCheckbox.setSelected(tls);

                myHoHUrlTextField.setBackground(Color.white);
            } catch (MalformedURLException e) {
                myHoHUrlTextField.setBackground(ERROR_BG);
            }

        }
    });
    GridBagConstraints gbc_HohUsernameTextbox = new GridBagConstraints();
    gbc_HohUsernameTextbox.fill = GridBagConstraints.HORIZONTAL;
    gbc_HohUsernameTextbox.gridx = 1;
    gbc_HohUsernameTextbox.gridy = 0;
    mypanel.add(myHoHUrlTextField, gbc_HohUsernameTextbox);
    myHoHUrlTextField.setColumns(10);

    JLabel lblEncoding = new JLabel("Encoding");
    GridBagConstraints gbc_lblEncoding = new GridBagConstraints();
    gbc_lblEncoding.insets = new Insets(0, 0, 5, 5);
    gbc_lblEncoding.gridx = 0;
    gbc_lblEncoding.gridy = 3;
    add(lblEncoding, gbc_lblEncoding);

    JPanel encodingPanel = new JPanel();
    GridBagConstraints gbc_encodingPanel = new GridBagConstraints();
    gbc_encodingPanel.fill = GridBagConstraints.HORIZONTAL;
    gbc_encodingPanel.insets = new Insets(0, 0, 5, 0);
    gbc_encodingPanel.gridx = 1;
    gbc_encodingPanel.gridy = 3;
    add(encodingPanel, gbc_encodingPanel);
    encodingPanel.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
    GridBagLayout gbl_encodingPanel = new GridBagLayout();
    gbl_encodingPanel.columnWidths = new int[] { 144, 58, 0 };
    gbl_encodingPanel.rowHeights = new int[] { 23, 0 };
    gbl_encodingPanel.columnWeights = new double[] { 0.0, 0.0, Double.MIN_VALUE };
    gbl_encodingPanel.rowWeights = new double[] { 0.0, Double.MIN_VALUE };
    encodingPanel.setLayout(gbl_encodingPanel);

    myXmlRadio = new JRadioButton("XML");
    myXmlRadio.addActionListener(new ActionListener() {

        public void actionPerformed(ActionEvent theE) {
            updateEncodingModel();
        }
    });

    myEr7Radio = new JRadioButton("ER7 (Pipe and hat)");
    myEr7Radio.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            updateEncodingModel();
        }
    });
    encodingButtonGroup.add(myEr7Radio);
    GridBagConstraints gbc_Er7Radio = new GridBagConstraints();
    gbc_Er7Radio.anchor = GridBagConstraints.NORTHWEST;
    gbc_Er7Radio.insets = new Insets(0, 0, 0, 5);
    gbc_Er7Radio.gridx = 0;
    gbc_Er7Radio.gridy = 0;
    encodingPanel.add(myEr7Radio, gbc_Er7Radio);
    encodingButtonGroup.add(myXmlRadio);
    GridBagConstraints gbc_XmlRadio = new GridBagConstraints();
    gbc_XmlRadio.anchor = GridBagConstraints.NORTHWEST;
    gbc_XmlRadio.gridx = 1;
    gbc_XmlRadio.gridy = 0;
    encodingPanel.add(myXmlRadio, gbc_XmlRadio);

    JLabel lblCharset = new JLabel("Charset");
    GridBagConstraints gbc_lblCharset = new GridBagConstraints();
    gbc_lblCharset.insets = new Insets(0, 0, 5, 5);
    gbc_lblCharset.gridx = 0;
    gbc_lblCharset.gridy = 4;
    add(lblCharset, gbc_lblCharset);

    JPanel panel_2 = new JPanel();
    GridBagConstraints gbc_panel_2 = new GridBagConstraints();
    gbc_panel_2.fill = GridBagConstraints.HORIZONTAL;
    gbc_panel_2.insets = new Insets(0, 0, 5, 0);
    gbc_panel_2.gridx = 1;
    gbc_panel_2.gridy = 4;
    add(panel_2, gbc_panel_2);
    panel_2.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
    GridBagLayout gbl_panel_2 = new GridBagLayout();
    gbl_panel_2.columnWidths = new int[] { 28, 198, 0, 0 };
    gbl_panel_2.rowHeights = new int[] { 27, 0 };
    gbl_panel_2.columnWeights = new double[] { 0.0, 0.0, 0.0, Double.MIN_VALUE };
    gbl_panel_2.rowWeights = new double[] { 0.0, Double.MIN_VALUE };
    panel_2.setLayout(gbl_panel_2);

    myCharsetSelectRadio = new JRadioButton("");
    myCharsetSelectRadio.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            updateCharsetModel();
        }
    });
    charsetButtonGroup.add(myCharsetSelectRadio);
    GridBagConstraints gbc_CharsetSelectRadio = new GridBagConstraints();
    gbc_CharsetSelectRadio.anchor = GridBagConstraints.WEST;
    gbc_CharsetSelectRadio.insets = new Insets(0, 0, 0, 5);
    gbc_CharsetSelectRadio.gridx = 0;
    gbc_CharsetSelectRadio.gridy = 0;
    panel_2.add(myCharsetSelectRadio, gbc_CharsetSelectRadio);

    myCharsetCombo = new JComboBox();
    myCharsetCombo.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            updateCharsetModel();
        }
    });
    GridBagConstraints gbc_CharsetCombo = new GridBagConstraints();
    gbc_CharsetCombo.anchor = GridBagConstraints.NORTHWEST;
    gbc_CharsetCombo.insets = new Insets(0, 0, 0, 5);
    gbc_CharsetCombo.gridx = 1;
    gbc_CharsetCombo.gridy = 0;
    panel_2.add(myCharsetCombo, gbc_CharsetCombo);

    myCharsetDetectRadio = new JRadioButton("Detect in Message (MSH-18)");
    myCharsetDetectRadio.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            updateCharsetModel();
        }
    });
    charsetButtonGroup.add(myCharsetDetectRadio);
    GridBagConstraints gbc_CharsetDetectRadio = new GridBagConstraints();
    gbc_CharsetDetectRadio.anchor = GridBagConstraints.NORTH;
    gbc_CharsetDetectRadio.gridwidth = 2;
    gbc_CharsetDetectRadio.gridx = 2;
    gbc_CharsetDetectRadio.gridy = 0;
    panel_2.add(myCharsetDetectRadio, gbc_CharsetDetectRadio);

    mylabel_5 = new JLabel("Debug");
    GridBagConstraints gbc_label_5 = new GridBagConstraints();
    gbc_label_5.insets = new Insets(0, 0, 5, 5);
    gbc_label_5.gridx = 0;
    gbc_label_5.gridy = 5;
    add(mylabel_5, gbc_label_5);

    mypanel_2 = new JPanel();
    mypanel_2.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
    GridBagConstraints gbc_panel_75 = new GridBagConstraints();
    gbc_panel_75.insets = new Insets(0, 0, 5, 0);
    gbc_panel_75.fill = GridBagConstraints.BOTH;
    gbc_panel_75.gridx = 1;
    gbc_panel_75.gridy = 5;
    add(mypanel_2, gbc_panel_75);
    GridBagLayout gbl_panel_74 = new GridBagLayout();
    gbl_panel_74.columnWidths = new int[] { 0, 0 };
    gbl_panel_74.rowHeights = new int[] { 0, 0 };
    gbl_panel_74.columnWeights = new double[] { 0.0, Double.MIN_VALUE };
    gbl_panel_74.rowWeights = new double[] { 0.0, Double.MIN_VALUE };
    mypanel_2.setLayout(gbl_panel_74);

    myCaptureByteStreamCheckbox = new JCheckBox("Capture Bytes");
    GridBagConstraints gbc_CaptureByteStreamCheckbox = new GridBagConstraints();
    gbc_CaptureByteStreamCheckbox.gridx = 0;
    gbc_CaptureByteStreamCheckbox.gridy = 0;
    mypanel_2.add(myCaptureByteStreamCheckbox, gbc_CaptureByteStreamCheckbox);
    myCaptureByteStreamCheckbox.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            myConnection.setCaptureBytes(myCaptureByteStreamCheckbox.isSelected());
        }
    });
    myCaptureByteStreamCheckbox.setToolTipText("Check this box to capture the transport level communication");

    myInterfaceTypeCardPanel = new JPanel();
    myInterfaceTypeCardPanel.setBorder(null);
    GridBagConstraints gbc_InterfaceTypeCardPanel = new GridBagConstraints();
    gbc_InterfaceTypeCardPanel.gridwidth = 2;
    gbc_InterfaceTypeCardPanel.fill = GridBagConstraints.BOTH;
    gbc_InterfaceTypeCardPanel.gridx = 0;
    gbc_InterfaceTypeCardPanel.gridy = 6;
    add(myInterfaceTypeCardPanel, gbc_InterfaceTypeCardPanel);
    myInterfaceTypeCardPanel.setLayout(new CardLayout(0, 0));

    myMllpCard = new JPanel();
    myMllpCard.setBorder(null);
    myInterfaceTypeCardPanel.add(myMllpCard, IFACE_TYPE_CARD_MLLP);
    GridBagLayout gbl_MllpCard = new GridBagLayout();
    gbl_MllpCard.columnWidths = new int[] { 150, 0, 0 };
    gbl_MllpCard.rowHeights = new int[] { 0, 0, 0, 0 };
    gbl_MllpCard.columnWeights = new double[] { 0.0, 1.0, Double.MIN_VALUE };
    gbl_MllpCard.rowWeights = new double[] { 0.0, 0.0, 0.0, Double.MIN_VALUE };
    myMllpCard.setLayout(gbl_MllpCard);

    JLabel lblHost = new JLabel("Host");
    GridBagConstraints gbc_lblHost = new GridBagConstraints();
    gbc_lblHost.insets = new Insets(0, 0, 5, 5);
    gbc_lblHost.gridx = 0;
    gbc_lblHost.gridy = 0;
    myMllpCard.add(lblHost, gbc_lblHost);

    mypanel_1 = new JPanel();
    mypanel_1.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
    GridBagConstraints gbc_panel_1 = new GridBagConstraints();
    gbc_panel_1.insets = new Insets(0, 0, 5, 0);
    gbc_panel_1.fill = GridBagConstraints.BOTH;
    gbc_panel_1.gridx = 1;
    gbc_panel_1.gridy = 0;
    myMllpCard.add(mypanel_1, gbc_panel_1);
    GridBagLayout gbl_panel_1 = new GridBagLayout();
    gbl_panel_1.columnWidths = new int[] { 134, 0 };
    gbl_panel_1.rowHeights = new int[] { 28, 0 };
    gbl_panel_1.columnWeights = new double[] { 1.0, Double.MIN_VALUE };
    gbl_panel_1.rowWeights = new double[] { 0.0, Double.MIN_VALUE };
    mypanel_1.setLayout(gbl_panel_1);

    myHostBox = new JTextField();
    GridBagConstraints gbc_HostBox = new GridBagConstraints();
    gbc_HostBox.fill = GridBagConstraints.HORIZONTAL;
    gbc_HostBox.anchor = GridBagConstraints.NORTH;
    gbc_HostBox.gridx = 0;
    gbc_HostBox.gridy = 0;
    mypanel_1.add(myHostBox, gbc_HostBox);
    myHostBox.getDocument().addDocumentListener(new SimpleDocumentListener() {
        @Override
        public void update(DocumentEvent theE) {
            myConnection.setHost(myHostBox.getText());
        }
    });
    myHostBox.setColumns(10);

    JLabel lblTransport = new JLabel("Transport");
    GridBagConstraints gbc_lblTransport = new GridBagConstraints();
    gbc_lblTransport.insets = new Insets(0, 0, 5, 5);
    gbc_lblTransport.gridx = 0;
    gbc_lblTransport.gridy = 1;
    myMllpCard.add(lblTransport, gbc_lblTransport);

    JPanel panel_3 = new JPanel();
    GridBagConstraints gbc_hohAuthPanel = new GridBagConstraints();
    gbc_hohAuthPanel.fill = GridBagConstraints.HORIZONTAL;
    gbc_hohAuthPanel.insets = new Insets(0, 0, 5, 0);
    gbc_hohAuthPanel.gridx = 1;
    gbc_hohAuthPanel.gridy = 1;
    myMllpCard.add(panel_3, gbc_hohAuthPanel);
    panel_3.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
    GridBagLayout gbl_hohAuthPanel = new GridBagLayout();
    gbl_hohAuthPanel.columnWidths = new int[] { 0, 0, 0 };
    gbl_hohAuthPanel.rowHeights = new int[] { 0, 0 };
    gbl_hohAuthPanel.columnWeights = new double[] { 0.0, 0.0, Double.MIN_VALUE };
    gbl_hohAuthPanel.rowWeights = new double[] { 0.0, Double.MIN_VALUE };
    panel_3.setLayout(gbl_hohAuthPanel);

    myTlsCheckbox = new JCheckBox("Use TLS/SSL");
    myTlsCheckbox.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            myHohTlsCheckbox.setSelected(myTlsCheckbox.isSelected());
            myConnection.setTls(myTlsCheckbox.isSelected());
        }
    });
    GridBagConstraints gbc_TlsCheckbox = new GridBagConstraints();
    gbc_TlsCheckbox.insets = new Insets(0, 0, 0, 5);
    gbc_TlsCheckbox.anchor = GridBagConstraints.WEST;
    gbc_TlsCheckbox.gridx = 0;
    gbc_TlsCheckbox.gridy = 0;
    panel_3.add(myTlsCheckbox, gbc_TlsCheckbox);

    myHoHCard = new JPanel();
    myInterfaceTypeCardPanel.add(myHoHCard, IFACE_TYPE_CARD_HOH);
    GridBagLayout gbl_HoHCard = new GridBagLayout();
    gbl_HoHCard.columnWidths = new int[] { 150, 0, 0 };
    gbl_HoHCard.rowHeights = new int[] { 0, 0, 0, 0 };
    gbl_HoHCard.columnWeights = new double[] { 0.0, 1.0, Double.MIN_VALUE };
    gbl_HoHCard.rowWeights = new double[] { 0.0, 0.0, 0.0, Double.MIN_VALUE };
    myHoHCard.setLayout(gbl_HoHCard);

    mylabel_6 = new JLabel("Authorization");
    GridBagConstraints gbc_label_6 = new GridBagConstraints();
    gbc_label_6.insets = new Insets(0, 0, 5, 5);
    gbc_label_6.gridx = 0;
    gbc_label_6.gridy = 0;
    myHoHCard.add(mylabel_6, gbc_label_6);

    hohAuthPanel = new JPanel();
    hohAuthPanel.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
    GridBagConstraints gbc_hohAuthPanel2 = new GridBagConstraints();
    gbc_hohAuthPanel2.insets = new Insets(0, 0, 5, 0);
    gbc_hohAuthPanel2.fill = GridBagConstraints.BOTH;
    gbc_hohAuthPanel2.gridx = 1;
    gbc_hohAuthPanel2.gridy = 0;
    myHoHCard.add(hohAuthPanel, gbc_hohAuthPanel2);
    GridBagLayout gbl_hohAuthPanel3 = new GridBagLayout();
    gbl_hohAuthPanel3.columnWidths = new int[] { 0, 0, 0, 0, 0, 0, 0 };
    gbl_hohAuthPanel3.rowHeights = new int[] { 0, 0 };
    gbl_hohAuthPanel3.columnWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, Double.MIN_VALUE };
    gbl_hohAuthPanel3.rowWeights = new double[] { 0.0, Double.MIN_VALUE };
    hohAuthPanel.setLayout(gbl_hohAuthPanel3);

    myHohAuthEnabledCheckbox = new JCheckBox("Enabled");
    myHohAuthEnabledCheckbox.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent theE) {
            myConnection.setHohAuthenticationEnabled(myHohAuthEnabledCheckbox.isSelected());
        }
    });
    GridBagConstraints gbc_HohAuthEnabledCheckbox = new GridBagConstraints();
    gbc_HohAuthEnabledCheckbox.insets = new Insets(0, 0, 0, 5);
    gbc_HohAuthEnabledCheckbox.gridx = 0;
    gbc_HohAuthEnabledCheckbox.gridy = 0;
    hohAuthPanel.add(myHohAuthEnabledCheckbox, gbc_HohAuthEnabledCheckbox);

    mylabel_7 = new JLabel("Username:");
    GridBagConstraints gbc_label_7 = new GridBagConstraints();
    gbc_label_7.insets = new Insets(0, 0, 0, 5);
    gbc_label_7.anchor = GridBagConstraints.EAST;
    gbc_label_7.gridx = 1;
    gbc_label_7.gridy = 0;
    hohAuthPanel.add(mylabel_7, gbc_label_7);

    myHohAuthUsernameTextbox = new JTextField();
    myHohAuthUsernameTextbox.getDocument().addDocumentListener(new SimpleDocumentListener() {
        @Override
        public void update(DocumentEvent theE) {
            myConnection.setHohAuthenticationUsername(myHohAuthUsernameTextbox.getText());
        }
    });
    myHohAuthUsernameTextbox.setMaximumSize(new Dimension(200, 2147483647));
    myHohAuthUsernameTextbox.setMinimumSize(new Dimension(100, 28));
    myHohAuthUsernameTextbox.setPreferredSize(new Dimension(100, 28));
    GridBagConstraints gbc_HohUsernameTextbox2 = new GridBagConstraints();
    gbc_HohUsernameTextbox2.insets = new Insets(0, 0, 0, 5);
    gbc_HohUsernameTextbox2.fill = GridBagConstraints.HORIZONTAL;
    gbc_HohUsernameTextbox2.gridx = 2;
    gbc_HohUsernameTextbox2.gridy = 0;
    hohAuthPanel.add(myHohAuthUsernameTextbox, gbc_HohUsernameTextbox2);
    myHohAuthUsernameTextbox.setColumns(10);

    mylabel_8 = new JLabel("Password:");
    GridBagConstraints gbc_label_8 = new GridBagConstraints();
    gbc_label_8.insets = new Insets(0, 0, 0, 5);
    gbc_label_8.anchor = GridBagConstraints.EAST;
    gbc_label_8.gridx = 3;
    gbc_label_8.gridy = 0;
    hohAuthPanel.add(mylabel_8, gbc_label_8);

    myHohAuthPasswordTextbox = new JTextField();
    myHohAuthPasswordTextbox.getDocument().addDocumentListener(new SimpleDocumentListener() {
        @Override
        public void update(DocumentEvent theE) {
            myConnection.setHohAuthenticationPassword(myHohAuthPasswordTextbox.getText());
        }
    });
    myHohAuthPasswordTextbox.setPreferredSize(new Dimension(100, 28));
    myHohAuthPasswordTextbox.setMaximumSize(new Dimension(200, 2147483647));
    myHohAuthPasswordTextbox.setMinimumSize(new Dimension(100, 28));
    GridBagConstraints gbc_HohSignatureKeystoreTextbox = new GridBagConstraints();
    gbc_HohSignatureKeystoreTextbox.insets = new Insets(0, 0, 0, 5);
    gbc_HohSignatureKeystoreTextbox.fill = GridBagConstraints.HORIZONTAL;
    gbc_HohSignatureKeystoreTextbox.gridx = 4;
    gbc_HohSignatureKeystoreTextbox.gridy = 0;
    hohAuthPanel.add(myHohAuthPasswordTextbox, gbc_HohSignatureKeystoreTextbox);
    myHohAuthPasswordTextbox.setColumns(10);

    mylabel_2 = new JLabel("Security Profile");
    mylabel_2.setVerticalTextPosition(SwingConstants.TOP);
    mylabel_2.setVerticalAlignment(SwingConstants.TOP);
    GridBagConstraints gbc_label_2 = new GridBagConstraints();
    gbc_label_2.insets = new Insets(0, 0, 5, 5);
    gbc_label_2.gridx = 0;
    gbc_label_2.gridy = 1;
    myHoHCard.add(mylabel_2, gbc_label_2);

    // securityProfilePanel = new JPanel();
    GridBagConstraints gbc_securityProfilePanel = new GridBagConstraints();
    gbc_securityProfilePanel.insets = new Insets(0, 0, 5, 0);
    gbc_securityProfilePanel.fill = GridBagConstraints.BOTH;
    gbc_securityProfilePanel.gridx = 1;
    gbc_securityProfilePanel.gridy = 1;
    // myHoHCard.add(securityProfilePanel, gbc_securityProfilePanel);
    // securityProfilePanel.setLayout(new BorderLayout(0, 0));

    tlsKeystorePanel = new JPanel();
    tlsKeystorePanel.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
    // securityProfilePanel.add(tlsKeystorePanel, BorderLayout.CENTER);
    myHoHCard.add(tlsKeystorePanel, gbc_securityProfilePanel);
    GridBagLayout gbl_tlsKeystorePanel = new GridBagLayout();
    gbl_tlsKeystorePanel.columnWidths = new int[] { 0, 58, 107, 77, 0, 0 };
    gbl_tlsKeystorePanel.rowHeights = new int[] { 28, 16, 0, 0 };
    gbl_tlsKeystorePanel.columnWeights = new double[] { 0.0, 0.0, 1.0, 1.0, 0.0, Double.MIN_VALUE };
    gbl_tlsKeystorePanel.rowWeights = new double[] { 0.0, 0.0, 0.0, Double.MIN_VALUE };
    tlsKeystorePanel.setLayout(gbl_tlsKeystorePanel);

    myHohTlsCheckbox = new JCheckBox("TLS Enabled");
    GridBagConstraints gbc_HohTlsCheckbox = new GridBagConstraints();
    gbc_HohTlsCheckbox.gridheight = 2;
    gbc_HohTlsCheckbox.insets = new Insets(0, 0, 5, 5);
    gbc_HohTlsCheckbox.gridx = 0;
    gbc_HohTlsCheckbox.gridy = 0;
    tlsKeystorePanel.add(myHohTlsCheckbox, gbc_HohTlsCheckbox);
    myHohTlsCheckbox.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            myConnection.setTls(myHohTlsCheckbox.isSelected());
            myTlsCheckbox.setSelected(myHohTlsCheckbox.isSelected());
            updatePortsUi();
        }
    });

    mylabel_3 = new JLabel("Keystore:");
    GridBagConstraints gbc_label_3 = new GridBagConstraints();
    gbc_label_3.anchor = GridBagConstraints.WEST;
    gbc_label_3.fill = GridBagConstraints.VERTICAL;
    gbc_label_3.insets = new Insets(0, 0, 5, 5);
    gbc_label_3.gridx = 1;
    gbc_label_3.gridy = 0;
    tlsKeystorePanel.add(mylabel_3, gbc_label_3);

    myHohSecurityKeystoreTextbox = new JTextField();
    GridBagConstraints gbc_HohKeystoreTextbox = new GridBagConstraints();
    gbc_HohKeystoreTextbox.gridwidth = 2;
    gbc_HohKeystoreTextbox.anchor = GridBagConstraints.NORTH;
    gbc_HohKeystoreTextbox.fill = GridBagConstraints.HORIZONTAL;
    gbc_HohKeystoreTextbox.insets = new Insets(0, 0, 5, 5);
    gbc_HohKeystoreTextbox.gridx = 2;
    gbc_HohKeystoreTextbox.gridy = 0;
    tlsKeystorePanel.add(myHohSecurityKeystoreTextbox, gbc_HohKeystoreTextbox);
    myHohSecurityKeystoreTextbox.setColumns(10);
    myHohSecurityKeystoreTextbox.getDocument().addDocumentListener(new SimpleDocumentListener() {
        @Override
        public void update(DocumentEvent theE) {
            String text = myHohSecurityKeystoreTextbox.getText();
            myHohSecurityKeyPwTextBox.setEnabled(isNotBlank(text));
            myConnection.setTlsKeystoreLocation(text);
        }
    });

    myHohSecurityKeystoreChooseBtn = new JButton("Choose");
    myHohSecurityKeystoreChooseBtn.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            Hl7ConnectionPanel.chooseKeystore(Hl7ConnectionPanel.this, myHohSecurityKeystoreTextbox);
        }
    });
    myHohSecurityKeystoreChooseBtn.setIcon(
            new ImageIcon(Hl7ConnectionPanel.class.getResource("/ca/uhn/hl7v2/testpanel/images/open.png")));
    GridBagConstraints gbc_HohSignatureKeystoreChooseButton = new GridBagConstraints();
    gbc_HohSignatureKeystoreChooseButton.insets = new Insets(0, 0, 5, 0);
    gbc_HohSignatureKeystoreChooseButton.gridx = 4;
    gbc_HohSignatureKeystoreChooseButton.gridy = 0;
    tlsKeystorePanel.add(myHohSecurityKeystoreChooseBtn, gbc_HohSignatureKeystoreChooseButton);

    mylabel_4 = new JLabel("Store Pass:");
    GridBagConstraints gbc_label_4 = new GridBagConstraints();
    gbc_label_4.insets = new Insets(0, 0, 0, 5);
    gbc_label_4.anchor = GridBagConstraints.EAST;
    gbc_label_4.gridx = 1;
    gbc_label_4.gridy = 1;
    tlsKeystorePanel.add(mylabel_4, gbc_label_4);

    myHohSecurityKeyPwTextBox = new JTextField();
    myHohSecurityKeyPwTextBox.getDocument().addDocumentListener(new SimpleDocumentListener() {
        @Override
        public void update(DocumentEvent theE) {
            myConnection.setTlsKeystorePassword(myHohSecurityKeyPwTextBox.getText());
        }
    });
    GridBagConstraints gbc_HohSecurityKeyPwTextBox = new GridBagConstraints();
    gbc_HohSecurityKeyPwTextBox.insets = new Insets(0, 0, 0, 5);
    gbc_HohSecurityKeyPwTextBox.fill = GridBagConstraints.HORIZONTAL;
    gbc_HohSecurityKeyPwTextBox.gridx = 2;
    gbc_HohSecurityKeyPwTextBox.gridy = 1;
    tlsKeystorePanel.add(myHohSecurityKeyPwTextBox, gbc_HohSecurityKeyPwTextBox);
    myHohSecurityKeyPwTextBox.setColumns(10);

    myHohSecurityProfileKeystoreStatus = new JLabel("Value goes here");
    myHohSecurityProfileKeystoreStatus.setHorizontalAlignment(SwingConstants.CENTER);
    GridBagConstraints gbc_HohSecurityProfileKeystoreStatus = new GridBagConstraints();
    gbc_HohSecurityProfileKeystoreStatus.anchor = GridBagConstraints.NORTH;
    gbc_HohSecurityProfileKeystoreStatus.fill = GridBagConstraints.HORIZONTAL;
    gbc_HohSecurityProfileKeystoreStatus.gridwidth = 5;
    gbc_HohSecurityProfileKeystoreStatus.gridx = 0;
    gbc_HohSecurityProfileKeystoreStatus.gridy = 2;
    tlsKeystorePanel.add(myHohSecurityProfileKeystoreStatus, gbc_HohSecurityProfileKeystoreStatus);

    mylabel_9 = new JLabel("Signature Profile");
    GridBagConstraints gbc_label_9 = new GridBagConstraints();
    gbc_label_9.insets = new Insets(0, 0, 0, 5);
    gbc_label_9.gridx = 0;
    gbc_label_9.gridy = 2;
    myHoHCard.add(mylabel_9, gbc_label_9);

    mypanel_3 = new JPanel();
    mypanel_3.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
    GridBagConstraints gbc_panel_3 = new GridBagConstraints();
    gbc_panel_3.fill = GridBagConstraints.BOTH;
    gbc_panel_3.gridx = 1;
    gbc_panel_3.gridy = 2;
    myHoHCard.add(mypanel_3, gbc_panel_3);
    GridBagLayout gbl_panel_3 = new GridBagLayout();
    gbl_panel_3.columnWidths = new int[] { 0, 0, 0, 0, 0, 0, 50, 0, 0 };
    gbl_panel_3.rowHeights = new int[] { 0, 0, 0, 0 };
    gbl_panel_3.columnWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, Double.MIN_VALUE };
    gbl_panel_3.rowWeights = new double[] { 0.0, 0.0, 0.0, Double.MIN_VALUE };
    mypanel_3.setLayout(gbl_panel_3);

    myHohSignatureEnabled = new JCheckBox("Enabled");
    myHohSignatureEnabled.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent theE) {
            myConnection.setHohSignatureEnabled(myHohSignatureEnabled.isSelected());
        }
    });
    GridBagConstraints gbc_HohSignatureEnabled = new GridBagConstraints();
    gbc_HohSignatureEnabled.insets = new Insets(0, 0, 5, 5);
    gbc_HohSignatureEnabled.gridx = 0;
    gbc_HohSignatureEnabled.gridy = 0;
    mypanel_3.add(myHohSignatureEnabled, gbc_HohSignatureEnabled);

    mylabel_10 = new JLabel("Keystore:");
    GridBagConstraints gbc_label_10 = new GridBagConstraints();
    gbc_label_10.anchor = GridBagConstraints.EAST;
    gbc_label_10.insets = new Insets(0, 0, 5, 5);
    gbc_label_10.gridx = 1;
    gbc_label_10.gridy = 0;
    mypanel_3.add(mylabel_10, gbc_label_10);

    myHohSignatureKeystoreTextbox = new JTextField();
    myHohSignatureKeystoreTextbox.getDocument().addDocumentListener(new SimpleDocumentListener() {
        @Override
        public void update(DocumentEvent theE) {
            myConnection.setHohSignatureKeystore(myHohSignatureKeystoreTextbox.getText());
        }
    });
    GridBagConstraints gbc_HohSignatureKeystoreTextbox2 = new GridBagConstraints();
    gbc_HohSignatureKeystoreTextbox2.gridwidth = 5;
    gbc_HohSignatureKeystoreTextbox2.insets = new Insets(0, 0, 5, 5);
    gbc_HohSignatureKeystoreTextbox2.fill = GridBagConstraints.HORIZONTAL;
    gbc_HohSignatureKeystoreTextbox2.gridx = 2;
    gbc_HohSignatureKeystoreTextbox2.gridy = 0;
    mypanel_3.add(myHohSignatureKeystoreTextbox, gbc_HohSignatureKeystoreTextbox2);
    myHohSignatureKeystoreTextbox.setColumns(10);

    myHohSignatureKeystoreChooseButton = new JButton("Choose");
    myHohSignatureKeystoreChooseButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            Hl7ConnectionPanel.chooseKeystore(Hl7ConnectionPanel.this, myHohSignatureKeystoreTextbox);
        }
    });
    myHohSignatureKeystoreChooseButton.setIcon(
            new ImageIcon(Hl7ConnectionPanel.class.getResource("/ca/uhn/hl7v2/testpanel/images/open.png")));
    GridBagConstraints gbc_HohSignatureKeystoreChooseButton2 = new GridBagConstraints();
    gbc_HohSignatureKeystoreChooseButton2.insets = new Insets(0, 0, 5, 0);
    gbc_HohSignatureKeystoreChooseButton2.gridx = 7;
    gbc_HohSignatureKeystoreChooseButton2.gridy = 0;
    mypanel_3.add(myHohSignatureKeystoreChooseButton, gbc_HohSignatureKeystoreChooseButton2);

    mylabel_11 = new JLabel("Store Pass:");
    GridBagConstraints gbc_label_11 = new GridBagConstraints();
    gbc_label_11.anchor = GridBagConstraints.EAST;
    gbc_label_11.insets = new Insets(0, 0, 5, 5);
    gbc_label_11.gridx = 1;
    gbc_label_11.gridy = 1;
    mypanel_3.add(mylabel_11, gbc_label_11);

    myHohSignatureKeystorePasswordTextbox = new JTextField();
    myHohSignatureKeystorePasswordTextbox.getDocument().addDocumentListener(new SimpleDocumentListener() {
        @Override
        public void update(DocumentEvent theE) {
            myConnection.setHohSignatureKeystorePassword(myHohSignatureKeystorePasswordTextbox.getText());
        }
    });
    myHohSignatureKeystorePasswordTextbox.setPreferredSize(new Dimension(100, 28));
    myHohSignatureKeystorePasswordTextbox.setMinimumSize(new Dimension(100, 28));
    myHohSignatureKeystorePasswordTextbox.setMaximumSize(new Dimension(200, 2147483647));
    GridBagConstraints gbc_HohSignatureKeystorePasswordTextbox = new GridBagConstraints();
    gbc_HohSignatureKeystorePasswordTextbox.insets = new Insets(0, 0, 5, 5);
    gbc_HohSignatureKeystorePasswordTextbox.fill = GridBagConstraints.HORIZONTAL;
    gbc_HohSignatureKeystorePasswordTextbox.gridx = 2;
    gbc_HohSignatureKeystorePasswordTextbox.gridy = 1;
    mypanel_3.add(myHohSignatureKeystorePasswordTextbox, gbc_HohSignatureKeystorePasswordTextbox);
    myHohSignatureKeystorePasswordTextbox.setColumns(10);

    mylabel_12 = new JLabel("Key:");
    GridBagConstraints gbc_label_12 = new GridBagConstraints();
    gbc_label_12.anchor = GridBagConstraints.EAST;
    gbc_label_12.insets = new Insets(0, 0, 5, 5);
    gbc_label_12.gridx = 3;
    gbc_label_12.gridy = 1;
    mypanel_3.add(mylabel_12, gbc_label_12);

    myHohSignatureKeyAliasCombo = new JComboBox();
    myHohSignatureKeyAliasCombo.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent theE) {
            if (myUpdatingHohSignatureKeyAliasCombo) {
                return;
            }
            String selection = (String) myHohSignatureKeyAliasCombo.getSelectedItem();
            if (selection == HOH_SIGNATURE_KEY_USE_ANY_AVAILABLE) {
                myConnection.setHohSignatureKey(null);
            } else {
                myConnection.setHohSignatureKey(selection.replaceAll(" .*", ""));
            }
        }
    });
    GridBagConstraints gbc_HohSignatureKeyAliasCombo = new GridBagConstraints();
    gbc_HohSignatureKeyAliasCombo.insets = new Insets(0, 0, 5, 5);
    gbc_HohSignatureKeyAliasCombo.fill = GridBagConstraints.HORIZONTAL;
    gbc_HohSignatureKeyAliasCombo.gridx = 4;
    gbc_HohSignatureKeyAliasCombo.gridy = 1;
    mypanel_3.add(myHohSignatureKeyAliasCombo, gbc_HohSignatureKeyAliasCombo);

    mylabel_13 = new JLabel("Key Pass:");
    GridBagConstraints gbc_label_13 = new GridBagConstraints();
    gbc_label_13.anchor = GridBagConstraints.EAST;
    gbc_label_13.insets = new Insets(0, 0, 5, 5);
    gbc_label_13.gridx = 5;
    gbc_label_13.gridy = 1;
    mypanel_3.add(mylabel_13, gbc_label_13);

    myHohSignatureKeyPass = new JTextField();
    myHohSignatureKeyPass.getDocument().addDocumentListener(new SimpleDocumentListener() {
        @Override
        public void update(DocumentEvent theE) {
            myConnection.setHohSignatureKeyPassword(myHohSignatureKeyPass.getText());
        }
    });
    myHohSignatureKeyPass.setMinimumSize(new Dimension(50, 28));
    myHohSignatureKeyPass.setMaximumSize(new Dimension(50, 2147483647));
    myHohSignatureKeyPass.setPreferredSize(new Dimension(50, 28));
    GridBagConstraints gbc_HohSignatureKeyPass = new GridBagConstraints();
    gbc_HohSignatureKeyPass.gridwidth = 2;
    gbc_HohSignatureKeyPass.insets = new Insets(0, 0, 5, 0);
    gbc_HohSignatureKeyPass.fill = GridBagConstraints.HORIZONTAL;
    gbc_HohSignatureKeyPass.gridx = 6;
    gbc_HohSignatureKeyPass.gridy = 1;
    mypanel_3.add(myHohSignatureKeyPass, gbc_HohSignatureKeyPass);
    myHohSignatureKeyPass.setColumns(10);

    myHohSignatureStatusLabel = new JLabel("New label");
    myHohSignatureStatusLabel.setHorizontalAlignment(SwingConstants.CENTER);
    GridBagConstraints gbc_HohSignatureStatusLabel = new GridBagConstraints();
    gbc_HohSignatureStatusLabel.fill = GridBagConstraints.HORIZONTAL;
    gbc_HohSignatureStatusLabel.gridwidth = 8;
    gbc_HohSignatureStatusLabel.insets = new Insets(0, 0, 0, 5);
    gbc_HohSignatureStatusLabel.gridx = 0;
    gbc_HohSignatureStatusLabel.gridy = 2;
    mypanel_3.add(myHohSignatureStatusLabel, gbc_HohSignatureStatusLabel);

    init();

}

From source file:br.org.acessobrasil.ases.ferramentas_de_reparo.vista.doctype.ferramentaDoctype.java

/**
 * Mtodo chamado pelos construtores/* w w w .j  a  va  2  s.c  om*/
 * 
 * @param conteudo
 */
private void initComponents(String conteudo) {
    textAreaSourceCode = new G_TextAreaSourceCode();
    tabelaDoctypes = new TabelaDescricao();
    aplicar = new JButton();

    abrir = new JButton();
    cancelar = new JButton();
    JPanel regraFonteBtn = new JPanel();
    regraFonteBtn.setLayout(new BorderLayout());

    textAreaSourceCode.setTipoHTML();
    new OnChange(textAreaSourceCode, this);
    tabelaDoctypes = new TabelaDescricao();

    salvar = new JButton();
    abrir = new JButton();
    cancelar = new JButton();
    strConteudoalt = new String();

    pnRegra = new JPanel();
    lbRegras1 = new JLabel();
    pnSetaDescricao = new JPanel();

    pnListaErros = new JPanel();
    scrollPanetabLinCod = new JScrollPane();

    pnBotoes = new JPanel();

    buscar = new JButton();
    salvar.setEnabled(false);
    salvaAlteracoes = TxtBuffer.getInstanciaSalvaAlteracoes(textAreaSourceCode.getTextPane(), salvar,
            new JMenuItem(), parentFrame);
    textAreaSourceCode.getTextPane().setEditable(true);
    aplicar.setEnabled(false);
    setBackground(CoresDefault.getCorPaineis());
    Container contentPane = this;// ??
    contentPane.setLayout(new GridLayout(2, 1));

    // ======== pnRegra ========
    {
        // pnRegra.setBorder(criaBorda(""));
        pnRegra.setBorder(criaBorda(LabelPanel.TITULO_REGRA));
        pnRegra.setLayout(new GridLayout(2, 1));
        pnRegra.add(lbRegras1);
        lbRegras1.setText(TradFerramentaDocType.UTILIZAR_ELEMENTOS_CABECALHO);
        lbRegras1.setHorizontalAlignment(SwingConstants.CENTER);
        pnRegra.add(lbRegras1);
        pnRegra.setPreferredSize(new Dimension(700, 60));
    }

    // ======== pnDescricao ========

    aplicar.setText(GERAL.APLICAR);
    aplicar.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            aplicarActionPerformed(e);
        }
    });

    aplicar.setToolTipText(TradFerramentaDocType.DICA_APLICA_DTD);
    aplicar.getAccessibleContext().setAccessibleDescription(TradFerramentaDocType.DICA_APLICA_DTD);
    aplicar.getAccessibleContext().setAccessibleName(TradFerramentaDocType.DICA_APLICA_DTD);
    aplicar.setBounds(10, 0, 150, 25);

    salvar.setText(GERAL.BTN_SALVAR);
    salvar.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            salvarActionPerformed(e);
        }
    });
    salvar.setToolTipText(GERAL.DICA_SALVAR);
    salvar.getAccessibleContext().setAccessibleDescription(GERAL.DICA_SALVAR);
    salvar.getAccessibleContext().setAccessibleName(GERAL.DICA_SALVAR);

    salvar.setBounds(10, 0, 150, 25);

    abrir.setText(GERAL.BTN_ABRIR);
    abrir.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            abrirActionPerformed(e);
        }
    });

    abrir.setToolTipText(Ferramenta_Scripts.DICA_ABRIR);
    abrir.getAccessibleContext().setAccessibleDescription(Ferramenta_Scripts.DICA_ABRIR_HTML);
    abrir.getAccessibleContext().setAccessibleName(Ferramenta_Scripts.DICA_ABRIR_HTML);
    abrir.setBounds(165, 0, 150, 25);

    cancelar.setText(Ferramenta_Imagens.TELA_ANTERIOR);
    cancelar.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            cancelarActionPerformed(e);
        }
    });

    cancelar.setToolTipText(Ferramenta_Imagens.DICA_TELA_ANTERIOR);
    cancelar.getAccessibleContext().setAccessibleDescription(Ferramenta_Imagens.DICA_TELA_ANTERIOR);
    cancelar.getAccessibleContext().setAccessibleName(Ferramenta_Imagens.DICA_BTN_CANCELAR);
    cancelar.setBounds(320, 0, 150, 25);

    // ======== pnParticRotulo ========

    // pnSetaDescricao.setBorder(criaBorda(""));
    GridBagConstraints cons = new GridBagConstraints();
    GridBagLayout layout = new GridBagLayout();
    cons.fill = GridBagConstraints.BOTH;
    cons.weighty = 1;
    cons.weightx = 0.80;

    pnSetaDescricao.setLayout(layout);
    cons.anchor = GridBagConstraints.SOUTHEAST;
    cons.insets = new Insets(0, 0, 0, 10);
    // ======== spParticRotulo ========

    cons.weightx = 0.20;
    pnSetaDescricao.setPreferredSize(new Dimension(400, 60));

    // ======== pnListaErros ========
    {

        pnListaErros.setBorder(criaBorda(TradFerramentaDocType.ESCOLHA_DTD_CORRETO));
        pnListaErros.setLayout(new BorderLayout());
        // ======== scrollPanetabLinCod ========
        {
            scrollPanetabLinCod.setViewportView(tabelaDoctypes);
        }
        pnListaErros.add(scrollPanetabLinCod, BorderLayout.CENTER);
    }
    // ======== pnBotoes ========
    {

        // pnBotoes.setBorder(criaBorda(""));

        pnBotoes.setLayout(null);
        // ---- adicionar ----

        // ---- aplicarRotulo ----

        buscar.setText(TradSimuladorNavegacao.BUSCAR_PROXIMA);
        buscar.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                aplicarActionPerformed(e);
            }
        });

        buscar.setToolTipText(TradSimuladorNavegacao.BUSCAR_TEXTO);
        buscar.getAccessibleContext().setAccessibleDescription(TradSimuladorNavegacao.BUSCAR_TEXTO);
        buscar.getAccessibleContext().setAccessibleName(TradSimuladorNavegacao.BUSCAR_TEXTO);
        buscar.setBounds(10, 5, 150, 25);
        // pnBotoes.add(buscar);
    }

    /*
     * Colocar os controles
     */
    pnRegra.setBackground(CoresDefault.getCorPaineis());
    regraFonteBtn.add(pnRegra, BorderLayout.NORTH);
    textAreaSourceCode.setBorder(criaBorda(TradFerramentaDocType.CODIGO_FONTE));
    textAreaSourceCode.setBackground(CoresDefault.getCorPaineis());

    regraFonteBtn.add(textAreaSourceCode, BorderLayout.CENTER);
    pnBotoes.setPreferredSize(new Dimension(600, 35));
    pnBotoes.setBackground(CoresDefault.getCorPaineis());

    regraFonteBtn.setBackground(CoresDefault.getCorPaineis());
    contentPane.add(regraFonteBtn);

    JPanel textoErrosBtn = new JPanel();
    textoErrosBtn.setLayout(new BorderLayout());
    pnSetaDescricao.setBackground(CoresDefault.getCorPaineis());
    pnSetaDescricao.add(pnBotoes, cons);
    textoErrosBtn.add(pnSetaDescricao, BorderLayout.NORTH);

    textoErrosBtn.add(pnListaErros, BorderLayout.CENTER);
    pnSalvarCancelar.setLayout(null);
    pnSalvarCancelar.setPreferredSize(new Dimension(600, 35));
    pnSalvarCancelar.add(abrir);
    pnSalvarCancelar.add(salvar);
    pnSalvarCancelar.add(cancelar);

    if (!original) {
        reverter = new JButton("Reverter");
        reverter.setText(TradPainelRelatorio.REVERTER);
        reverter.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                setVisible(false);
                TxtBuffer.setContent(TxtBuffer.getContentOriginal());
                parentFrame.showPainelFerramentaDoctypePArq(TxtBuffer.getContentOriginal());
                setVisible(true);
            }
        });
        reverter.setToolTipText(TradPainelRelatorio.DICA_REVERTER);
        reverter.getAccessibleContext().setAccessibleDescription(TradPainelRelatorio.DICA_REVERTER);
        reverter.getAccessibleContext().setAccessibleName(TradPainelRelatorio.DICA_REVERTER);
        reverter.setBounds(485, 0, 150, 25);
        pnSalvarCancelar.add(reverter);
    }

    pnSalvarCancelar.setBackground(CoresDefault.getCorPaineis());
    textoErrosBtn.add(pnSalvarCancelar, BorderLayout.SOUTH);
    pnListaErros.setBackground(CoresDefault.getCorPaineis());

    contentPane.setBackground(CoresDefault.getCorPaineis());
    contentPane.add(textoErrosBtn);
    controla(conteudo);
    this.setVisible(true);

}

From source file:org.parosproxy.paros.extension.beanshell.BeanShellConsoleDialog.java

/**
 * This method initializes jPanel   /*from  w w  w.j  a  v a 2 s.  c  o m*/
 *    
 * @return javax.swing.JPanel   
 */
private JPanel getJPanel() {
    if (jPanel == null) {
        GridBagConstraints gridBagConstraints31 = new GridBagConstraints();
        jPanel = new JPanel();
        jPanel.setLayout(new GridBagLayout());
        gridBagConstraints31.gridx = 0;
        gridBagConstraints31.gridy = 0;
        gridBagConstraints31.weightx = 1.0;
        gridBagConstraints31.weighty = 1.0;
        gridBagConstraints31.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints31.anchor = java.awt.GridBagConstraints.NORTHWEST;

        HttpSender sender = new HttpSender(Model.getSingleton().getOptionsParam().getConnectionParam(), true);
        try {
            getInterpreter().set("model", Model.getSingleton());
            getInterpreter().set("sites", Model.getSingleton().getSession().getSiteTree());
            getInterpreter().set("sender", sender);
            getInterpreter().eval("setAccessibility(true)"); //This allows BeanShell users to access private members
            getInterpreter().eval("import org.apache.commons.httpclient.URI");
            getInterpreter().eval("import org.parosproxy.paros.network.*");
            getInterpreter().eval("import org.parosproxy.paros.model.*");
            getInterpreter().eval("import org.parosproxy.paros.db.*");
            getInterpreter().eval("import org.parosproxy.paros.model.*;");
        } catch (EvalError e) {
            e.printStackTrace();
        }
        new Thread(getInterpreter()).start();
        jPanel.add(getBeanShellPanel(), gridBagConstraints31);
    }
    return jPanel;
}

From source file:com.supermap.desktop.icloud.CloudLicenseDialog.java

private void initLayout() {
    this.setLayout(new GridBagLayout());

    JPanel panelButton = new JPanel();
    panelButton.setLayout(new GridBagLayout());
    panelButton.add(this.buttonLogin, new GridBagConstraintsHelper(0, 0, 1, 1)
            .setAnchor(GridBagConstraints.EAST).setWeight(0, 0).setInsets(2, 0, 10, 10));
    panelButton.add(this.buttonClose, new GridBagConstraintsHelper(1, 0, 1, 1)
            .setAnchor(GridBagConstraints.EAST).setWeight(0, 0).setInsets(2, 0, 10, 10));

    this.add(panelCloudImage, new GridBagConstraintsHelper(0, 0, 6, 3).setAnchor(GridBagConstraints.NORTH)
            .setFill(GridBagConstraints.BOTH).setWeight(1, 1));
    this.add(panelUserImage, new GridBagConstraintsHelper(0, 3, 1, 3).setInsets(10, 0, 0, 0)
            .setAnchor(GridBagConstraints.NORTH).setFill(GridBagConstraints.BOTH).setWeight(1, 1));
    this.add(labelWarning, new GridBagConstraintsHelper(1, 3, 2, 1).setInsets(20, 5, 10, 5)
            .setAnchor(GridBagConstraints.WEST).setFill(GridBagConstraints.NONE).setWeight(0, 0));
    this.add(labelUserName, new GridBagConstraintsHelper(1, 4, 1, 1).setInsets(10, 5, 10, 5)
            .setAnchor(GridBagConstraints.WEST).setFill(GridBagConstraints.NONE).setWeight(0, 0));
    this.add(textFieldUserName, new GridBagConstraintsHelper(2, 4, 3, 1).setInsets(10, 0, 10, 5)
            .setAnchor(GridBagConstraints.WEST).setFill(GridBagConstraints.HORIZONTAL).setWeight(1, 0));
    this.add(labelRegister, new GridBagConstraintsHelper(5, 4, 1, 1).setInsets(10, 5, 5, 16)
            .setAnchor(GridBagConstraints.WEST).setFill(GridBagConstraints.BOTH).setWeight(1, 1));
    this.add(labelPassWord, new GridBagConstraintsHelper(1, 5, 1, 1).setInsets(0, 5, 0, 5)
            .setAnchor(GridBagConstraints.WEST).setFill(GridBagConstraints.NONE).setWeight(0, 0));
    this.add(fieldPassWord, new GridBagConstraintsHelper(2, 5, 3, 1).setInsets(0, 0, 0, 5)
            .setAnchor(GridBagConstraints.WEST).setFill(GridBagConstraints.HORIZONTAL).setWeight(1, 0));
    this.add(labelFindPassword, new GridBagConstraintsHelper(5, 5, 1, 1).setInsets(0, 5, 0, 16)
            .setAnchor(GridBagConstraints.WEST).setFill(GridBagConstraints.BOTH).setWeight(1, 1));
    this.add(checkBoxSavePassword, new GridBagConstraintsHelper(2, 6, 1, 1).setInsets(0, 5, 5, 5)
            .setAnchor(GridBagConstraints.WEST).setFill(GridBagConstraints.NONE).setWeight(0, 0));
    this.add(checkBoxAutoLogin, new GridBagConstraintsHelper(3, 6, 1, 1).setInsets(0, 0, 5, 5)
            .setAnchor(GridBagConstraints.WEST).setFill(GridBagConstraints.NONE).setWeight(0, 0));
    this.add(panelButton,
            new GridBagConstraintsHelper(0, 7, 6, 1).setAnchor(GridBagConstraints.EAST).setWeight(0, 0));
    this.labelRegister.setPreferredSize(new Dimension(100, 23));
    this.labelFindPassword.setPreferredSize(new Dimension(100, 23));
}

From source file:org.openconcerto.task.TodoListPanel.java

public TodoListPanel() {
    this.setOpaque(false);
    this.iconTache = new ImageIcon(TodoListPanel.class.getResource("tache.png"));
    this.iconPriorite = new ImageIcon(TodoListPanel.class.getResource("priorite.png"));
    this.userTableCellRenderer = new UserTableCellRenderer();
    this.timestampTableCellRendererCreated = new TimestampTableCellRenderer();
    this.timestampTableCellRendererDone = new TimestampTableCellRenderer();
    this.timestampTableCellRendererDeadLine = new TimestampTableCellRenderer(true);
    this.timestampTableCellEditorCreated = new TimestampTableCellEditor();
    this.timestampTableCellEditorDone = new TimestampTableCellEditor();
    this.timestampTableCellEditorDeadLine = new TimestampTableCellEditor();
    // Icon renderer
    List<URL> l = new Vector<URL>();
    l.add(TodoListPanel.class.getResource("empty.png"));
    l.add(TodoListPanel.class.getResource("high.png"));
    l.add(TodoListPanel.class.getResource("normal.png"));
    l.add(TodoListPanel.class.getResource("low.png"));
    this.iconEditor = new IconTableCellRenderer(l);
    this.iconRenderer = new IconTableCellRenderer(l);

    final User currentUser = UserManager.getInstance().getCurrentUser();
    this.model = new TodoListModel(currentUser);
    this.sorter = new TableSorter(this.model);
    this.t = new LightEventJTable(this.sorter) {
        public JToolTip createToolTip() {
            return new JMultiLineToolTip();
        }// ww  w . j  a va 2  s.c o  m

        @Override
        public String getToolTipText(MouseEvent event) {
            String r = null;
            TodoListElement task = getTaskAt(event.getPoint());

            if (task != null && task.getCreatorId() > 1) {
                final String comment = task.getComment();
                if (comment != null) {
                    r = comment;
                    r += "\n\n";
                } else {
                    r = "";
                }
                r += getTM().trM("assignedBy", "user",
                        UserManager.getInstance().getUser(task.getCreatorId()).getFullName(), "date",
                        task.getDate());
            }

            return r;
        }

    };
    this.sorter.setTableHeader(this.t.getTableHeader());

    this.model.setTable(this.t);

    this.comboUser = new JMenu(TM.tr("showTaskAssignedTo"));
    initViewableUsers(currentUser);

    // L'utilisateur courant doit voir ses taches + toutes les taches dont il a les droits
    this.model.addIdListenerSilently(Integer.valueOf(currentUser.getId()));

    final int size = this.users.size();
    for (int i = 0; i < size; i++) {
        Integer id = Integer.valueOf((this.users.get(i)).getId());
        if (this.model.listenToId(id)) {
            ((JCheckBoxMenuItem) this.comboUser.getMenuComponent(i)).setState(true);
        } else {
            ((JCheckBoxMenuItem) this.comboUser.getMenuComponent(i)).setState(false);
        }
    }

    this.addButton = new JButton(TM.tr("addTask"));
    this.removeButton = new JButton();
    this.removeButton.setOpaque(false);
    updateDeleteBtn();
    this.setLayout(new GridBagLayout());
    GridBagConstraints c = new GridBagConstraints();
    c.insets = new Insets(2, 2, 1, 2);
    c.fill = GridBagConstraints.HORIZONTAL;
    c.gridx = 0;
    c.gridy = 0;
    c.weightx = 1;
    c.weighty = 0;
    c.gridwidth = 6;
    // SEP
    TitledSeparator sep = new TitledSeparator(
            currentUser.getFirstName() + " " + currentUser.getName().toUpperCase());
    this.add(sep, c);

    c.gridwidth = 1;
    c.gridx = 0;
    c.gridy++;
    c.weightx = 0;
    this.add(this.addButton, c);
    c.gridx++;
    this.add(this.removeButton, c);

    c.anchor = GridBagConstraints.EAST;
    c.gridx++;
    final JMenuBar b = new JMenuBar();
    b.setOpaque(false);
    b.setBorderPainted(false);
    b.add(this.comboUser);
    // Pour que le menu ne disparaisse pas quand on rapetisse trop la fenetre en bas
    b.setMinimumSize(b.getPreferredSize());
    this.add(b, c);

    c.gridx++;
    c.weightx = 1;
    this.detailCheckBox = new JCheckBox(TM.tr("showDetails"));
    this.detailCheckBox.setOpaque(false);
    this.detailCheckBox.setSelected(false);
    this.add(this.detailCheckBox, c);

    //
    c.gridx++;
    this.hideOldCheckBox = new JCheckBox(TM.tr("hideHistory"));
    this.hideOldCheckBox.setOpaque(false);
    this.hideOldCheckBox.setSelected(true);
    this.add(this.hideOldCheckBox, c);

    c.gridx++;

    c.weightx = 0;
    c.anchor = GridBagConstraints.EAST;
    this.reloadPanel.setOpaque(false);
    this.add(this.reloadPanel, c);

    // Table
    c.gridwidth = 6;
    c.gridx = 0;
    c.gridy++;
    c.fill = GridBagConstraints.BOTH;
    c.weighty = 1;
    c.weightx = 1;
    initPopUp();
    initTable(TodoListModel.SIMPLE_MODE);
    this.add(new JScrollPane(this.t), c);

    initListeners();

    this.model.asynchronousFill();
}

From source file:it.illinois.adsc.ema.softgrid.monitoring.ui.SPMainFrame.java

private void setupGUI() throws Exception {
    this.getContentPane().setLayout(new GridBagLayout());
    chartPanel = getChartPanel();/* ww  w .  j a v a 2  s. c o  m*/
    this.setPreferredSize(new Dimension(800, 700));

    alertPanel.setPreferredSize(new Dimension(200, 700));
    alertPanel.setMinimumSize(new Dimension(200, 700));
    alertPanel.setMaximumSize(new Dimension(200, 700));

    transientPanel.setPreferredSize(new Dimension(200, 700));
    transientPanel.setMinimumSize(new Dimension(200, 700));
    transientPanel.setMaximumSize(new Dimension(200, 700));

    queryTextArea.setPreferredSize(new Dimension(300, 100));
    queryTextArea.setMinimumSize(new Dimension(300, 100));
    queryTextArea.setMaximumSize(new Dimension(300, 100));

    monitorButton.setPreferredSize(new Dimension(30, 30));
    monitorButton.setMinimumSize(new Dimension(30, 30));
    monitorButton.setMaximumSize(new Dimension(30, 30));
    monitorButton.setToolTipText("Execute and Monitor");

    exitButton.setPreferredSize(new Dimension(30, 30));
    exitButton.setMinimumSize(new Dimension(30, 30));
    exitButton.setMaximumSize(new Dimension(30, 30));
    exitButton.setToolTipText("Close and Exit");

    clearButton.setPreferredSize(new Dimension(30, 30));
    clearButton.setMinimumSize(new Dimension(30, 30));
    clearButton.setMaximumSize(new Dimension(30, 30));
    clearButton.setToolTipText("Reset");

    runButton.setPreferredSize(new Dimension(30, 30));
    runButton.setMinimumSize(new Dimension(30, 30));
    runButton.setMaximumSize(new Dimension(30, 30));
    runButton.setToolTipText("Initialize the server...!");

    alertPanel.setLayout(new VerticalFlowLayout());
    transientPanel.setLayout(new BorderLayout());
    //      System.out.println("new File(\"../MonitorEngine/Images/execute-xxl.png\").exists() = " + new File("../MonitorEngine/Images/execute-xxl.png").exists());
    //      System.out.println("execute-xxl.png = " + new File("execute-xxl.png").exists());
    //      System.out.println("new File().getAbsolutePath() = " + new File("openmuc.jar").getAbsolutePath());
    Image img = new ImageIcon(ImageIO.read(getClass().getClassLoader().getResourceAsStream("execute-xxl.png")))
            .getImage();
    Image newimg = img.getScaledInstance(30, 30, java.awt.Image.SCALE_SMOOTH);
    ImageIcon icon = new ImageIcon(newimg);
    monitorButton.setIcon(icon);

    img = new ImageIcon(ImageIO.read(getClass().getClassLoader().getResourceAsStream("stop-xxl.png")))
            .getImage();
    newimg = img.getScaledInstance(30, 30, java.awt.Image.SCALE_SMOOTH);
    icon = new ImageIcon(newimg);
    exitButton.setIcon(icon);

    img = new ImageIcon(ImageIO.read(getClass().getClassLoader().getResourceAsStream("reset-xxl.png")))
            .getImage();
    newimg = img.getScaledInstance(30, 30, java.awt.Image.SCALE_SMOOTH);
    icon = new ImageIcon(newimg);
    clearButton.setIcon(icon);

    img = new ImageIcon(ImageIO.read(getClass().getClassLoader().getResourceAsStream("start-xxl.png")))
            .getImage();
    newimg = img.getScaledInstance(30, 30, java.awt.Image.SCALE_SMOOTH);
    icon = new ImageIcon(newimg);
    runButton.setIcon(icon);
    altertScrolPane.getViewport().add(alertPanel, null);
    altertScrolPane.setBorder(BorderFactory.createEtchedBorder());
    logAreaScrollPane.getViewport().add(logTextArea, null);
    logAreaScrollPane.setBorder(BorderFactory.createEtchedBorder());

    JPanel tempQueryPanel = new JPanel();
    JPanel buttonPanel = new JPanel();
    //      tempQueryPanel.setBorder(BorderFactory.createTitledBorder("Monitor Query"));
    tempQueryPanel.setLayout(new GridBagLayout());
    buttonPanel.setLayout(new GridBagLayout());
    buttonPanel.setBorder(BorderFactory.createEtchedBorder());
    buttonPanel.setOpaque(true);
    buttonPanel.setBackground(Color.gray);
    buttonPanel.add(runButton, new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.CENTER,
            GridBagConstraints.NONE, new Insets(6, 12, 3, 12), 0, 0));
    buttonPanel.add(monitorButton, new GridBagConstraints(0, 2, 1, 1, 0, 0, GridBagConstraints.CENTER,
            GridBagConstraints.NONE, new Insets(3, 12, 3, 12), 0, 0));
    buttonPanel.add(clearButton, new GridBagConstraints(0, 3, 1, 1, 0, 0, GridBagConstraints.CENTER,
            GridBagConstraints.NONE, new Insets(3, 12, 3, 12), 0, 0));
    buttonPanel.add(exitButton, new GridBagConstraints(0, 4, 1, 1, 0, 0, GridBagConstraints.CENTER,
            GridBagConstraints.NONE, new Insets(3, 12, 3, 12), 0, 0));
    //      tempQueryPanel.add(splitPane, new GridBagConstraints(0, 0, 1, 6, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
    tempQueryPanel.add(buttonPanel, new GridBagConstraints(0, 0, 1, 1, 0, 1, GridBagConstraints.CENTER,
            GridBagConstraints.VERTICAL, new Insets(0, 0, 0, 0), 0, 0));
    tempQueryPanel.add(queryScrolPane, new GridBagConstraints(1, 0, 1, 1, 1, 1, GridBagConstraints.CENTER,
            GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
    mainTabbedPane.add(splitPane, "Controller");

    mainTabbedPane.add(ConfigPanel.getInstance(), "Configuration");

    splitPane.setTopComponent(tempQueryPanel);
    splitPane.setDividerLocation(152);
    splitPane.setBottomComponent(resultTabbedPane);
    splitPane.setOrientation(JSplitPane.VERTICAL_SPLIT);
    this.getContentPane().add(mainTabbedPane, new GridBagConstraints(0, 0, 1, 2, 0.75, 0.25,
            GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(12, 12, 12, 0), 0, 0));
    //      this.getContentPane().add(alertTitile, new GridBagConstraints(1, 0, 1, 1, 0, 0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(12, 0, 0, 12), 0, 0));
    //      this.getContentPane().add(altertScrolPane, new GridBagConstraints(1, 1, 1, 2, 0, 1, GridBagConstraints.CENTER, GridBagConstraints.VERTICAL, new Insets(0, 0, 12, 12), 0, 0));
    //      tempQueryPanel.add(queryScrolPane, new GridBagConstraints(0, 0, 1, 5, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
    //      this.getContentPane().add(logAreaScrollPane, new GridBagConstraints(0, 2, 1, 1, 0.75, 0.75, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(12, 12, 12, 0), 0, 0));
    exitButton.addActionListener(this);
    monitorButton.addActionListener(this);
    clearButton.addActionListener(this);
    clearButton.setEnabled(false);
    clearButton.setVisible(false);
    monitorButton.setEnabled(true);
    runButton.addActionListener(this);
    queryTextArea.setContentType("text/html");
    queryTextArea.setText("select overloadrank from virtual");

    messageHandler = new MessageUIHandler(logTextArea, logAreaScrollPane);
    ConfigPanel.getInstance().setupConfigPanel();
}

From source file:com.limegroup.gnutella.gui.LicenseWindow.java

/** Creates the top of the window. */
protected void createTopOfWindow(Container parent) {
    GridBagConstraints c = new GridBagConstraints();
    JLabel img = new URLLabel(getLargeLicenseURLString(), getLargeLicenseIcon());
    c.insets = new Insets(4, 4, 2, 0);
    parent.add(img, c);/* w w w .ja va  2 s. c om*/

    JComponent line = new Line(ThemeFileHandler.TABLE_BACKGROUND_COLOR.getValue());
    c.insets = new Insets(0, 2, 0, 2);
    c.gridwidth = GridBagConstraints.RELATIVE;
    c.fill = GridBagConstraints.VERTICAL;
    parent.add(line, c);

    JTextArea text = newTextArea(LICENSE.getLicense());
    c.gridwidth = GridBagConstraints.REMAINDER;
    c.fill = GridBagConstraints.BOTH;
    c.insets = new Insets(4, 0, 2, 4);
    parent.add(text, c);
}

From source file:de.cismet.cids.custom.objecteditors.wunda_blau.WebDavPicturePanel.java

/**
 * 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.
 *//*  w w w  .j  a  v  a 2s.c o  m*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
    GridBagConstraints gridBagConstraints;
    bindingGroup = new BindingGroup();

    final RoundedPanel pnlFotos = new RoundedPanel();
    final SemiRoundedPanel pnlHeaderFotos = new SemiRoundedPanel();
    final JLabel lblHeaderFotos = new JLabel();
    final JPanel jPanel2 = new JPanel();
    final JPanel jPanel1 = new JPanel();
    final JScrollPane jspFotoList = new JScrollPane();
    lstFotos = new JList();
    final JPanel pnlCtrlButtons = new JPanel();
    btnAddImg = new JButton();
    btnRemoveImg = new JButton();
    final JPanel pnlMap = new JPanel();
    final RoundedPanel pnlVorschau = new RoundedPanel();
    final SemiRoundedPanel semiRoundedPanel2 = new SemiRoundedPanel();
    final JLabel lblVorschau = new JLabel();
    final JPanel jPanel3 = new JPanel();
    pnlFoto = new JPanel();
    lblPicture = new JLabel();
    lblBusy = new JXBusyLabel(new Dimension(75, 75));
    final JPanel pnlCtrlBtn = new JPanel();
    btnPrevImg = new JButton();
    btnNextImg = new JButton();

    final FormListener formListener = new FormListener();

    setName("Form"); // NOI18N
    setOpaque(false);
    setLayout(new GridBagLayout());

    pnlFotos.setMinimumSize(new Dimension(400, 200));
    pnlFotos.setName("pnlFotos"); // NOI18N
    pnlFotos.setPreferredSize(new Dimension(400, 200));
    pnlFotos.setLayout(new GridBagLayout());

    pnlHeaderFotos.setBackground(new Color(51, 51, 51));
    pnlHeaderFotos.setForeground(new Color(51, 51, 51));
    pnlHeaderFotos.setName("pnlHeaderFotos"); // NOI18N
    pnlHeaderFotos.setLayout(new FlowLayout());

    lblHeaderFotos.setForeground(new Color(255, 255, 255));
    Mnemonics.setLocalizedText(lblHeaderFotos,
            NbBundle.getMessage(WebDavPicturePanel.class, "WebDavPicturePanel.lblHeaderFotos.text")); // NOI18N
    lblHeaderFotos.setName("lblHeaderFotos"); // NOI18N
    pnlHeaderFotos.add(lblHeaderFotos);

    gridBagConstraints = new GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
    pnlFotos.add(pnlHeaderFotos, gridBagConstraints);

    jPanel2.setName("jPanel2"); // NOI18N
    jPanel2.setOpaque(false);
    jPanel2.setLayout(new GridBagLayout());

    jPanel1.setName("jPanel1"); // NOI18N
    jPanel1.setOpaque(false);
    jPanel1.setLayout(new GridBagLayout());

    jspFotoList.setMinimumSize(new Dimension(250, 130));
    jspFotoList.setName("jspFotoList"); // NOI18N

    lstFotos.setMinimumSize(new Dimension(250, 130));
    lstFotos.setName("lstFotos"); // NOI18N
    lstFotos.setPreferredSize(new Dimension(250, 130));

    final ELProperty eLProperty = ELProperty.create("${cidsBean." + beanCollProp + "}");
    final JListBinding jListBinding = SwingBindings.createJListBinding(AutoBinding.UpdateStrategy.READ_WRITE,
            this, eLProperty, lstFotos);
    bindingGroup.addBinding(jListBinding);

    lstFotos.addListSelectionListener(formListener);
    jspFotoList.setViewportView(lstFotos);

    gridBagConstraints = new GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.gridheight = 2;
    gridBagConstraints.fill = GridBagConstraints.BOTH;
    gridBagConstraints.anchor = GridBagConstraints.NORTHWEST;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    jPanel1.add(jspFotoList, gridBagConstraints);

    pnlCtrlButtons.setName("pnlCtrlButtons"); // NOI18N
    pnlCtrlButtons.setOpaque(false);
    pnlCtrlButtons.setLayout(new GridBagLayout());

    btnAddImg.setIcon(new ImageIcon(
            getClass().getResource("/de/cismet/cids/custom/objecteditors/wunda_blau/edit_add_mini.png"))); // NOI18N
    Mnemonics.setLocalizedText(btnAddImg,
            NbBundle.getMessage(WebDavPicturePanel.class, "WebDavPicturePanel.btnAddImg.text")); // NOI18N
    btnAddImg.setBorderPainted(false);
    btnAddImg.setContentAreaFilled(false);
    btnAddImg.setName("btnAddImg"); // NOI18N
    btnAddImg.addActionListener(formListener);
    gridBagConstraints = new GridBagConstraints();
    gridBagConstraints.insets = new Insets(0, 0, 5, 0);
    pnlCtrlButtons.add(btnAddImg, gridBagConstraints);

    btnRemoveImg.setIcon(new ImageIcon(
            getClass().getResource("/de/cismet/cids/custom/objecteditors/wunda_blau/edit_remove_mini.png"))); // NOI18N
    Mnemonics.setLocalizedText(btnRemoveImg,
            NbBundle.getMessage(WebDavPicturePanel.class, "WebDavPicturePanel.btnRemoveImg.text")); // NOI18N
    btnRemoveImg.setBorderPainted(false);
    btnRemoveImg.setContentAreaFilled(false);
    btnRemoveImg.setName("btnRemoveImg"); // NOI18N
    btnRemoveImg.addActionListener(formListener);
    gridBagConstraints = new GridBagConstraints();
    gridBagConstraints.gridy = 1;
    gridBagConstraints.insets = new Insets(5, 0, 0, 0);
    pnlCtrlButtons.add(btnRemoveImg, gridBagConstraints);

    gridBagConstraints = new GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = GridBagConstraints.BOTH;
    gridBagConstraints.anchor = GridBagConstraints.NORTH;
    gridBagConstraints.insets = new Insets(0, 5, 0, 0);
    jPanel1.add(pnlCtrlButtons, gridBagConstraints);

    gridBagConstraints = new GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    gridBagConstraints.insets = new Insets(10, 10, 10, 0);
    jPanel2.add(jPanel1, gridBagConstraints);

    gridBagConstraints = new GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    gridBagConstraints.insets = new Insets(0, 0, 2, 0);
    pnlFotos.add(jPanel2, gridBagConstraints);

    gridBagConstraints = new GridBagConstraints();
    gridBagConstraints.fill = GridBagConstraints.BOTH;
    gridBagConstraints.anchor = GridBagConstraints.NORTH;
    gridBagConstraints.insets = new Insets(0, 0, 5, 5);
    add(pnlFotos, gridBagConstraints);

    pnlMap.setBorder(BorderFactory.createEtchedBorder());
    pnlMap.setMinimumSize(new Dimension(400, 200));
    pnlMap.setName("pnlMap"); // NOI18N
    pnlMap.setPreferredSize(new Dimension(400, 200));
    pnlMap.setLayout(new BorderLayout());
    gridBagConstraints = new GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = GridBagConstraints.VERTICAL;
    gridBagConstraints.weighty = 1.0;
    gridBagConstraints.insets = new Insets(5, 0, 0, 5);
    add(pnlMap, gridBagConstraints);
    pnlMap.add(map, BorderLayout.CENTER);

    pnlVorschau.setName("pnlVorschau"); // NOI18N
    pnlVorschau.setLayout(new GridBagLayout());

    semiRoundedPanel2.setBackground(new Color(51, 51, 51));
    semiRoundedPanel2.setName("semiRoundedPanel2"); // NOI18N
    semiRoundedPanel2.setLayout(new FlowLayout());

    lblVorschau.setForeground(new Color(255, 255, 255));
    Mnemonics.setLocalizedText(lblVorschau,
            NbBundle.getMessage(WebDavPicturePanel.class, "WebDavPicturePanel.lblVorschau.text")); // NOI18N
    lblVorschau.setName("lblVorschau"); // NOI18N
    semiRoundedPanel2.add(lblVorschau);

    gridBagConstraints = new GridBagConstraints();
    gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
    pnlVorschau.add(semiRoundedPanel2, gridBagConstraints);

    jPanel3.setName("jPanel3"); // NOI18N
    jPanel3.setOpaque(false);
    jPanel3.setLayout(new GridBagLayout());

    pnlFoto.setName("pnlFoto"); // NOI18N
    pnlFoto.setOpaque(false);
    pnlFoto.setLayout(new GridBagLayout());

    lblPicture.setHorizontalAlignment(SwingConstants.CENTER);
    Mnemonics.setLocalizedText(lblPicture,
            NbBundle.getMessage(WebDavPicturePanel.class, "WebDavPicturePanel.lblPicture.text")); // NOI18N
    lblPicture.setName("lblPicture"); // NOI18N
    gridBagConstraints = new GridBagConstraints();
    gridBagConstraints.fill = GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    pnlFoto.add(lblPicture, gridBagConstraints);

    lblBusy.setHorizontalAlignment(SwingConstants.CENTER);
    lblBusy.setMaximumSize(new Dimension(140, 40));
    lblBusy.setMinimumSize(new Dimension(140, 60));
    lblBusy.setName("lblBusy"); // NOI18N
    lblBusy.setPreferredSize(new Dimension(140, 60));
    gridBagConstraints = new GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    pnlFoto.add(lblBusy, gridBagConstraints);

    gridBagConstraints = new GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    gridBagConstraints.insets = new Insets(10, 10, 0, 10);
    jPanel3.add(pnlFoto, gridBagConstraints);

    pnlCtrlBtn.setName("pnlCtrlBtn"); // NOI18N
    pnlCtrlBtn.setOpaque(false);
    pnlCtrlBtn.setPreferredSize(new Dimension(100, 50));
    pnlCtrlBtn.setLayout(new GridBagLayout());

    btnPrevImg.setIcon(new ImageIcon(getClass().getResource("/res/arrow-left.png"))); // NOI18N
    Mnemonics.setLocalizedText(btnPrevImg,
            NbBundle.getMessage(WebDavPicturePanel.class, "WebDavPicturePanel.btnPrevImg.text")); // NOI18N
    btnPrevImg.setBorderPainted(false);
    btnPrevImg.setFocusPainted(false);
    btnPrevImg.setName("btnPrevImg"); // NOI18N
    btnPrevImg.addActionListener(formListener);
    gridBagConstraints = new GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    pnlCtrlBtn.add(btnPrevImg, gridBagConstraints);

    btnNextImg.setIcon(new ImageIcon(getClass().getResource("/res/arrow-right.png"))); // NOI18N
    Mnemonics.setLocalizedText(btnNextImg,
            NbBundle.getMessage(WebDavPicturePanel.class, "WebDavPicturePanel.btnNextImg.text")); // NOI18N
    btnNextImg.setBorderPainted(false);
    btnNextImg.setFocusPainted(false);
    btnNextImg.setName("btnNextImg"); // NOI18N
    btnNextImg.addActionListener(formListener);
    gridBagConstraints = new GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    pnlCtrlBtn.add(btnNextImg, gridBagConstraints);

    gridBagConstraints = new GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = GridBagConstraints.BOTH;
    gridBagConstraints.insets = new Insets(0, 10, 10, 10);
    jPanel3.add(pnlCtrlBtn, gridBagConstraints);

    gridBagConstraints = new GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    pnlVorschau.add(jPanel3, gridBagConstraints);

    gridBagConstraints = new GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.gridheight = 2;
    gridBagConstraints.fill = GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.insets = new Insets(0, 5, 0, 0);
    add(pnlVorschau, gridBagConstraints);

    bindingGroup.bind();
}