List of usage examples for javax.swing JRadioButton JRadioButton
public JRadioButton()
From source file:com.peterbochs.PeterBochsDebugger.java
private JRadioButton getJRadioButton1() { if (jRegRadioButton == null) { jRegRadioButton = new JRadioButton(); jRegRadioButton.setText("reg"); getButtonGroup2().add(jRegRadioButton); jRegRadioButton.setSelected(true); jRegRadioButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { jRegRadioButtonActionPerformed(evt); }// w w w .j a v a 2 s .c o m }); } return jRegRadioButton; }
From source file:com.peterbochs.PeterBochsDebugger.java
private JRadioButton getJRadioButton2() { if (jTblRadioButton == null) { jTblRadioButton = new JRadioButton(); jTblRadioButton.setText("tbl. desc."); getButtonGroup2().add(jTblRadioButton); jTblRadioButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { jTblRadioButtonActionPerformed(evt); }/*from w w w . j a va 2 s .c o m*/ }); } return jTblRadioButton; }
From source file:com.peterbochs.PeterBochsDebugger.java
private JSplitPane getJSplitPane2() { jSplitPane2 = new JSplitPane(); jSplitPane2.setPreferredSize(new java.awt.Dimension(1009, 781)); jSplitPane2.setOrientation(JSplitPane.VERTICAL_SPLIT); {/* www . ja va2 s . co m*/ jSplitPane1 = new JSplitPane(); jSplitPane2.add(jSplitPane1, JSplitPane.TOP); jSplitPane1.setDividerLocation(400); { jTabbedPane1 = new JMaximizableTabbedPane(); jSplitPane1.add(jTabbedPane1, JSplitPane.RIGHT); jTabbedPane1.addChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent evt) { jTabbedPane1StateChanged(evt); } }); { jPanel10 = new JPanel(); BorderLayout jPanel10Layout = new BorderLayout(); jPanel10.setLayout(jPanel10Layout); jTabbedPane1.addTab(MyLanguage.getString("Instruction"), new ImageIcon(getClass().getClassLoader() .getResource("com/peterbochs/icons/famfam_icons/text_padding_top.png")), jPanel10, null); jPanel10.setPreferredSize(new java.awt.Dimension(604, 452)); { jInstructionControlPanel = new JPanel(); jPanel10.add(jInstructionControlPanel, BorderLayout.NORTH); { ComboBoxModel jInstructionComboBoxModel = new DefaultComboBoxModel(new String[] {}); jInstructionComboBox = new JComboBox(); jInstructionControlPanel.add(jInstructionComboBox); jInstructionControlPanel.add(getDisassembleButton()); jInstructionComboBox.setModel(jInstructionComboBoxModel); jInstructionComboBox.setEditable(true); jInstructionComboBox.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { jInstructionComboBoxActionPerformed(evt); } }); } { disassembleCurrentIPButton = new JButton(); jInstructionControlPanel.add(disassembleCurrentIPButton); jInstructionControlPanel.add(getJInstructionUpTenButton()); jInstructionControlPanel.add(getJInstructionUpButton()); jInstructionControlPanel.add(getJButton22()); jInstructionControlPanel.add(getJButton3()); jInstructionControlPanel.add(getJButton12()); disassembleCurrentIPButton.setText(MyLanguage.getString("Disassemble") + " cs:eip"); disassembleCurrentIPButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { disassembleCurrentIPButtonActionPerformed(evt); } }); } } { instructionTableScrollPane = new JScrollPane(); jPanel10.add(instructionTableScrollPane, BorderLayout.CENTER); { instructionTable = new JTable(); instructionTableScrollPane.setViewportView(instructionTable); instructionTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); instructionTable.setModel(new InstructionTableModel()); instructionTable.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN); instructionTable.getTableHeader().setReorderingAllowed(false); instructionTable.getColumnModel().getColumn(0).setMaxWidth(20); instructionTable.getColumnModel().getColumn(1).setPreferredWidth(40); instructionTable.getColumnModel().getColumn(2).setPreferredWidth(200); instructionTable.getColumnModel().getColumn(3).setPreferredWidth(40); instructionTable.setDefaultRenderer(String.class, new InstructionTableCellRenderer()); instructionTable.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent evt) { instructionTableMouseClicked(evt); } }); } } } { jPanel4 = new JPanel(); jTabbedPane1 .addTab(MyLanguage.getString("Breakpoint"), new ImageIcon(getClass().getClassLoader() .getResource("com/peterbochs/icons/famfam_icons/cancel.png")), jPanel4, null); BorderLayout jPanel4Layout = new BorderLayout(); jPanel4.setLayout(jPanel4Layout); { jScrollPane9 = new JScrollPane(); jPanel4.add(jScrollPane9, BorderLayout.CENTER); { breakpointTable = new JTable(); breakpointTable.getTableHeader().setReorderingAllowed(false); jScrollPane9.setViewportView(breakpointTable); breakpointTable.setModel(jBreakpointTableModel); breakpointTable.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN); breakpointTable.getColumnModel().getColumn(0) .setCellRenderer(new BreakpointTableCellRenderer()); breakpointTable.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent evt) { breakpointTableMouseClicked(evt); } }); breakpointTable.getColumnModel().getColumn(2).setPreferredWidth(100); breakpointTable.getColumnModel().getColumn(3).setPreferredWidth(20); } } { jPanel12 = new JPanel(); jPanel4.add(jPanel12, BorderLayout.SOUTH); { jAddBreakpointButton = new JButton(); jPanel12.add(jAddBreakpointButton); jAddBreakpointButton.setText(MyLanguage.getString("Add")); jAddBreakpointButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { jAddBreakpointButtonActionPerformed(evt); } }); } { jDeleteBreakpointButton = new JButton(); jPanel12.add(jDeleteBreakpointButton); jDeleteBreakpointButton.setText(MyLanguage.getString("Del")); jDeleteBreakpointButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { jDeleteBreakpointButtonActionPerformed(evt); } }); } { jRefreshBreakpointButton = new JButton(); jPanel12.add(jRefreshBreakpointButton); jRefreshBreakpointButton.setText(MyLanguage.getString("Refresh")); jRefreshBreakpointButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { jRefreshBreakpointButtonActionPerformed(evt); } }); } { jEnableBreakpointButton = new JButton(); jPanel12.add(jEnableBreakpointButton); jEnableBreakpointButton.setText(MyLanguage.getString("Enable")); jEnableBreakpointButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { jEnableBreakpointButtonActionPerformed(evt); } }); } { jDisableBreakpointButton = new JButton(); jPanel12.add(jDisableBreakpointButton); jDisableBreakpointButton.setText(MyLanguage.getString("Disable")); jDisableBreakpointButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { jDisableBreakpointButtonActionPerformed(evt); } }); } { jSaveBreakpointButton = new JButton(); jPanel12.add(jSaveBreakpointButton); jSaveBreakpointButton.setText(MyLanguage.getString("Save")); jSaveBreakpointButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { jSaveBreakpointButtonActionPerformed(evt); } }); } { jLoadBreakpointButton = new JDropDownButton(); jPanel12.add(jLoadBreakpointButton); jPanel12.add(getJSBButton()); jPanel12.add(getJSBAButton()); jLoadBreakpointButton.setText(MyLanguage.getString("Load")); jLoadBreakpointButton.add(loadElfMenuItem); jLoadBreakpointButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { jLoadBreakpointButtonActionPerformed(evt); } }); } } } { jPanel1 = new JPanel(); jTabbedPane1.addTab(MyLanguage.getString("Bochs"), new ImageIcon(getClass().getClassLoader() .getResource("com/peterbochs/icons/famfam_icons/application_xp_terminal.png")), jPanel1, null); jTabbedPane1.addTab("ELF", new ImageIcon(getClass().getClassLoader() .getResource("com/peterbochs/icons/famfam_icons/linux.png")), getJELFBreakpointPanel(), null); DiskPanel diskPanel = getDiskPanel(); if (diskPanel.getFile() != null) { jTabbedPane1.addTab(diskPanel.getFile().getName(), new ImageIcon(getClass().getClassLoader() .getResource("com/peterbochs/icons/famfam_icons/package.png")), diskPanel, null); } BorderLayout jPanel1Layout = new BorderLayout(); jPanel1.setLayout(jPanel1Layout); { jScrollPane4 = new JScrollPane(); jPanel1.add(jScrollPane4, BorderLayout.CENTER); { bochsEditorPane = new JEditorPane(); jScrollPane4.setViewportView(bochsEditorPane); } } { jPanel2 = new JPanel(); TableLayout jPanel2Layout = new TableLayout(new double[][] { { TableLayout.FILL, 411.0, TableLayout.MINIMUM, TableLayout.MINIMUM }, { TableLayout.FILL } }); jPanel2Layout.setHGap(5); jPanel2Layout.setVGap(5); jPanel2.setLayout(jPanel2Layout); jPanel1.add(jPanel2, BorderLayout.SOUTH); { bochsCommandTextField = new JTextField(); jPanel2.add(bochsCommandTextField, "0, 0, 1, 0"); bochsCommandTextField.addKeyListener(new KeyAdapter() { public void keyPressed(KeyEvent evt) { jBochsCommandTextFieldKeyPressed(evt); } public void keyTyped(KeyEvent evt) { bochsCommandTextFieldKeyTyped(evt); } }); } { bochsCommandButton = new JButton(); jPanel2.add(bochsCommandButton, "2, 0"); jPanel2.add(getJClearBochsButton(), "3, 0"); bochsCommandButton.setText("Run"); bochsCommandButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { bochsCommandButtonActionPerformed(evt); } }); } } } } { jTabbedPane3 = new JMaximizableTabbedPane(); jSplitPane1.add(jTabbedPane3, JSplitPane.LEFT); { jPanel8 = new JPanel(); BorderLayout jPanel8Layout = new BorderLayout(); jPanel8.setLayout(jPanel8Layout); jTabbedPane3 .addTab(MyLanguage.getString("Memory"), new ImageIcon(getClass().getClassLoader() .getResource("com/peterbochs/icons/famfam_icons/memory.png")), jPanel8, null); { jScrollPane2 = new JScrollPane(); jPanel8.add(jScrollPane2, BorderLayout.CENTER); { jHexTable1 = new HexTable(); jHexTable1.getColumnModel().getColumn(0).setPreferredWidth(30); for (int x = 1; x < 9; x++) { jHexTable1.getColumnModel().getColumn(x).setPreferredWidth(10); } jScrollPane2.setViewportView(jHexTable1); jHexTable1.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN); jHexTable1.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); jHexTable1.setCellSelectionEnabled(true); jHexTable1.getTableHeader().setReorderingAllowed(false); jHexTable1.setDefaultRenderer(String.class, new MemoryTableCellRenderer()); jHexTable1.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent evt) { jHexTable1MouseClicked(evt); } }); } } { jPanel9 = new JPanel(); FlowLayout jPanel9Layout = new FlowLayout(); jPanel9.setLayout(jPanel9Layout); jPanel8.add(jPanel9, BorderLayout.NORTH); { jMemoryAddressComboBox = new JComboBox(); jPanel9.add(jMemoryAddressComboBox); jMemoryAddressComboBox.setSelectedItem("0x00000000"); jMemoryAddressComboBox.setEditable(true); jMemoryAddressComboBox.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { jMemoryAddressComboBoxActionPerformed(evt); } }); new Thread("addMemoryAddressComboBox thread") { public void run() { TreeSet<String> vector = Setting.getInstance().getMemoryCombo(); Iterator<String> iterator = vector.iterator(); while (iterator.hasNext()) { addMemoryAddressComboBox(iterator.next()); } } }.start(); jMemoryAddressComboBox.setSelectedItem("0x00000000"); } { jGOMemoryButton = new JButton(); jPanel9.add(jGOMemoryButton); jPanel9.add(getJGoLinearButton()); jPanel9.add(getJPreviousMemoryButton()); jPanel9.add(getJNextMemoryPageButton()); jPanel9.add(getJButton2()); jPanel9.add(getJButton5()); jGOMemoryButton.setText(MyLanguage.getString("Go")); jGOMemoryButton.setToolTipText(MyLanguage.getString("Physical_address")); jGOMemoryButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { jGOMemoryButtonActionPerformed(evt); } }); } { jBinaryRadioButton = new JRadioButton(); jPanel9.add(jBinaryRadioButton); jBinaryRadioButton.setText("2"); jBinaryRadioButton.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent evt) { jBinaryRadioButtonItemStateChanged(evt); } }); jBinaryRadioButton.addChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent evt) { jBinaryRadioButtonStateChanged(evt); } }); getButtonGroup1().add(jBinaryRadioButton); } { jOctRadioButton1 = new JRadioButton(); jPanel9.add(jOctRadioButton1); jOctRadioButton1.setText("8"); jOctRadioButton1.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent evt) { jOctRadioButton1ItemStateChanged(evt); } }); jOctRadioButton1.addChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent evt) { jOctRadioButton1StateChanged(evt); } }); getButtonGroup1().add(jOctRadioButton1); } { jDecRadioButton = new JRadioButton(); jPanel9.add(jDecRadioButton); jDecRadioButton.setText("10"); jDecRadioButton.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent evt) { jDecRadioButtonItemStateChanged(evt); } }); jDecRadioButton.addChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent evt) { jDecRadioButtonStateChanged(evt); } }); getButtonGroup1().add(jDecRadioButton); } { jHexRadioButton = new JRadioButton(); jPanel9.add(jHexRadioButton); jHexRadioButton.setText("16"); jHexRadioButton.setSelected(true); jHexRadioButton.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent evt) { jHexRadioButtonItemStateChanged(evt); } }); jHexRadioButton.addChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent evt) { jHexRadioButtonStateChanged(evt); } }); getButtonGroup1().add(jHexRadioButton); } } } { jPanel5 = new JPanel(); jTabbedPane3 .addTab(MyLanguage.getString("GDT"), new ImageIcon(getClass().getClassLoader() .getResource("com/peterbochs/icons/famfam_icons/gdt.png")), jPanel5, null); BorderLayout jPanel5Layout = new BorderLayout(); jPanel5.setLayout(jPanel5Layout); { jScrollPane3 = new JScrollPane(); jPanel5.add(jScrollPane3, BorderLayout.CENTER); jPanel5.add(getJPanel14(), BorderLayout.NORTH); { GDTTableModel jGDTTableModel = new GDTTableModel(); jGDTTable = new JTable(); jGDTTable.setModel(jGDTTableModel); jScrollPane3.setViewportView(jGDTTable); jGDTTable.getColumnModel().getColumn(0).setMaxWidth(40); jGDTTable.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN); jGDTTable.getTableHeader().setReorderingAllowed(false); jGDTTable.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent evt) { jGDTTableMouseClicked(evt); } }); } } } { jPanel6 = new JPanel(); BorderLayout jPanel6Layout = new BorderLayout(); jPanel6.setLayout(jPanel6Layout); jTabbedPane3 .addTab(MyLanguage.getString("IDT"), new ImageIcon(getClass().getClassLoader() .getResource("com/peterbochs/icons/famfam_icons/idt.png")), jPanel6, null); { jScrollPane10 = new JScrollPane(); jPanel6.add(jScrollPane10, BorderLayout.CENTER); jPanel6.add(getJPanel15(), BorderLayout.NORTH); { IDTTableModel jIDTTableModel = new IDTTableModel(); jIDTTable = new JTable(); jIDTTable.setModel(jIDTTableModel); jScrollPane10.setViewportView(jIDTTable); jIDTTable.getColumnModel().getColumn(0).setMaxWidth(40); jIDTTable.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN); jIDTTable.getTableHeader().setReorderingAllowed(false); jIDTTable.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent evt) { jIDTTableMouseClicked(evt); } }); } } } { jPanel7 = new JPanel(); BorderLayout jPanel7Layout = new BorderLayout(); jPanel7.setLayout(jPanel7Layout); jTabbedPane3 .addTab(MyLanguage.getString("LDT"), new ImageIcon(getClass().getClassLoader() .getResource("com/peterbochs/icons/famfam_icons/ldt.png")), jPanel7, null); jTabbedPane3.addTab(MyLanguage.getString("Search_memory"), new ImageIcon(getClass().getClassLoader() .getResource("com/peterbochs/icons/famfam_icons/memory.png")), getJPanel17(), null); jTabbedPane3.addTab("bochsout.txt", new ImageIcon(getClass().getClassLoader() .getResource("com/peterbochs/icons/famfam_icons/script.png")), getJPanel31(), null); { jScrollPane11 = new JScrollPane(); jPanel7.add(jScrollPane11, BorderLayout.CENTER); jPanel7.add(getJPanel16(), BorderLayout.NORTH); { LDTTableModel jLDTTableModel = new LDTTableModel(); jLDTTable = new JTable(); jLDTTable.setModel(jLDTTableModel); jScrollPane11.setViewportView(jLDTTable); jLDTTable.getColumnModel().getColumn(0).setMaxWidth(40); jLDTTable.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN); jLDTTable.getTableHeader().setReorderingAllowed(false); jLDTTable.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent evt) { jLDTTableMouseClicked(evt); } }); } } } } } { jTabbedPane2 = new JMaximizableTabbedPane(); // jTabbedPane2.setCloseIcon(true); // jTabbedPane2.setMaxIcon(true); // // jTabbedPane2.addCloseListener(new CloseListener() { // public void closeOperation(MouseEvent e) { // jTabbedPane2.remove(jTabbedPane2.getOverTabIndex()); // } // }); // // jTabbedPane2.addMaxListener(new MaxListener() { // public void maxOperation(MouseEvent e) { // jTabbedPane2.detachTab(jTabbedPane2.getOverTabIndex()); // } // }); jSplitPane2.add(jTabbedPane2, JSplitPane.BOTTOM); { registerPanelScrollPane = new JScrollPane(); jTabbedPane2.addTab(MyLanguage.getString("Register"), new ImageIcon(getClass().getClassLoader() .getResource("com/peterbochs/icons/famfam_icons/text_kerning.png")), registerPanelScrollPane, null); { registerPanel = new RegisterPanel(this); registerPanelScrollPane.setViewportView(registerPanel); } } { jPanel3 = new JPanel(); jTabbedPane2.addTab(MyLanguage.getString("History"), new ImageIcon(getClass().getClassLoader() .getResource("com/peterbochs/icons/famfam_icons/book_addresses.png")), jPanel3, null); BorderLayout jPanel3Layout = new BorderLayout(); jPanel3.setLayout(jPanel3Layout); { jScrollPane6 = new JScrollPane(); jPanel3.add(jScrollPane6, BorderLayout.CENTER); jPanel3.add(getJPanel13(), BorderLayout.NORTH); jScrollPane6.setViewportView(getJHistoryTable()); } } { jPanel11 = new JPanel(); jTabbedPane2 .addTab(MyLanguage.getString("Paging"), new ImageIcon(getClass().getClassLoader() .getResource("com/peterbochs/icons/famfam_icons/page_copy.png")), jPanel11, null); jTabbedPane2.addTab(MyLanguage.getString("Address_translate"), new ImageIcon(getClass().getClassLoader() .getResource("com/peterbochs/icons/famfam_icons/page_go.png")), getJAddressTranslatePanel(), null); jTabbedPane2.addTab("Page table graph (experimental)", new ImageIcon(getClass().getClassLoader() .getResource("com/peterbochs/icons/famfam_icons/page_lightning.png")), getJPageTableGraphPanel(), null); if (!Global.debug) { jTabbedPane2.removeTabAt(jTabbedPane2.getTabCount() - 1); } jTabbedPane2.addTab(MyLanguage.getString("Table_translate"), new ImageIcon(getClass().getClassLoader() .getResource("com/peterbochs/icons/famfam_icons/page_refresh.png")), getJTableTranslateScrollPane(), null); jTabbedPane2.addTab(MyLanguage.getString("ELF_dump"), new ImageIcon(getClass().getClassLoader() .getResource("com/peterbochs/icons/famfam_icons/linux.png")), getJELFDumpScrollPane(), null); jTabbedPane2.addTab("OS debug informations", new ImageIcon(getClass().getClassLoader() .getResource("com/peterbochs/icons/famfam_icons/bug.png")), getJOSDebugStandardPanel(), null); BorderLayout jPanel11Layout = new BorderLayout(); jPanel11.setLayout(jPanel11Layout); jPanel11.add(getJSplitPane3(), BorderLayout.CENTER); jPanel11.add(getJPanel19(), BorderLayout.NORTH); } } return jSplitPane2; }
From source file:com.peterbochs.PeterBochsDebugger.java
private JRadioButton getJRadioButton3() { if (jSearchAddressRadioButton1 == null) { jSearchAddressRadioButton1 = new JRadioButton(); jSearchAddressRadioButton1.setText(MyLanguage.getString("Virtual_address")); jSearchAddressRadioButton1.setSelected(true); getButtonGroup3().add(jSearchAddressRadioButton1); }/*from w ww . ja v a 2 s . c o m*/ return jSearchAddressRadioButton1; }
From source file:com.peterbochs.PeterBochsDebugger.java
private JRadioButton getJRadioButton4() { if (jSearchAddressRadioButton2 == null) { jSearchAddressRadioButton2 = new JRadioButton(); jSearchAddressRadioButton2.setText(MyLanguage.getString("Linear_address")); getButtonGroup3().add(jSearchAddressRadioButton2); }/* ww w . j a v a2s .c o m*/ return jSearchAddressRadioButton2; }
From source file:com.peterbochs.PeterBochsDebugger.java
private JRadioButton getJRadioButton5() { if (jSearchAddressRadioButton3 == null) { jSearchAddressRadioButton3 = new JRadioButton(); jSearchAddressRadioButton3.setVisible(false); jSearchAddressRadioButton3.setText(MyLanguage.getString("Physical_address")); getButtonGroup3().add(jSearchAddressRadioButton3); }//from ww w . ja va 2 s . c o m return jSearchAddressRadioButton3; }
From source file:com.peterbochs.PeterBochsDebugger.java
private JRadioButton getJFPURadioButton() { if (jFPURadioButton == null) { jFPURadioButton = new JRadioButton(); jFPURadioButton.setText("fpu"); jFPURadioButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { jFPURadioButtonActionPerformed(evt); }/*from w w w .j a va 2 s . c o m*/ }); getButtonGroup2().add(jFPURadioButton); } return jFPURadioButton; }
From source file:com.peterbochs.PeterBochsDebugger.java
private JRadioButton getJMMXRadioButton() { if (jMMXRadioButton == null) { jMMXRadioButton = new JRadioButton(); jMMXRadioButton.setText("mmx"); jMMXRadioButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { jMMXRadioButtonActionPerformed(evt); }/*w w w . j av a2 s. co m*/ }); getButtonGroup2().add(jMMXRadioButton); } return jMMXRadioButton; }
From source file:net.sourceforge.pmd.util.designer.Designer.java
private JPanel createXPathVersionPanel() { JPanel p = new JPanel(); p.add(new JLabel("XPath Version:")); for (Entry<String, String> values : XPathRule.VERSION_DESCRIPTOR.mappings().entrySet()) { JRadioButton b = new JRadioButton(); b.setText(values.getKey());/*www .ja v a 2 s . c om*/ b.setActionCommand(b.getText()); if (values.getKey().equals(XPathRule.VERSION_DESCRIPTOR.defaultValue())) { b.setSelected(true); } xpathVersionButtonGroup.add(b); p.add(b); } return p; }
From source file:op.care.med.inventory.DlgCloseStock.java
/** * This method is called from within the constructor to * initialize the form./*from w w w. ja va 2 s. com*/ * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the PrinterForm Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new JPanel(); jScrollPane1 = new JScrollPane(); txtInfo = new JTextPane(); rbLeer = new JRadioButton(); rbStellen = new JRadioButton(); txtLetzte = new JTextField(); lblEinheiten = new JLabel(); rbAbgelaufen = new JRadioButton(); jSeparator1 = new JSeparator(); jLabel2 = new JLabel(); jLabel3 = new JLabel(); rbGefallen = new JRadioButton(); cmbBestID = new JComboBox(); panel1 = new JPanel(); btnClose = new JButton(); btnOk = new JButton(); //======== this ======== setResizable(false); setModalityType(Dialog.ModalityType.APPLICATION_MODAL); Container contentPane = getContentPane(); contentPane.setLayout(new BoxLayout(contentPane, BoxLayout.PAGE_AXIS)); //======== jPanel1 ======== { jPanel1.setBorder(null); jPanel1.setLayout(new FormLayout("14dlu, $lcgap, 145dlu, $lcgap, 41dlu, $lcgap, 93dlu, $lcgap, 14dlu", "14dlu, $lgap, fill:70dlu:grow, 4*($lgap, fill:default), $lgap, $rgap, $lgap, fill:default, $lgap, $rgap, $lgap, default, $lgap, 14dlu")); //======== jScrollPane1 ======== { //---- txtInfo ---- txtInfo.setEditable(false); txtInfo.setFont(new Font("Arial", Font.PLAIN, 14)); jScrollPane1.setViewportView(txtInfo); } jPanel1.add(jScrollPane1, CC.xywh(3, 3, 5, 1)); //---- rbLeer ---- rbLeer.setSelected(true); rbLeer.setText("Die Packung ist nun leer"); rbLeer.setFont(new Font("Arial", Font.PLAIN, 14)); rbLeer.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { rbLeerActionPerformed(e); } }); jPanel1.add(rbLeer, CC.xy(3, 5)); //---- rbStellen ---- rbStellen.setText("Beim Vorab Stellen haben Sie die letzten "); rbStellen.setFont(new Font("Arial", Font.PLAIN, 14)); rbStellen.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { rbStellenActionPerformed(e); } }); jPanel1.add(rbStellen, CC.xywh(3, 7, 2, 1)); //---- txtLetzte ---- txtLetzte.setText("jTextField1"); txtLetzte.setFont(new Font("Arial", Font.PLAIN, 14)); txtLetzte.addFocusListener(new FocusAdapter() { @Override public void focusLost(FocusEvent e) { txtLetzteFocusLost(e); } }); jPanel1.add(txtLetzte, CC.xy(5, 7)); //---- lblEinheiten ---- lblEinheiten.setText("Einheiten verbraucht."); lblEinheiten.setFont(new Font("Arial", Font.PLAIN, 14)); jPanel1.add(lblEinheiten, CC.xy(7, 7)); //---- rbAbgelaufen ---- rbAbgelaufen.setText( "Die Packung ist abgelaufen oder wird nicht mehr ben\u00f6tigt. Bereit zur Entsorgung."); rbAbgelaufen.setFont(new Font("Arial", Font.PLAIN, 14)); rbAbgelaufen.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { rbAbgelaufenActionPerformed(e); } }); jPanel1.add(rbAbgelaufen, CC.xywh(3, 9, 5, 1)); jPanel1.add(jSeparator1, CC.xywh(3, 13, 5, 1)); //---- jLabel2 ---- jLabel2.setText("Als n\u00e4chstes Packung soll die Nummer"); jLabel2.setFont(new Font("Arial", Font.PLAIN, 14)); jLabel2.setHorizontalAlignment(SwingConstants.TRAILING); jPanel1.add(jLabel2, CC.xy(3, 15)); //---- jLabel3 ---- jLabel3.setText("angebrochen werden."); jLabel3.setFont(new Font("Arial", Font.PLAIN, 14)); jPanel1.add(jLabel3, CC.xy(7, 15)); //---- rbGefallen ---- rbGefallen.setText( "<html>Die Packung ist <font color=\"red\">runter gefallen</font> oder <font color=\"red\">verschwunden</font> und muss ausgebucht werden.</html>"); rbGefallen.setFont(new Font("Arial", Font.PLAIN, 14)); rbGefallen.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { rbGefallenActionPerformed(e); } }); jPanel1.add(rbGefallen, CC.xywh(3, 11, 5, 1)); //---- cmbBestID ---- cmbBestID.setModel(new DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); cmbBestID.setFont(new Font("Arial", Font.PLAIN, 14)); cmbBestID.addItemListener(new ItemListener() { @Override public void itemStateChanged(ItemEvent e) { cmbBestIDItemStateChanged(e); } }); jPanel1.add(cmbBestID, CC.xy(5, 15)); //======== panel1 ======== { panel1.setLayout(new BoxLayout(panel1, BoxLayout.X_AXIS)); //---- btnClose ---- btnClose.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/cancel.png"))); btnClose.setText(null); btnClose.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnCloseActionPerformed(e); } }); panel1.add(btnClose); //---- btnOk ---- btnOk.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/apply.png"))); btnOk.setText(null); btnOk.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnOkActionPerformed(e); } }); panel1.add(btnOk); } jPanel1.add(panel1, CC.xy(7, 19, CC.RIGHT, CC.DEFAULT)); } contentPane.add(jPanel1); pack(); setLocationRelativeTo(getOwner()); //---- buttonGroup1 ---- ButtonGroup buttonGroup1 = new ButtonGroup(); buttonGroup1.add(rbLeer); buttonGroup1.add(rbStellen); buttonGroup1.add(rbAbgelaufen); buttonGroup1.add(rbGefallen); }