Example usage for javax.swing GroupLayout PREFERRED_SIZE

List of usage examples for javax.swing GroupLayout PREFERRED_SIZE

Introduction

In this page you can find the example usage for javax.swing GroupLayout PREFERRED_SIZE.

Prototype

int PREFERRED_SIZE

To view the source code for javax.swing GroupLayout PREFERRED_SIZE.

Click Source Link

Document

Indicates the preferred size from the component or gap should be used for a particular range value.

Usage

From source file:org.opendatakit.briefcase.ui.MainBriefcaseWindow.java

/**
 * Create the application./*from  w ww. j  ava 2s.  c  o  m*/
 */
public MainBriefcaseWindow() {
    frame = new JFrame();
    frame.setBounds(100, 100, 680, 595);
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    frame.addWindowListener(new WindowListener() {
        @Override
        public void windowOpened(WindowEvent e) {
        }

        @Override
        public void windowClosing(WindowEvent e) {
        }

        @Override
        public void windowClosed(WindowEvent e) {
        }

        @Override
        public void windowIconified(WindowEvent e) {
        }

        @Override
        public void windowDeiconified(WindowEvent e) {
        }

        @Override
        public void windowActivated(WindowEvent e) {
        }

        @Override
        public void windowDeactivated(WindowEvent e) {
        }
    });

    JLabel lblBriefcaseDirectory = new JLabel(MessageStrings.BRIEFCASE_STORAGE_LOCATION);

    txtBriefcaseDir = new JTextField();
    txtBriefcaseDir.setFocusable(false);
    txtBriefcaseDir.setEditable(false);
    txtBriefcaseDir.setColumns(10);

    btnChoose = new JButton("Change...");
    btnChoose.addActionListener(new FolderActionListener());

    tabbedPane = new JTabbedPane(JTabbedPane.TOP);
    GroupLayout groupLayout = new GroupLayout(frame.getContentPane());
    groupLayout.setHorizontalGroup(groupLayout.createParallelGroup(Alignment.LEADING).addGroup(groupLayout
            .createSequentialGroup().addContainerGap()
            .addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
                    .addComponent(tabbedPane, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 628,
                            Short.MAX_VALUE)
                    .addGroup(groupLayout.createSequentialGroup().addComponent(lblBriefcaseDirectory).addGap(18)
                            .addComponent(txtBriefcaseDir, GroupLayout.DEFAULT_SIZE, 362, Short.MAX_VALUE)
                            .addGap(18).addComponent(btnChoose)))
            .addContainerGap()));
    groupLayout.setVerticalGroup(groupLayout.createParallelGroup(Alignment.LEADING)
            .addGroup(groupLayout.createSequentialGroup().addContainerGap()
                    .addGroup(groupLayout.createParallelGroup(Alignment.BASELINE)
                            .addComponent(txtBriefcaseDir, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE)
                            .addComponent(btnChoose).addComponent(lblBriefcaseDirectory))
                    .addGap(33).addComponent(tabbedPane, GroupLayout.DEFAULT_SIZE, 446, Short.MAX_VALUE)
                    .addContainerGap()));

    gatherPanel = new PullTransferPanel(transferTerminationFuture);
    tabbedPane.addTab(PullTransferPanel.TAB_NAME, null, gatherPanel, null);
    PullTransferPanel.TAB_POSITION = 0;

    uploadPanel = new PushTransferPanel(transferTerminationFuture);
    tabbedPane.addTab(PushTransferPanel.TAB_NAME, null, uploadPanel, null);
    PushTransferPanel.TAB_POSITION = 1;

    exportPanel = new ExportPanel(exportTerminationFuture);
    tabbedPane.addTab(ExportPanel.TAB_NAME, null, exportPanel, null);
    frame.getContentPane().setLayout(groupLayout);
    ExportPanel.TAB_POSITION = 2;

    frame.addWindowListener(this);
    setFullUIEnabled(false);

    frame.setFocusTraversalPolicy(new FocusTraversalPolicy() {

        @Override
        public Component getComponentAfter(Container arg0, Component arg1) {
            ArrayList<Component> componentOrdering = new ArrayList<Component>();
            for (;;) {
                int nextPanel = PullTransferPanel.TAB_POSITION;
                componentOrdering.clear();
                componentOrdering.add(txtBriefcaseDir);
                componentOrdering.add(btnChoose);
                componentOrdering.add(tabbedPane);
                int idx = tabbedPane.getSelectedIndex();
                if (idx == PullTransferPanel.TAB_POSITION) {
                    componentOrdering.addAll(gatherPanel.getTraversalOrdering());
                    nextPanel = PushTransferPanel.TAB_POSITION;
                } else if (idx == PushTransferPanel.TAB_POSITION) {
                    componentOrdering.addAll(uploadPanel.getTraversalOrdering());
                    nextPanel = ExportPanel.TAB_POSITION;
                } else if (idx == ExportPanel.TAB_POSITION) {
                    componentOrdering.addAll(exportPanel.getTraversalOrdering());
                    nextPanel = PullTransferPanel.TAB_POSITION;
                }
                componentOrdering.add(btnChoose);
                boolean found = false;
                for (int i = 0; i < componentOrdering.size() - 1; ++i) {
                    if (found || arg1 == componentOrdering.get(i)) {
                        found = true;
                        Component comp = componentOrdering.get(i + 1);
                        if (comp == tabbedPane) {
                            return comp;
                        }
                        if (comp.isVisible() && comp.isEnabled()
                                && (!(comp instanceof JTextField) || ((JTextField) comp).isEditable())) {
                            return comp;
                        }
                    }
                }
                if (!found) {
                    return componentOrdering.get(0);
                }
                tabbedPane.setSelectedIndex(nextPanel);
            }
        }

        @Override
        public Component getComponentBefore(Container arg0, Component arg1) {
            ArrayList<Component> componentOrdering = new ArrayList<Component>();
            for (;;) {
                int nextPanel = PullTransferPanel.TAB_POSITION;
                componentOrdering.clear();
                componentOrdering.add(txtBriefcaseDir);
                componentOrdering.add(btnChoose);
                componentOrdering.add(tabbedPane);
                int idx = tabbedPane.getSelectedIndex();
                if (idx == PullTransferPanel.TAB_POSITION) {
                    componentOrdering.addAll(gatherPanel.getTraversalOrdering());
                    nextPanel = ExportPanel.TAB_POSITION;
                } else if (idx == PushTransferPanel.TAB_POSITION) {
                    componentOrdering.addAll(uploadPanel.getTraversalOrdering());
                    nextPanel = PullTransferPanel.TAB_POSITION;
                } else if (idx == ExportPanel.TAB_POSITION) {
                    componentOrdering.addAll(exportPanel.getTraversalOrdering());
                    nextPanel = PushTransferPanel.TAB_POSITION;
                }
                componentOrdering.add(btnChoose);
                boolean found = false;
                for (int i = componentOrdering.size() - 1; i > 0; --i) {
                    if (found || arg1 == componentOrdering.get(i)) {
                        found = true;
                        Component comp = componentOrdering.get(i - 1);
                        if (comp == tabbedPane) {
                            return comp;
                        }
                        if (comp.isVisible() && comp.isEnabled()
                                && (!(comp instanceof JTextField) || ((JTextField) comp).isEditable())) {
                            return comp;
                        }
                    }
                }
                if (!found) {
                    return componentOrdering.get(componentOrdering.size() - 1);
                }
                tabbedPane.setSelectedIndex(nextPanel);
            }
        }

        @Override
        public Component getDefaultComponent(Container arg0) {
            return btnChoose;
        }

        @Override
        public Component getFirstComponent(Container arg0) {
            return btnChoose;
        }

        @Override
        public Component getLastComponent(Container arg0) {
            return tabbedPane;
        }
    });
}

