Example usage for javax.swing JRadioButton JRadioButton

List of usage examples for javax.swing JRadioButton JRadioButton

Introduction

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

Prototype

public JRadioButton() 

Source Link

Document

Creates an initially unselected radio button with no set text.

Usage

From source file:com.sec.ose.osi.ui.frm.main.identification.stringmatch.JPanStringMatchMain.java

/**
 * This method initializes jRadioButton   
 *    // w w w .  j a v a 2s . co m
 * @return javax.swing.JRadioButton   
 */
private JRadioButton getJRadioButtonThisFileIs() {
    if (opt1ThisFileIs == null) {
        opt1ThisFileIs = new JRadioButton();
        opt1ThisFileIs.setText("This file is under exact one license.");
        opt1ThisFileIs.setFocusPainted(false);
        opt1ThisFileIs.addActionListener(new RadioThisFileIsAction());
    }
    return opt1ThisFileIs;
}

From source file:com.pos.spatobiz.app.view.karyawan.UbahKaryawan.java

/** This method is called from within the constructor to
 * initialize the form./*from   w w  w .  ja  v  a  2 s.  co m*/
 * WARNING: Do NOT modify this code. The content of this method is
 * always regenerated by the Form Editor.
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    jeniskelamin = new ButtonGroup();
    labelKode = new WhiteLabel();
    labelNama = new WhiteLabel();
    labelTanggalLahir = new WhiteLabel();
    labelAlamat = new WhiteLabel();
    textKode = new TextBoxTransfer();
    textNama = new TextBoxTransfer();
    textTanggalLahir = new DateBox();
    textAlamat = new WhiteTextArea();
    errorKode = new RedLabel();
    errorNama = new RedLabel();
    errorTanggalLahir = new RedLabel();
    errorAlamat = new RedLabel();
    textTelepon = new TextBoxTransfer();
    labelTelepon = new WhiteLabel();
    labelEmail = new WhiteLabel();
    labelJenisKelamin = new WhiteLabel();
    labelPhoto = new WhiteLabel();
    textEmail = new TextBoxTransfer();
    radioPria = new JRadioButton();
    radioWanita = new JRadioButton();
    errorTelepon = new RedLabel();
    errorEmail = new RedLabel();
    imageChooser = new ImageChooser();
    buttonBatal = new Button();
    buttonUbah = new Button();
    buttonCari = new Button();

    setBackground(new Color(0, 0, 0));

    labelKode.setHorizontalAlignment(SwingConstants.RIGHT);
    labelKode.setText("Kode :");

    labelNama.setHorizontalAlignment(SwingConstants.RIGHT);
    labelNama.setText("Nama :");

    labelTanggalLahir.setHorizontalAlignment(SwingConstants.RIGHT);
    labelTanggalLahir.setText("Tanggal Lahir :");

    labelAlamat.setHorizontalAlignment(SwingConstants.RIGHT);
    labelAlamat.setText("Alamat :");

    textTanggalLahir.setFormatterFactory(
            new DefaultFormatterFactory(new DateFormatter(DateFormat.getDateInstance(DateFormat.LONG))));
    textTanggalLahir.setPreferredSize(new Dimension(120, 24));
    textTanggalLahir.setValue(new Date());

    errorKode.setText("error kode");

    errorNama.setText("error nama");

    errorTanggalLahir.setText("error tanggal lahir");

    errorAlamat.setText("error alamat");

    labelTelepon.setHorizontalAlignment(SwingConstants.RIGHT);
    labelTelepon.setText("Telepon :");

    labelEmail.setHorizontalAlignment(SwingConstants.RIGHT);
    labelEmail.setText("Email :");

    labelJenisKelamin.setHorizontalAlignment(SwingConstants.RIGHT);
    labelJenisKelamin.setText("Jenis Kelamin :");

    labelPhoto.setHorizontalAlignment(SwingConstants.RIGHT);
    labelPhoto.setText("Photo :");

    jeniskelamin.add(radioPria);
    radioPria.setFont(new Font("Tahoma", 1, 11));
    radioPria.setForeground(new Color(255, 255, 255));
    radioPria.setSelected(true);
    radioPria.setText("Pria");
    radioPria.setOpaque(false);

    jeniskelamin.add(radioWanita);
    radioWanita.setFont(new Font("Tahoma", 1, 11));
    radioWanita.setForeground(new Color(255, 255, 255));
    radioWanita.setText("Wanita");
    radioWanita.setOpaque(false);

    errorTelepon.setText("error telepon");

    errorEmail.setText("error email");

    buttonBatal.setMnemonic('B');
    buttonBatal.setText("Batal");

    buttonUbah.setMnemonic('U');
    buttonUbah.setText("Ubah");

    buttonCari.setText("Cari");

    GroupLayout layout = new GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout
            .createSequentialGroup().addContainerGap()
            .addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(Alignment.TRAILING,
                    layout.createSequentialGroup().addGroup(layout.createParallelGroup(Alignment.LEADING)
                            .addGroup(layout.createParallelGroup(Alignment.TRAILING, false)
                                    .addComponent(labelPhoto, Alignment.LEADING, GroupLayout.DEFAULT_SIZE,
                                            GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(labelJenisKelamin, Alignment.LEADING,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(labelEmail, Alignment.LEADING, GroupLayout.DEFAULT_SIZE,
                                            GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addGroup(layout.createParallelGroup(Alignment.TRAILING, false)
                                    .addComponent(labelTelepon, GroupLayout.DEFAULT_SIZE,
                                            GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(labelTanggalLahir, Alignment.LEADING,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(labelAlamat, Alignment.LEADING, GroupLayout.DEFAULT_SIZE,
                                            GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(labelNama, Alignment.LEADING, GroupLayout.DEFAULT_SIZE,
                                            GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(labelKode, Alignment.LEADING, GroupLayout.DEFAULT_SIZE,
                                            GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                            .addPreferredGap(ComponentPlacement.RELATED)
                            .addGroup(layout.createParallelGroup(Alignment.TRAILING)
                                    .addComponent(textAlamat, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 403,
                                            Short.MAX_VALUE)
                                    .addComponent(textNama, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 403,
                                            Short.MAX_VALUE)
                                    .addComponent(textTanggalLahir, Alignment.LEADING, GroupLayout.DEFAULT_SIZE,
                                            403, Short.MAX_VALUE)
                                    .addComponent(textTelepon, GroupLayout.DEFAULT_SIZE, 403, Short.MAX_VALUE)
                                    .addGroup(Alignment.LEADING,
                                            layout.createSequentialGroup().addComponent(radioPria)
                                                    .addPreferredGap(ComponentPlacement.UNRELATED)
                                                    .addComponent(radioWanita))
                                    .addComponent(imageChooser, Alignment.LEADING, GroupLayout.PREFERRED_SIZE,
                                            253, GroupLayout.PREFERRED_SIZE)
                                    .addComponent(textEmail, GroupLayout.DEFAULT_SIZE, 403, Short.MAX_VALUE)
                                    .addGroup(layout.createSequentialGroup()
                                            .addComponent(textKode, GroupLayout.DEFAULT_SIZE, 339,
                                                    Short.MAX_VALUE)
                                            .addPreferredGap(ComponentPlacement.UNRELATED)
                                            .addComponent(buttonCari, GroupLayout.PREFERRED_SIZE,
                                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))
                            .addGap(4, 4, 4)
                            .addGroup(layout.createParallelGroup(Alignment.LEADING)
                                    .addComponent(errorKode, GroupLayout.PREFERRED_SIZE,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                                    .addComponent(errorNama, GroupLayout.PREFERRED_SIZE,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                                    .addComponent(errorTanggalLahir, GroupLayout.PREFERRED_SIZE,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                                    .addComponent(errorAlamat, GroupLayout.PREFERRED_SIZE,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                                    .addComponent(errorTelepon, GroupLayout.PREFERRED_SIZE,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                                    .addComponent(errorEmail, GroupLayout.PREFERRED_SIZE,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))
                    .addGroup(Alignment.TRAILING, layout.createSequentialGroup()
                            .addComponent(buttonUbah, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(ComponentPlacement.RELATED).addComponent(buttonBatal,
                                    GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE)))
            .addContainerGap()));
    layout.setVerticalGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout
            .createSequentialGroup().addContainerGap()
            .addGroup(layout.createParallelGroup(Alignment.BASELINE)
                    .addComponent(labelKode, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addComponent(textKode, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addComponent(errorKode, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addComponent(buttonCari, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE))
            .addPreferredGap(ComponentPlacement.UNRELATED)
            .addGroup(layout.createParallelGroup(Alignment.BASELINE)
                    .addComponent(labelNama, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addComponent(textNama, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addComponent(errorNama, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE))
            .addPreferredGap(ComponentPlacement.UNRELATED)
            .addGroup(layout.createParallelGroup(Alignment.BASELINE)
                    .addComponent(labelTanggalLahir, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addComponent(textTanggalLahir, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addComponent(errorTanggalLahir, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE))
            .addPreferredGap(ComponentPlacement.UNRELATED)
            .addGroup(layout.createParallelGroup(Alignment.LEADING)
                    .addComponent(labelAlamat, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addComponent(textAlamat, GroupLayout.PREFERRED_SIZE, 88, GroupLayout.PREFERRED_SIZE)
                    .addComponent(errorAlamat, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE))
            .addPreferredGap(ComponentPlacement.UNRELATED)
            .addGroup(layout.createParallelGroup(Alignment.BASELINE)
                    .addComponent(textTelepon, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addComponent(labelTelepon, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addComponent(errorTelepon, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE))
            .addPreferredGap(ComponentPlacement.UNRELATED)
            .addGroup(layout.createParallelGroup(Alignment.BASELINE)
                    .addComponent(labelEmail, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addComponent(textEmail, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addComponent(errorEmail, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE))
            .addPreferredGap(ComponentPlacement.UNRELATED)
            .addGroup(layout.createParallelGroup(Alignment.BASELINE)
                    .addComponent(labelJenisKelamin, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addComponent(radioPria).addComponent(radioWanita))
            .addPreferredGap(ComponentPlacement.UNRELATED)
            .addGroup(layout.createParallelGroup(Alignment.LEADING)
                    .addComponent(labelPhoto, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addComponent(imageChooser, GroupLayout.PREFERRED_SIZE, 189, GroupLayout.PREFERRED_SIZE))
            .addPreferredGap(ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(layout.createParallelGroup(Alignment.BASELINE)
                    .addComponent(buttonBatal, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addComponent(buttonUbah, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE))
            .addContainerGap()));
}

From source file:net.sf.jabref.gui.mergeentries.MergeEntries.java

/**
 * Main function for building the merge entry JPanel
 *///  ww  w.  j av  a2s  . c om
private void initialize() {
    doneBuilding = false;
    setupFields();

    // Fill diff mode combo box
    for (String diffText : DIFF_MODES) {
        diffMode.addItem(diffText);
    }
    diffMode.setSelectedIndex(Math.min(Globals.prefs.getInt(JabRefPreferences.MERGE_ENTRIES_DIFF_MODE),
            diffMode.getItemCount() - 1));
    diffMode.addActionListener(e -> {
        updateTextPanes(differentFields);
        storePreference();
    });

    // Create main layout
    String colSpecMain = "left:pref, 5px, center:3cm:grow, 5px, center:pref, 3px, center:pref, 3px, center:pref, 5px, center:3cm:grow";
    String colSpecMerge = "left:pref, 5px, fill:3cm:grow, 5px, center:pref, 3px, center:pref, 3px, center:pref, 5px, fill:3cm:grow";
    String rowSpec = "pref, pref, 10px, fill:5cm:grow, 10px, pref, 10px, fill:3cm:grow";
    StringBuilder rowBuilder = new StringBuilder("");
    for (int i = 0; i < allFields.size(); i++) {
        rowBuilder.append("pref, 2dlu, ");
    }
    rowBuilder.append("pref");

    JPanel mergePanel = new JPanel();
    FormLayout mainLayout = new FormLayout(colSpecMain, rowSpec);
    FormLayout mergeLayout = new FormLayout(colSpecMerge, rowBuilder.toString());
    mainPanel.setLayout(mainLayout);
    mergePanel.setLayout(mergeLayout);

    CellConstraints cc = new CellConstraints();

    mainPanel.add(boldFontLabel(Localization.lang("Use")), cc.xyw(4, 1, 7, "center, bottom"));
    mainPanel.add(diffMode, cc.xy(11, 1, "right, bottom"));

    // Set headings
    JLabel[] headingLabels = new JLabel[6];
    for (int i = 0; i < 6; i++) {
        headingLabels[i] = boldFontLabel(COLUMN_HEADINGS[i]);
        mainPanel.add(headingLabels[i], cc.xy(1 + (i * 2), 2));

    }

    mainPanel.add(new JSeparator(), cc.xyw(1, 3, 11));

    // Start with entry type
    mergePanel.add(boldFontLabel(Localization.lang("Entry type")), cc.xy(1, 1));

    JTextPane leftTypeDisplay = getStyledTextPane();
    leftTypeDisplay.setText(HTML_START + leftEntry.getType() + HTML_END);
    mergePanel.add(leftTypeDisplay, cc.xy(3, 1));
    if (leftEntry.getType().equals(rightEntry.getType())) {
        identicalTypes = true;
    } else {
        identicalTypes = false;
        ButtonGroup group = new ButtonGroup();
        typeRadioButtons = new ArrayList<>(2);
        for (int k = 0; k < 3; k += 2) {
            JRadioButton button = new JRadioButton();
            typeRadioButtons.add(button);
            group.add(button);
            mergePanel.add(button, cc.xy(5 + (k * 2), 1));
            button.addChangeListener(e -> updateAll());
        }
        typeRadioButtons.get(0).setSelected(true);
    }
    JTextPane rightTypeDisplay = getStyledTextPane();
    rightTypeDisplay.setText(HTML_START + rightEntry.getType() + HTML_END);
    mergePanel.add(rightTypeDisplay, cc.xy(11, 1));

    // For all fields in joint add a row and possibly radio buttons
    int row = 2;
    int maxLabelWidth = -1;
    for (String field : allFields) {
        JLabel label = boldFontLabel(new SentenceCaseFormatter().format(field));
        mergePanel.add(label, cc.xy(1, (2 * row) - 1, "left, top"));
        Optional<String> leftString = leftEntry.getFieldOptional(field);
        Optional<String> rightString = rightEntry.getFieldOptional(field);
        if (leftString.equals(rightString)) {
            identicalFields.add(field);
        } else {
            differentFields.add(field);
        }

        maxLabelWidth = Math.max(maxLabelWidth, label.getPreferredSize().width);

        // Left text pane
        if (leftString.isPresent()) {
            JTextPane tf = getStyledTextPane();
            mergePanel.add(tf, cc.xy(3, (2 * row) - 1, "f, f"));
            leftTextPanes.put(field, tf);
        }

        // Add radio buttons if the two entries do not have identical fields
        if (identicalFields.contains(field)) {
            mergedEntry.setField(field, leftString.get()); // Will only happen if both entries have the field and the content is identical
        } else {
            ButtonGroup group = new ButtonGroup();
            List<JRadioButton> list = new ArrayList<>(3);
            for (int k = 0; k < 3; k++) {
                JRadioButton button = new JRadioButton();
                group.add(button);
                mergePanel.add(button, cc.xy(5 + (k * 2), (2 * row) - 1));
                button.addChangeListener(e -> updateAll());
                list.add(button);
            }
            radioButtons.put(field, list);
            if (leftString.isPresent()) {
                list.get(0).setSelected(true);
                if (!rightString.isPresent()) {
                    list.get(2).setEnabled(false);
                }
            } else {
                list.get(0).setEnabled(false);
                list.get(2).setSelected(true);
            }
        }

        // Right text pane
        if (rightString.isPresent()) {
            JTextPane tf = getStyledTextPane();
            mergePanel.add(tf, cc.xy(11, (2 * row) - 1, "f, f"));
            rightTextPanes.put(field, tf);
        }
        row++;
    }

    scrollPane = new JScrollPane(mergePanel, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
            JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
    scrollPane.setBorder(BorderFactory.createEmptyBorder());
    updateTextPanes(allFields);
    mainPanel.add(scrollPane, cc.xyw(1, 4, 11));
    mainPanel.add(new JSeparator(), cc.xyw(1, 5, 11));

    // Synchronize column widths
    String[] rbAlign = { "right", "center", "left" };
    mainLayout.setColumnSpec(1, ColumnSpec.decode(Integer.toString(maxLabelWidth) + "px"));
    Integer maxRBWidth = -1;
    for (int k = 2; k < 5; k++) {
        maxRBWidth = Math.max(maxRBWidth, headingLabels[k].getPreferredSize().width);
    }
    for (int k = 0; k < 3; k++) {
        mergeLayout.setColumnSpec(5 + (k * 2), ColumnSpec.decode(rbAlign[k] + ":" + maxRBWidth + "px"));
    }

    // Setup a PreviewPanel and a Bibtex source box for the merged entry
    mainPanel.add(boldFontLabel(Localization.lang("Merged entry")), cc.xyw(1, 6, 6));

    entryPreview = new PreviewPanel(null, mergedEntry, null, Globals.prefs.get(JabRefPreferences.PREVIEW_0));
    mainPanel.add(entryPreview, cc.xyw(1, 8, 6));

    mainPanel.add(boldFontLabel(Localization.lang("Merged BibTeX source code")), cc.xyw(8, 6, 4));

    sourceView = new JTextArea();
    sourceView.setLineWrap(true);
    sourceView.setFont(new Font("Monospaced", Font.PLAIN, Globals.prefs.getInt(JabRefPreferences.FONT_SIZE)));
    mainPanel.add(new JScrollPane(sourceView), cc.xyw(8, 8, 4));
    sourceView.setEditable(false);

    // Add some margin around the layout
    mainLayout.appendRow(RowSpec.decode(MARGIN));
    mainLayout.appendColumn(ColumnSpec.decode(MARGIN));
    mainLayout.insertRow(1, RowSpec.decode(MARGIN));
    mainLayout.insertColumn(1, ColumnSpec.decode(MARGIN));

    // Everything done, allow any action to actually update the merged entry
    doneBuilding = true;

    updateAll();

    // Show what we've got
    mainPanel.setVisible(true);
    javax.swing.SwingUtilities.invokeLater(() -> scrollPane.getVerticalScrollBar().setValue(0));
}

From source file:com.sec.ose.osi.ui.dialog.setting.JPanProjectAnalysisSetting.java

/**
 * This method initializes jRadioButtonUserHour   
 *    //from w  ww  .  ja va 2 s  .  c  om
 * @return javax.swing.JRadioButton   
 */
private JRadioButton getJRadioButtonUserHour() {
    if (jRadioButtonUserDefined == null) {
        jRadioButtonUserDefined = new JRadioButton();
        jRadioButtonUserDefined.setText("User defined : ");

        jRadioButtonUserDefined.addActionListener(new RadioButtonAction());
    }
    return jRadioButtonUserDefined;
}

From source file:com.sec.ose.osi.ui.frm.main.report.JPanBillOfMaterials.java

/**
 * This method initializes jRadioAllFiles   
 *    /* www . ja  va 2 s .  c  o m*/
 * @return javax.swing.JRadioButton   
 */
public JRadioButton getJRadioAllFilesForAll() {
    if (jRadioAllFiles == null) {
        jRadioAllFiles = new JRadioButton();
        jRadioAllFiles.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent e) {
                log.debug("actionPerformed()");
                eventHandler.handleEvent(EventHandler.RADIO_ALL_FILES);
            }
        });
    }
    return jRadioAllFiles;
}

From source file:com.sec.ose.osi.ui.frm.main.identification.stringmatch.JPanStringMatchMain.java

/**
 * This method initializes jRadioButton1   
 *    //from  w  ww .jav a 2 s  .  c  o  m
 * @return javax.swing.JRadioButton   
 */
private JRadioButton getJRadioButtonThisFileContains() {
    if (opt2ThisFileContains == null) {
        opt2ThisFileContains = new JRadioButton();
        opt2ThisFileContains.setText("This file contains more than one license text");
        opt2ThisFileContains.setFocusPainted(false);
        opt2ThisFileContains.addActionListener(new RadioThisFileContainsAction());
    }
    return opt2ThisFileContains;
}

From source file:com.sec.ose.osi.ui.dialog.setting.JPanProjectAnalysisSetting.java

/**
 * This method initializes jRadioButtonTimeSet   
 *    //from  w  w w  .  jav a 2  s  .com
 * @return javax.swing.JRadioButton   
 */
private JRadioButton getJRadioButtonTimeSet() {
    if (jRadioButtonTimeSet == null) {
        jRadioButtonTimeSet = new JRadioButton();
        jRadioButtonTimeSet.setText("Fixed time :");
        jRadioButtonTimeSet.addActionListener(new RadioButtonAction());
    }
    return jRadioButtonTimeSet;
}

From source file:com.sec.ose.osi.ui.frm.main.report.JPanBillOfMaterials.java

/**
 * This method initializes jRadioSelectedComponent   
 *    //from   ww  w  . j ava 2  s .com
 * @return javax.swing.JRadioButton   
 */
public JRadioButton getJRadioAllFilesForSelectedComponent() {
    if (jRadioSelectedComponent == null) {
        jRadioSelectedComponent = new JRadioButton();
        jRadioSelectedComponent.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent e) {
                log.debug("actionPerformed()");
                eventHandler.handleEvent(EventHandler.RADIO_SELECTED_COMPONENT);
            }
        });
    }
    return jRadioSelectedComponent;
}

From source file:com.sec.ose.osi.ui.frm.main.identification.codematch.JPanCodeMatchMain.java

/**
 * This method initializes jRadioButton1   
 *    //from ww w. j ava 2s. c om
 * @return javax.swing.JRadioButton   
 */
public JRadioButton getJRadioButtonOpt1() {
    if (rdbtnOpt1IConform == null) {
        rdbtnOpt1IConform = new JRadioButton();
        rdbtnOpt1IConform.setText("I confirm the open source usage.");
        rdbtnOpt1IConform.setFocusPainted(false);
        rdbtnOpt1IConform.addActionListener(new RadioActionOpt1());
    }
    return rdbtnOpt1IConform;
}

From source file:com.sec.ose.osi.ui.frm.main.identification.codematch.JPanCodeMatchMain.java

/**
 * This method initializes jRadioButton2   
 *    /*w  ww.jav a 2 s.  c  o  m*/
 * @return javax.swing.JRadioButton   
 */
private JRadioButton getJRadioButtonOpt2() {
    if (rdbtnOpt2ICannotFind == null) {
        rdbtnOpt2ICannotFind = new JRadioButton();
        rdbtnOpt2ICannotFind.setText(
                "I confirm the open source usage, but I cannot find original component name from the list above.");
        rdbtnOpt2ICannotFind.setFocusPainted(false);
        rdbtnOpt2ICannotFind.addActionListener(new RadioActionOpt2());
    }
    return rdbtnOpt2ICannotFind;
}