From source file:org.opendatakit.briefcase.ui.MainFormUploaderWindow.java

/**
 * Initialize the contents of the frame.
 *///from  w  w  w  .  j  a  va2  s .c o  m
private void initialize() {
    frame = new JFrame();
    frame.setBounds(100, 100, 680, 206);
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    JLabel lblFormDefinitionFile = new JLabel("Form Definition to upload:");

    txtFormDefinitionFile = new JTextField();
    txtFormDefinitionFile.setFocusable(false);
    txtFormDefinitionFile.setEditable(false);
    txtFormDefinitionFile.setColumns(10);

    btnChoose = new JButton("Choose...");
    btnChoose.addActionListener(new FormDefinitionActionListener());

    txtDestinationName = new JTextField();
    txtDestinationName.setFocusable(false);
    txtDestinationName.setEditable(false);
    txtDestinationName.setColumns(10);

    btnChooseServer = new JButton("Configure...");
    btnChooseServer.addActionListener(new DestinationActionListener());

    lblUploading = new JLabel("");

    btnDetails = new JButton("Details...");
    btnDetails.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent e) {
            if (fs != null) {
                ScrollingStatusListDialog.showDialog(MainFormUploaderWindow.this.frame, fs.getFormDefinition(),
                        fs.getStatusHistory());
            }
        }
    });

    btnUploadForm = new JButton("Upload Form");
    btnUploadForm.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent e) {
            setActiveTransferState(true);
            File formDefn = new File(txtFormDefinitionFile.getText());
            TransferAction.uploadForm(MainFormUploaderWindow.this.frame.getOwner(), destinationServerInfo,
                    terminationFuture, formDefn, fs);
        }
    });

    btnCancel = new JButton("Cancel");
    btnCancel.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent arg0) {
            terminationFuture.markAsCancelled(new TransferAbortEvent("Form upload cancelled by user."));
        }
    });

    btnClose = new JButton("Close");
    btnClose.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            if (transferStateActive) {
                if (JOptionPane.YES_OPTION != JOptionPane.showOptionDialog(frame,
                        "An upload is in progress. Are you sure you want to abort and exit?",
                        "Confirm Stop Form Upload", JOptionPane.YES_NO_OPTION, JOptionPane.ERROR_MESSAGE, null,
                        null, null)) {
                    return; // no-op
                }
                terminationFuture.markAsCancelled(new TransferAbortEvent("User closes window"));
            }
            frame.setVisible(false);
            frame.dispose();
            System.exit(0);
        }
    });

    JLabel lblUploadToServer = new JLabel("Upload to server:");

    GroupLayout groupLayout = new GroupLayout(frame.getContentPane());
    groupLayout.setHorizontalGroup(groupLayout.createSequentialGroup().addContainerGap()
            .addGroup(groupLayout.createParallelGroup(Alignment.LEADING).addComponent(lblFormDefinitionFile)
                    .addComponent(lblUploadToServer).addComponent(lblUploading))
            .addPreferredGap(ComponentPlacement.RELATED)
            .addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
                    .addComponent(txtFormDefinitionFile, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE,
                            Short.MAX_VALUE)
                    .addComponent(txtDestinationName, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE,
                            Short.MAX_VALUE)
                    .addGroup(Alignment.TRAILING,
                            groupLayout.createSequentialGroup().addComponent(btnDetails)
                                    .addPreferredGap(ComponentPlacement.RELATED).addComponent(btnUploadForm)
                                    .addPreferredGap(ComponentPlacement.RELATED).addComponent(btnCancel)))
            .addPreferredGap(ComponentPlacement.RELATED)
            .addGroup(groupLayout.createParallelGroup(Alignment.TRAILING)
                    .addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
                            .addComponent(btnChoose, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE,
                                    Short.MAX_VALUE)
                            .addComponent(btnChooseServer, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.PREFERRED_SIZE, Short.MAX_VALUE))
                    .addComponent(btnClose))
            .addContainerGap());
    groupLayout.setVerticalGroup(groupLayout.createParallelGroup(Alignment.LEADING)
            .addGroup(groupLayout.createSequentialGroup().addContainerGap()
                    .addGroup(groupLayout.createParallelGroup(Alignment.BASELINE)
                            .addComponent(txtFormDefinitionFile, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblFormDefinitionFile).addComponent(btnChoose))
                    .addPreferredGap(ComponentPlacement.RELATED)
                    .addGroup(
                            groupLayout.createParallelGroup(Alignment.BASELINE).addComponent(lblUploadToServer)
                                    .addComponent(txtDestinationName, GroupLayout.PREFERRED_SIZE,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                                    .addComponent(btnChooseServer))
                    .addPreferredGap(ComponentPlacement.UNRELATED, 10, Short.MAX_VALUE)
                    .addGroup(groupLayout.createParallelGroup(Alignment.BASELINE).addComponent(lblUploading)
                            .addComponent(btnDetails).addComponent(btnUploadForm).addComponent(btnCancel)
                            .addComponent(btnClose))
                    .addContainerGap()));

    frame.getContentPane().setLayout(groupLayout);
    setActiveTransferState(false);
}

From source file:org.optaplanner.examples.cloudbalancing.swingui.CloudBalancingPanel.java

public CloudBalancingPanel() {
    cloudComputerIcon = new ImageIcon(getClass().getResource("cloudComputer.png"));
    deleteCloudComputerIcon = new ImageIcon(getClass().getResource("deleteCloudComputer.png"));
    GroupLayout layout = new GroupLayout(this);
    setLayout(layout);//from w  w w  . j a  va  2s .c  o  m
    JPanel headerPanel = createHeaderPanel();
    JPanel computersPanel = createComputersPanel();
    layout.setHorizontalGroup(
            layout.createParallelGroup().addComponent(headerPanel).addComponent(computersPanel));
    layout.setVerticalGroup(layout.createSequentialGroup()
            .addComponent(headerPanel, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE,
                    GroupLayout.PREFERRED_SIZE)
            .addComponent(computersPanel, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE,
                    GroupLayout.PREFERRED_SIZE));
}

From source file:org.panbox.desktop.common.gui.PairNewDeviceDialog.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.//from  w w  w  .  j av  a  2  s. c  o m
 */
// <editor-fold defaultstate="collapsed"
// desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    pairingPanel = new javax.swing.JPanel();
    pairingQrCodePanel = new javax.swing.JPanel();
    pairingPasswordField = new javax.swing.JTextField();
    pairingModeSelectionComboBox = new javax.swing.JComboBox<>();
    cancelPairingButton = new javax.swing.JButton();
    statusInfoLabel = new javax.swing.JLabel();
    qrCode = new javax.swing.JLabel();

    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
    setTitle(bundle.getString("client.deviceList.devicepairing.title"));
    setResizable(false);

    pairingPanel.setMaximumSize(new java.awt.Dimension(390, 330));
    pairingPanel.setMinimumSize(new java.awt.Dimension(390, 330));

    pairingQrCodePanel.setLayout(new java.awt.GridLayout(1, 1));
    pairingQrCodePanel.add(qrCode);

    pairingPasswordField.setText("");
    pairingPasswordField.setEditable(false);

    pairingModeSelectionComboBox.setModel(new javax.swing.DefaultComboBoxModel<>(
            new String[] { bundle.getString("client.deviceList.devicepairing.slave"),
                    bundle.getString("client.deviceList.devicepairing.master") }));
    pairingModeSelectionComboBox.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            pairingModeSelectionComboBoxActionPerformed(evt);
        }
    });

    statusInfoLabel.setText("");

    javax.swing.GroupLayout pairingPanelLayout = new javax.swing.GroupLayout(pairingPanel);
    pairingPanel.setLayout(pairingPanelLayout);
    pairingPanelLayout.setHorizontalGroup(pairingPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pairingPanelLayout.createSequentialGroup().addContainerGap()
                    .addGroup(pairingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(pairingModeSelectionComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE)
                            .addComponent(pairingQrCodePanel, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(pairingPasswordField, javax.swing.GroupLayout.DEFAULT_SIZE, 354,
                                    Short.MAX_VALUE))
                    .addContainerGap()));
    pairingPanelLayout.setVerticalGroup(pairingPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pairingPanelLayout.createSequentialGroup().addContainerGap()
                    .addComponent(pairingQrCodePanel, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(pairingPasswordField, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(pairingModeSelectionComboBox, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(331, Short.MAX_VALUE)));

    cancelPairingButton.setText(bundle.getString("client.cancel"));
    cancelPairingButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            cancelPairingButtonActionPerformed(evt);
        }
    });

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addContainerGap()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(pairingPanel, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addGroup(layout.createSequentialGroup()
                                    .addComponent(statusInfoLabel, javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(cancelPairingButton)))
                    .addContainerGap()));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup().addContainerGap()
                    .addComponent(pairingPanel, javax.swing.GroupLayout.DEFAULT_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(cancelPairingButton).addComponent(statusInfoLabel))
                    .addContainerGap()));

    pack();
}

From source file:org.piraso.ui.api.StackTraceFilterDialog.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./* www  . j  a  va  2 s  .  co m*/
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    jLabel1 = new javax.swing.JLabel();
    jScrollPane1 = new javax.swing.JScrollPane();
    jtable = new javax.swing.JTable();
    jPanel2 = new javax.swing.JPanel();
    btnAdd = new javax.swing.JButton();
    btnRemove = new javax.swing.JButton();
    btnEdit = new javax.swing.JButton();
    btnSave = new javax.swing.JButton();
    btnCancel = new javax.swing.JButton();

    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

    jLabel1.setText(org.openide.util.NbBundle.getMessage(StackTraceFilterDialog.class,
            "StackTraceFilterDialog.jLabel1.text_1")); // NOI18N

    jtable.setModel(tableModel);
    jScrollPane1.setViewportView(jtable);

    btnAdd.setText(org.openide.util.NbBundle.getMessage(StackTraceFilterDialog.class,
            "StackTraceFilterDialog.btnAdd.text_1")); // NOI18N
    btnAdd.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnAddActionPerformed(evt);
        }
    });

    btnRemove.setText(org.openide.util.NbBundle.getMessage(StackTraceFilterDialog.class,
            "StackTraceFilterDialog.btnRemove.text_1")); // NOI18N
    btnRemove.setEnabled(false);
    btnRemove.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnRemoveActionPerformed(evt);
        }
    });

    btnEdit.setText(org.openide.util.NbBundle.getMessage(StackTraceFilterDialog.class,
            "StackTraceFilterDialog.btnEdit.text_1")); // NOI18N
    btnEdit.setEnabled(false);
    btnEdit.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnEditActionPerformed(evt);
        }
    });

    org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2);
    jPanel2.setLayout(jPanel2Layout);
    jPanel2Layout.setHorizontalGroup(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(btnAdd, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 106,
                    org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
            .add(btnRemove, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 106,
                    org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
            .add(btnEdit, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 106,
                    org.jdesktop.layout.GroupLayout.PREFERRED_SIZE));
    jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel2Layout.createSequentialGroup().add(btnAdd).add(1, 1, 1).add(btnRemove)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED,
                            org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(btnEdit).addContainerGap()));

    btnSave.setText(org.openide.util.NbBundle.getMessage(StackTraceFilterDialog.class,
            "StackTraceFilterDialog.btnSave.text_1")); // NOI18N
    btnSave.setEnabled(false);
    btnSave.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnSaveActionPerformed(evt);
        }
    });

    btnCancel.setText(org.openide.util.NbBundle.getMessage(StackTraceFilterDialog.class,
            "StackTraceFilterDialog.btnCancel.text_1")); // NOI18N
    btnCancel.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnCancelActionPerformed(evt);
        }
    });

    org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(layout
            .createSequentialGroup()
            .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(layout
                    .createSequentialGroup().add(14, 14, 14)
                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(layout.createSequentialGroup().add(jLabel1).add(0, 0, Short.MAX_VALUE))
                            .add(org.jdesktop.layout.GroupLayout.TRAILING,
                                    layout.createSequentialGroup()
                                            .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                                                    0, Short.MAX_VALUE)
                                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                            .add(jPanel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                                                    org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                                                    org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))
                    .add(org.jdesktop.layout.GroupLayout.TRAILING,
                            layout.createSequentialGroup().addContainerGap(291, Short.MAX_VALUE).add(btnSave)
                                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED).add(btnCancel)))
            .addContainerGap()));
    layout.setVerticalGroup(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(layout
            .createSequentialGroup().addContainerGap().add(jLabel1)
            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
            .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jPanel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                            org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                            org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 206, Short.MAX_VALUE))
            .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED).add(layout
                    .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(btnCancel).add(btnSave))
            .add(12, 12, 12)));

    pack();
}

From source file:org.piraso.ui.api.WorkingSetDialog.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() {

    jLabel1 = new javax.swing.JLabel();
    jScrollPane1 = new javax.swing.JScrollPane();
    jtable = new javax.swing.JTable();
    jPanel2 = new javax.swing.JPanel();
    btnAdd = new javax.swing.JButton();
    btnRemove = new javax.swing.JButton();
    btnEdit = new javax.swing.JButton();
    btnSave = new javax.swing.JButton();
    btnCancel = new javax.swing.JButton();

    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

    jLabel1.setText(
            org.openide.util.NbBundle.getMessage(WorkingSetDialog.class, "WorkingSetDialog.jLabel1.text_1")); // NOI18N

    jtable.setModel(tableModel);
    jScrollPane1.setViewportView(jtable);

    btnAdd.setText(
            org.openide.util.NbBundle.getMessage(WorkingSetDialog.class, "WorkingSetDialog.btnAdd.text_1")); // NOI18N
    btnAdd.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnAddActionPerformed(evt);
        }
    });

    btnRemove.setText(
            org.openide.util.NbBundle.getMessage(WorkingSetDialog.class, "WorkingSetDialog.btnRemove.text_1")); // NOI18N
    btnRemove.setEnabled(false);
    btnRemove.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnRemoveActionPerformed(evt);
        }
    });

    btnEdit.setText(
            org.openide.util.NbBundle.getMessage(WorkingSetDialog.class, "WorkingSetDialog.btnEdit.text_1")); // NOI18N
    btnEdit.setEnabled(false);
    btnEdit.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnEditActionPerformed(evt);
        }
    });

    org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2);
    jPanel2.setLayout(jPanel2Layout);
    jPanel2Layout.setHorizontalGroup(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(btnAdd, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 106,
                    org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
            .add(btnRemove, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 106,
                    org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
            .add(btnEdit, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 106,
                    org.jdesktop.layout.GroupLayout.PREFERRED_SIZE));
    jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel2Layout.createSequentialGroup().add(btnAdd).add(1, 1, 1).add(btnRemove)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED,
                            org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(btnEdit).addContainerGap()));

    btnSave.setText(
            org.openide.util.NbBundle.getMessage(WorkingSetDialog.class, "WorkingSetDialog.btnSave.text_1")); // NOI18N
    btnSave.setEnabled(false);
    btnSave.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnSaveActionPerformed(evt);
        }
    });

    btnCancel.setText(
            org.openide.util.NbBundle.getMessage(WorkingSetDialog.class, "WorkingSetDialog.btnCancel.text_1")); // NOI18N
    btnCancel.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnCancelActionPerformed(evt);
        }
    });

    org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(layout
            .createSequentialGroup()
            .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(layout
                    .createSequentialGroup().add(14, 14, 14)
                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(layout.createSequentialGroup().add(jLabel1).add(0, 0, Short.MAX_VALUE))
                            .add(org.jdesktop.layout.GroupLayout.TRAILING,
                                    layout.createSequentialGroup()
                                            .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                                                    0, Short.MAX_VALUE)
                                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                            .add(jPanel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                                                    org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                                                    org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))
                    .add(org.jdesktop.layout.GroupLayout.TRAILING,
                            layout.createSequentialGroup().addContainerGap(291, Short.MAX_VALUE).add(btnSave)
                                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED).add(btnCancel)))
            .addContainerGap()));
    layout.setVerticalGroup(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(layout
            .createSequentialGroup().addContainerGap().add(jLabel1)
            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
            .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jPanel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                            org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                            org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 206, Short.MAX_VALUE))
            .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED).add(layout
                    .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(btnCancel).add(btnSave))
            .add(12, 12, 12)));

    pack();
}

From source file:org.piraso.ui.base.ContextMonitorDialog.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  . ja  va2 s.  co m
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    buttonGroup1 = new javax.swing.ButtonGroup();
    btnClose = new javax.swing.JButton();
    jSplitPane1 = new javax.swing.JSplitPane();
    jPanel2 = new javax.swing.JPanel();
    jLabel1 = new javax.swing.JLabel();
    jScrollPane1 = new javax.swing.JScrollPane();
    lstMonitors = new javax.swing.JList();
    chkWorkingSet = new javax.swing.JCheckBox();
    jPanel3 = new javax.swing.JPanel();
    txtName = new javax.swing.JTextField();
    jPanel1 = new javax.swing.JPanel();
    btnSave = new javax.swing.JButton();
    btnRemove = new javax.swing.JButton();
    btnClear = new javax.swing.JButton();
    jtab = new javax.swing.JTabbedPane();
    jLabel4 = new javax.swing.JLabel();
    txtAddr = new javax.swing.JTextField();
    rdoOthers = new javax.swing.JRadioButton();
    jLabel3 = new javax.swing.JLabel();
    jLabel2 = new javax.swing.JLabel();
    rdoMyAddress = new javax.swing.JRadioButton();
    cboHost = new javax.swing.JComboBox();
    deleteAll = new javax.swing.JButton();

    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

    btnClose.setText(org.openide.util.NbBundle.getMessage(ContextMonitorDialog.class,
            "ContextMonitorDialog.btnClose.text")); // NOI18N
    btnClose.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnCloseActionPerformed(evt);
        }
    });

    jSplitPane1.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));
    jSplitPane1.setDividerLocation(300);
    jSplitPane1.setDividerSize(5);

    jLabel1.setText(org.openide.util.NbBundle.getMessage(ContextMonitorDialog.class,
            "ContextMonitorDialog.jLabel1.text")); // NOI18N

    lstMonitors.setModel(new javax.swing.AbstractListModel() {
        String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };

        public int getSize() {
            return strings.length;
        }

        public Object getElementAt(int i) {
            return strings[i];
        }
    });
    jScrollPane1.setViewportView(lstMonitors);

    chkWorkingSet.setSelected(true);
    chkWorkingSet.setText(org.openide.util.NbBundle.getMessage(ContextMonitorDialog.class,
            "ContextMonitorDialog.chkWorkingSet.text")); // NOI18N
    chkWorkingSet.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            chkWorkingSetActionPerformed(evt);
        }
    });

    org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2);
    jPanel2.setLayout(jPanel2Layout);
    jPanel2Layout.setHorizontalGroup(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel2Layout.createSequentialGroup().addContainerGap()
                    .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(jPanel2Layout.createSequentialGroup().add(6, 6, 6).add(jScrollPane1,
                                    org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 280, Short.MAX_VALUE))
                            .add(jLabel1).add(chkWorkingSet))
                    .add(7, 7, 7)));
    jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel2Layout.createSequentialGroup().addContainerGap().add(jLabel1)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 520, Short.MAX_VALUE)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED).add(chkWorkingSet)
                    .addContainerGap()));

    jSplitPane1.setLeftComponent(jPanel2);

    txtName.setText(org.openide.util.NbBundle.getMessage(ContextMonitorDialog.class,
            "ContextMonitorDialog.txtName.text")); // NOI18N

    btnSave.setText(org.openide.util.NbBundle.getMessage(ContextMonitorDialog.class,
            "ContextMonitorDialog.btnSave.text")); // NOI18N
    btnSave.setEnabled(false);
    btnSave.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnSaveActionPerformed(evt);
        }
    });

    btnRemove.setText(org.openide.util.NbBundle.getMessage(ContextMonitorDialog.class,
            "ContextMonitorDialog.btnRemove.text")); // NOI18N
    btnRemove.setEnabled(false);
    btnRemove.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnRemoveActionPerformed(evt);
        }
    });

    btnClear.setText(org.openide.util.NbBundle.getMessage(ContextMonitorDialog.class,
            "ContextMonitorDialog.btnClear.text")); // NOI18N
    btnClear.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnClearActionPerformed(evt);
        }
    });

    org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(btnSave, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 106,
                    org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
            .add(btnRemove, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 106,
                    org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
            .add(btnClear, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 106,
                    org.jdesktop.layout.GroupLayout.PREFERRED_SIZE));
    jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel1Layout.createSequentialGroup().add(btnSave).add(1, 1, 1).add(btnRemove)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED,
                            org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(btnClear).addContainerGap()));

    jLabel4.setText(org.openide.util.NbBundle.getMessage(ContextMonitorDialog.class,
            "ContextMonitorDialog.jLabel4.text")); // NOI18N

    txtAddr.setText(org.openide.util.NbBundle.getMessage(ContextMonitorDialog.class,
            "ContextMonitorDialog.txtAddr.text")); // NOI18N
    txtAddr.setEnabled(false);

    buttonGroup1.add(rdoOthers);
    rdoOthers.setText(org.openide.util.NbBundle.getMessage(ContextMonitorDialog.class,
            "ContextMonitorDialog.rdoOthers.text")); // NOI18N
    rdoOthers.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            rdoOthersActionPerformed(evt);
        }
    });

    jLabel3.setText(org.openide.util.NbBundle.getMessage(ContextMonitorDialog.class,
            "ContextMonitorDialog.jLabel3.text")); // NOI18N

    jLabel2.setText(org.openide.util.NbBundle.getMessage(ContextMonitorDialog.class,
            "ContextMonitorDialog.jLabel2.text")); // NOI18N

    buttonGroup1.add(rdoMyAddress);
    rdoMyAddress.setSelected(true);
    rdoMyAddress.setText(org.openide.util.NbBundle.getMessage(ContextMonitorDialog.class,
            "ContextMonitorDialog.rdoMyAddress.text")); // NOI18N
    rdoMyAddress.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            rdoMyAddressActionPerformed(evt);
        }
    });

    cboHost.setEditable(true);
    cboHost.setModel(
            new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

    org.jdesktop.layout.GroupLayout jPanel3Layout = new org.jdesktop.layout.GroupLayout(jPanel3);
    jPanel3.setLayout(jPanel3Layout);
    jPanel3Layout.setHorizontalGroup(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel3Layout.createSequentialGroup().add(jPanel3Layout
                    .createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(jPanel3Layout.createSequentialGroup().add(jLabel3)
                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED).add(rdoMyAddress)
                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED).add(rdoOthers)
                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                            .add(txtAddr, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 223, Short.MAX_VALUE))
                    .add(jPanel3Layout.createSequentialGroup()
                            .add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                    .add(jLabel4).add(jLabel2))
                            .add(18, 18, 18)
                            .add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                    .add(cboHost, 0, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                                            Short.MAX_VALUE)
                                    .add(txtName))))
                    .add(10, 10, 10)
                    .add(jPanel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                            org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                            org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(9, 9, 9))
            .add(jtab));
    jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel3Layout.createSequentialGroup().add(23, 23, 23).add(jPanel3Layout
                    .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jPanel3Layout.createSequentialGroup()
                            .add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                                    .add(jLabel4).add(txtName, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                                            org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                                            org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                            .add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                                    .add(jLabel2).add(cboHost, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                                            org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                                            org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                            .add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                                    .add(rdoMyAddress).add(rdoOthers)
                                    .add(txtAddr, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                                            org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                                            org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                    .add(jLabel3)))
                    .add(jPanel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                            org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                            org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(jtab, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 448, Short.MAX_VALUE)
                    .addContainerGap()));

    jSplitPane1.setRightComponent(jPanel3);

    deleteAll.setText(org.openide.util.NbBundle.getMessage(ContextMonitorDialog.class,
            "ContextMonitorDialog.deleteAll.text")); // NOI18N
    deleteAll.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            deleteAllActionPerformed(evt);
        }
    });

    org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup().addContainerGap()
                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(jSplitPane1)
                            .add(layout.createSequentialGroup().add(6, 6, 6).add(deleteAll)
                                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED,
                                            org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .add(btnClose)))
                    .addContainerGap()));
    layout.setVerticalGroup(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(layout
            .createSequentialGroup().addContainerGap().add(jSplitPane1)
            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED).add(layout
                    .createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE).add(btnClose).add(deleteAll))
            .add(8, 8, 8)));

    pack();
}

From source file:org.piraso.ui.base.ExportDialog.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./*from w w  w . j a  v a 2s. co m*/
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    jLabel1 = new javax.swing.JLabel();
    jScrollPane1 = new javax.swing.JScrollPane();
    jtable = new javax.swing.JTable();
    jLabel2 = new javax.swing.JLabel();
    txtTargetFile = new javax.swing.JTextField();
    btnBrowse = new javax.swing.JButton();
    btnExport = new javax.swing.JButton();
    btnCancel = new javax.swing.JButton();

    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

    jLabel1.setText(org.openide.util.NbBundle.getMessage(ExportDialog.class, "ExportDialog.jLabel1.text")); // NOI18N

    jtable.setModel(tableModel);
    jScrollPane1.setViewportView(jtable);

    jLabel2.setText(org.openide.util.NbBundle.getMessage(ExportDialog.class, "ExportDialog.jLabel2.text")); // NOI18N

    txtTargetFile.setEditable(false);
    txtTargetFile.setText(
            org.openide.util.NbBundle.getMessage(ExportDialog.class, "ExportDialog.txtTargetFile.text")); // NOI18N

    btnBrowse.setText(org.openide.util.NbBundle.getMessage(ExportDialog.class, "ExportDialog.btnBrowse.text")); // NOI18N
    btnBrowse.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnBrowseActionPerformed(evt);
        }
    });

    btnExport.setText(org.openide.util.NbBundle.getMessage(ExportDialog.class, "ExportDialog.btnExport.text")); // NOI18N
    btnExport.setEnabled(false);
    btnExport.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnExportActionPerformed(evt);
        }
    });

    btnCancel.setText(org.openide.util.NbBundle.getMessage(ExportDialog.class, "ExportDialog.btnCancel.text")); // NOI18N
    btnCancel.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnCancelActionPerformed(evt);
        }
    });

    org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(layout
            .createSequentialGroup().add(12, 12, 12)
            .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(layout.createSequentialGroup().add(jLabel1).addContainerGap())
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup().add(layout
                            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(layout.createSequentialGroup().add(jLabel2)
                                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED).add(txtTargetFile)
                                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED).add(btnBrowse))
                            .add(jScrollPane1)).add(12, 12, 12))))
            .add(org.jdesktop.layout.GroupLayout.TRAILING,
                    layout.createSequentialGroup().addContainerGap(392, Short.MAX_VALUE).add(btnExport)
                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED).add(btnCancel)
                            .addContainerGap()));
    layout.setVerticalGroup(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup().add(7, 7, 7)
                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE).add(jLabel2)
                            .add(txtTargetFile, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                                    org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                                    org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .add(btnBrowse))
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED).add(jLabel1)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 298, Short.MAX_VALUE)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(btnCancel)
                            .add(btnExport))
                    .addContainerGap()));

    pack();
}

From source file:org.piraso.ui.base.ImportDialog.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./*from  ww  w  .ja va  2 s  .c  om*/
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    jLabel1 = new javax.swing.JLabel();
    jScrollPane1 = new javax.swing.JScrollPane();
    jtable = new javax.swing.JTable();
    jLabel2 = new javax.swing.JLabel();
    txtSourceFile = new javax.swing.JTextField();
    btnBrowse = new javax.swing.JButton();
    btnImport = new javax.swing.JButton();
    btnCancel = new javax.swing.JButton();

    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

    jLabel1.setText(org.openide.util.NbBundle.getMessage(ImportDialog.class, "ImportDialog.jLabel1.text")); // NOI18N

    jtable.setModel(tableModel);
    jScrollPane1.setViewportView(jtable);

    jLabel2.setText(org.openide.util.NbBundle.getMessage(ImportDialog.class, "ImportDialog.jLabel2.text")); // NOI18N

    txtSourceFile.setEditable(false);
    txtSourceFile.setText(
            org.openide.util.NbBundle.getMessage(ImportDialog.class, "ImportDialog.txtSourceFile.text")); // NOI18N

    btnBrowse.setText(org.openide.util.NbBundle.getMessage(ImportDialog.class, "ImportDialog.btnBrowse.text")); // NOI18N
    btnBrowse.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnBrowseActionPerformed(evt);
        }
    });

    btnImport.setText(org.openide.util.NbBundle.getMessage(ImportDialog.class, "ImportDialog.btnImport.text")); // NOI18N
    btnImport.setEnabled(false);
    btnImport.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnImportActionPerformed(evt);
        }
    });

    btnCancel.setText(org.openide.util.NbBundle.getMessage(ImportDialog.class, "ImportDialog.btnCancel.text")); // NOI18N
    btnCancel.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnCancelActionPerformed(evt);
        }
    });

    org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(layout
            .createSequentialGroup().add(12, 12, 12)
            .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(layout.createSequentialGroup().add(jLabel1).addContainerGap())
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup().add(layout
                            .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(layout.createSequentialGroup().add(jLabel2)
                                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED).add(txtSourceFile)
                                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED).add(btnBrowse))
                            .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 0,
                                    Short.MAX_VALUE))
                            .add(12, 12, 12))))
            .add(org.jdesktop.layout.GroupLayout.TRAILING,
                    layout.createSequentialGroup().addContainerGap(369, Short.MAX_VALUE).add(btnImport)
                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED).add(btnCancel)
                            .addContainerGap()));
    layout.setVerticalGroup(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup().add(7, 7, 7)
                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE).add(jLabel2)
                            .add(txtSourceFile, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                                    org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                                    org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .add(btnBrowse))
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED).add(jLabel1)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 277, Short.MAX_VALUE)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(btnCancel)
                            .add(btnImport))
                    .addContainerGap()));

    pack();
}

From source file:org.piraso.ui.base.OpenMonitorInstanceDialog.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  va 2  s.c  o m
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    btnBrowse = new javax.swing.JButton();
    txtSourceFile = new javax.swing.JTextField();
    jLabel2 = new javax.swing.JLabel();
    btnOpen = new javax.swing.JButton();
    btnCancel = new javax.swing.JButton();

    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

    btnBrowse.setText(org.openide.util.NbBundle.getMessage(OpenMonitorInstanceDialog.class,
            "OpenMonitorInstanceDialog.btnBrowse.text")); // NOI18N
    btnBrowse.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnBrowseActionPerformed(evt);
        }
    });

    txtSourceFile.setEditable(false);
    txtSourceFile.setText(org.openide.util.NbBundle.getMessage(OpenMonitorInstanceDialog.class,
            "OpenMonitorInstanceDialog.txtSourceFile.text")); // NOI18N

    jLabel2.setText(org.openide.util.NbBundle.getMessage(OpenMonitorInstanceDialog.class,
            "OpenMonitorInstanceDialog.jLabel2.text")); // NOI18N

    btnOpen.setText(org.openide.util.NbBundle.getMessage(OpenMonitorInstanceDialog.class,
            "OpenMonitorInstanceDialog.btnOpen.text")); // NOI18N
    btnOpen.setEnabled(false);
    btnOpen.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnOpenActionPerformed(evt);
        }
    });

    btnCancel.setText(org.openide.util.NbBundle.getMessage(OpenMonitorInstanceDialog.class,
            "OpenMonitorInstanceDialog.btnCancel.text")); // NOI18N
    btnCancel.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnCancelActionPerformed(evt);
        }
    });

    org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(
            org.jdesktop.layout.GroupLayout.TRAILING,
            layout.createSequentialGroup().addContainerGap(298, Short.MAX_VALUE).add(btnOpen)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED).add(btnCancel).addContainerGap())
            .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(layout
                    .createSequentialGroup().addContainerGap().add(jLabel2)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                    .add(txtSourceFile, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 271, Short.MAX_VALUE)
                    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED).add(btnBrowse).add(12, 12, 12))));
    layout.setVerticalGroup(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup().addContainerGap(72, Short.MAX_VALUE)
                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(btnCancel)
                            .add(btnOpen))
                    .add(15, 15, 15))
            .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(layout
                    .createSequentialGroup().addContainerGap()
                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE).add(jLabel2)
                            .add(txtSourceFile, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
                                    org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
                                    org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .add(btnBrowse))
                    .addContainerGap(80, Short.MAX_VALUE))));

    pack();
}