List of usage examples for javax.swing JRadioButton JRadioButton
public JRadioButton()
From source file:com.sec.ose.osi.ui.frm.main.identification.codematch.JPanCodeMatchMain.java
/** * This method initializes jRadioButton * //from ww w .j a v a 2s .co m * @return javax.swing.JRadioButton */ private JRadioButton getJRadioButtonOpt3() { if (rdbtnOpt3Internal == null) { rdbtnOpt3Internal = new JRadioButton(); rdbtnOpt3Internal.setText("Internal/proprietary code (no open source used)"); rdbtnOpt3Internal.setFocusPainted(false); rdbtnOpt3Internal.addActionListener(new RadioActionOpt3()); } return rdbtnOpt3Internal; }
From source file:com.sec.ose.osi.ui.frm.main.identification.codematch.JPanCodeMatchMain.java
/** * This method initializes jRadioButton3 * /*from w ww . j av a2 s. c om*/ * @return javax.swing.JRadioButton */ private JRadioButton getJRadioButtonOpt4() { if (rdbtnOpt4NotAlarm == null) { rdbtnOpt4NotAlarm = new JRadioButton(); rdbtnOpt4NotAlarm.setText("Do not display alarm on this file again (not recommended)"); rdbtnOpt4NotAlarm.setFocusPainted(false); rdbtnOpt4NotAlarm.addActionListener(new RadioActionOpt4()); } return rdbtnOpt4NotAlarm; }
From source file:JXButtonPanel.java
public JXButtonPanelDemo() { super("JXButtonPanel demo"); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setResizable(false);//from w ww . j a va 2 s .c om JPanel topPanel = new JPanel(new GridLayout(1, 0)); final JXButtonPanel radioGroupPanel = createRadioJXButtonPanel(); topPanel.add(radioGroupPanel); final JXButtonPanel checkBoxPanel = createCheckBoxJXButtonPanel(); topPanel.add(checkBoxPanel); add(topPanel); add(createButtonJXButtonPanel(), BorderLayout.SOUTH); pack(); JMenuBar bar = new JMenuBar(); JMenu menu = new JMenu("Options"); JMenuItem item = new JMenuItem("Unselect radioButtons"); item.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_C, InputEvent.ALT_MASK)); item.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { // hack for 1.5 // in 1.6 ButtonGroup.clearSelection added JRadioButton b = new JRadioButton(); radioGroup.add(b); b.setSelected(true); radioGroup.remove(b); } }); menu.add(item); bar.add(menu); setJMenuBar(bar); setSize(300, 300); setLocationRelativeTo(null); }
From source file:de.xplib.xdbm.ui.Application.java
/** * Sets global user interface options.//from www .j av a2 s . co m */ private void configureUI() { Options.setDefaultIconSize(new Dimension(18, 18)); // Set font options UIManager.put(Options.USE_SYSTEM_FONTS_APP_KEY, settings.isUseSystemFonts()); Options.setGlobalFontSizeHints(settings.getFontSizeHints()); Options.setUseNarrowButtons(settings.isUseNarrowButtons()); Options.setPopupDropShadowEnabled(settings.isPopupDropShadowEnabled().booleanValue()); // Global options Options.setTabIconsEnabled(settings.isTabIconsEnabled()); UIManager.put(Options.POPUP_DROP_SHADOW_ENABLED_KEY, settings.isPopupDropShadowEnabled()); // Swing Settings LookAndFeel selectedLaf = settings.getSelectedLookAndFeel(); if (selectedLaf instanceof PlasticLookAndFeel) { PlasticLookAndFeel.setMyCurrentTheme(settings.getSelectedTheme()); PlasticLookAndFeel.setTabStyle(settings.getPlasticTabStyle()); PlasticLookAndFeel.setHighContrastFocusColorsEnabled(settings.isPlasticHighContrastFocusEnabled()); } else if (selectedLaf.getClass() == MetalLookAndFeel.class) { MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme()); } // Work around caching in MetalRadioButtonUI JRadioButton radio = new JRadioButton(); radio.getUI().uninstallUI(radio); JCheckBox checkBox = new JCheckBox(); checkBox.getUI().uninstallUI(checkBox); try { UIManager.setLookAndFeel(selectedLaf); } catch (Exception e) { System.out.println("Can't change L&F: " + e); } }
From source file:brainflow.app.toplevel.BrainFlow.java
private ButtonFactory createToolBarButtonFactory() { return new ButtonFactory() { @Override//from w ww. j a va2 s. c o m public JButton createButton() { JideButton button = new JideButton(); button.setButtonStyle(JideButton.TOOLBAR_STYLE); button.setText(""); return button; } @Override public AbstractButton createToggleButton() { return new JideToggleButton(); } @Override public JCheckBox createCheckBox() { return new JCheckBox(); } @Override public JRadioButton createRadioButton() { return new JRadioButton(); } }; }
From source file:com.sec.ose.osi.ui.frm.main.report.JPanExportReport.java
private JRadioButton getJRadioButtonBoth() { if (jRadioButtonBoth == null) { jRadioButtonBoth = new JRadioButton(); jRadioButtonBoth.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { mEventHandler.handle(EventHandler.BTN_BOTH_REPORT); }/*from w w w .ja v a2 s .c om*/ }); } return jRadioButtonBoth; }
From source file:com.sec.ose.osi.ui.frm.main.report.JPanExportReport.java
private JRadioButton getJRadioButtonIdentify() { if (jRadioButtonIdentify == null) { jRadioButtonIdentify = new JRadioButton(); jRadioButtonIdentify.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { mEventHandler.handle(EventHandler.BTN_IDENTIFY_REPORT); }/*from w ww.jav a2 s.c om*/ }); } return jRadioButtonIdentify; }
From source file:com.sec.ose.osi.ui.frm.main.report.JPanExportReport.java
private JRadioButton getJRadioButtonSPDX() { if (jRadioButtonSPDX == null) { jRadioButtonSPDX = new JRadioButton(); jRadioButtonSPDX.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { mEventHandler.handle(EventHandler.BTN_SPDX_REPORT); }/*from w w w . ja va 2 s . c om*/ }); } return jRadioButtonSPDX; }
From source file:org.pf.midea.MainUI.java
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents menuMain = new JMenuBar(); menuFile = new JMenu(); menuItemQuit = new JMenuItem(); menuTools = new JMenu(); menuConstellations = new JMenu(); menuItemASK = new JMenuItem(); menuItemFSK = new JMenuItem(); menuItemBPSK = new JMenuItem(); menuItemQPSK = new JMenuItem(); menuItem8PSK = new JMenuItem(); menuItem16PSK = new JMenuItem(); menuItem32PSK = new JMenuItem(); menuItem16QAM = new JMenuItem(); menuItem32QAM = new JMenuItem(); menuItem64QAM = new JMenuItem(); menuItem256QAM = new JMenuItem(); menuHelp = new JMenu(); menuItemAbout = new JMenuItem(); labelSource = new JLabel(); SourceCell[] sourceCells = { new SourceCell(PlanStates.SourceType.ST_TEST), new SourceCell(PlanStates.SourceType.ST_RANDOM) }; chooserSource = new JComboBox(sourceCells); chooserSource.setRenderer(new SourceCellRenderer()); buttonAddToPlan = new JButton(); panelPlan = new JPanel(); scrollPane1 = new JScrollPane(); listPlan = new JList(); labelCode = new JLabel(); CodeCell[] codeCells = { new CodeCell(PlanStates.CodeType.CT_NONE), new CodeCell(PlanStates.CodeType.CT_HAMMING74), new CodeCell(PlanStates.CodeType.CT_CYCLIC), new CodeCell(PlanStates.CodeType.CT_BCH155) }; chooserCode = new JComboBox(codeCells); chooserCode.setRenderer(new CodeCellRenderer()); labelModulation = new JLabel(); ModulationCell[] modulationCells = { new ModulationCell(PlanStates.ModulationType.MT_ASK), new ModulationCell(PlanStates.ModulationType.MT_FSK), new ModulationCell(PlanStates.ModulationType.MT_BPSK), new ModulationCell(PlanStates.ModulationType.MT_QPSK), new ModulationCell(PlanStates.ModulationType.MT_8PSK), new ModulationCell(PlanStates.ModulationType.MT_16PSK), new ModulationCell(PlanStates.ModulationType.MT_32PSK), new ModulationCell(PlanStates.ModulationType.MT_16QAM), new ModulationCell(PlanStates.ModulationType.MT_32QAM), new ModulationCell(PlanStates.ModulationType.MT_64QAM), new ModulationCell(PlanStates.ModulationType.MT_256QAM) }; chooserModulation = new JComboBox(modulationCells); chooserModulation.setRenderer(new ModulationCellRenderer()); labelChannel = new JLabel(); ChannelCell[] channelCells = { new ChannelCell(PlanStates.ChannelType.CHT_AWGN), new ChannelCell(PlanStates.ChannelType.CHT_RAYLEIGH) }; chooserChannel = new JComboBox(channelCells); chooserChannel.setRenderer(new ChannelCellRenderer()); buttonClearPlan = new JButton(); labelErrors = new JLabel(); ErrorsCell[] errorCells = { new ErrorsCell(PlanStates.ErrorsType.ET_SER), new ErrorsCell(PlanStates.ErrorsType.ET_BER) }; chooserErrors = new JComboBox(errorCells); chooserErrors.setRenderer(new ErrorsCellRenderer()); labelLineWidth = new JLabel(); spinnerLineWidth = new JSpinner(); buttonRemoveFromPlan = new JButton(); labelLineColor = new JLabel(); ColorCell[] colorCells = { new ColorCell(null), new ColorCell(Color.black), new ColorCell(Color.red), new ColorCell(Color.green), new ColorCell(Color.blue) }; chooserLineColor = new JComboBox(colorCells); chooserLineColor.setRenderer(new ColorCellRenderer()); labelHSquare = new JLabel(); spinnerHSquareLow = new JSpinner(); labelEllipsis = new JLabel(); spinnerHSquareHigh = new JSpinner(); panelInner1 = new JPanel(); labelHSquareStep = new JLabel(); spinnerHSquareStep = new JSpinner(); labelMeasurementUnit = new JLabel(); radioButtonMeasurementUnitTimes = new JRadioButton(); radioButtonMeasurementUnitdB = new JRadioButton(); buttonRunSimulation = new JButton(); labelIterations = new JLabel(); spinnerIterations = new JSpinner(); checkBoxShowLineNumbers = new JCheckBox(); tabbedPaneResults = new JTabbedPane(); panelChart = new JPanel(); panelNumeric = new JPanel(); scrollPane2 = new JScrollPane(); textAreaNumeric = new JTextArea(); progressBar = new JProgressBar(); //======== this ======== setLayout(new FormLayout("3*(default, $lcgap), 36dlu, $lcgap, 122dlu:grow", "[21px,default], 9*($lgap, default), $lgap, default:grow, $lgap, default")); //======== menuMain ======== {// w w w . ja v a 2s.co m //======== menuFile ======== { menuFile.setText("\u0424\u0430\u0439\u043b"); //---- menuItemQuit ---- menuItemQuit.setText("\u0412\u0438\u0439\u0442\u0438"); menuItemQuit.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Q, KeyEvent.CTRL_MASK)); menuItemQuit.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { menuItemQuitActionPerformed(e); } }); menuFile.add(menuItemQuit); } menuMain.add(menuFile); //======== menuTools ======== { menuTools.setText("\u0406\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0438"); //======== menuConstellations ======== { menuConstellations.setText( "\u0421\u0438\u0433\u043d\u0430\u043b\u044c\u043d\u0456 \u0441\u0443\u0437\u0456\u0440\u2019\u044f"); //---- menuItemASK ---- menuItemASK.setText("\u0410\u041c\u043d\u2026"); menuItemASK.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { menuItemASKActionPerformed(e); } }); menuConstellations.add(menuItemASK); //---- menuItemFSK ---- menuItemFSK.setText("\u0427\u041c\u043d\u2026"); menuItemFSK.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { menuItemFSKActionPerformed(e); } }); menuConstellations.add(menuItemFSK); //---- menuItemBPSK ---- menuItemBPSK.setText("\u0424\u041c\u043d\u2026"); menuItemBPSK.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { menuItemBPSKActionPerformed(e); } }); menuConstellations.add(menuItemBPSK); //---- menuItemQPSK ---- menuItemQPSK.setText("\u0424\u041c-4\u2026"); menuItemQPSK.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { menuItemQPSKActionPerformed(e); } }); menuConstellations.add(menuItemQPSK); //---- menuItem8PSK ---- menuItem8PSK.setText("\u0424\u041c-8\u2026"); menuItem8PSK.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { menuItem8PSKActionPerformed(e); } }); menuConstellations.add(menuItem8PSK); //---- menuItem16PSK ---- menuItem16PSK.setText("\u0424\u041c-16\u2026"); menuItem16PSK.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { menuItem16PSKActionPerformed(e); } }); menuConstellations.add(menuItem16PSK); //---- menuItem32PSK ---- menuItem32PSK.setText("\u0424\u041c-32\u2026"); menuItem32PSK.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { menuItem32PSKActionPerformed(e); } }); menuConstellations.add(menuItem32PSK); //---- menuItem16QAM ---- menuItem16QAM.setText("\u041a\u0410\u041c-16\u2026"); menuItem16QAM.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { menuItem16QAMActionPerformed(e); } }); menuConstellations.add(menuItem16QAM); //---- menuItem32QAM ---- menuItem32QAM.setText("\u041a\u0410\u041c-32\u2026"); menuItem32QAM.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { menuItem32QAMActionPerformed(e); } }); menuConstellations.add(menuItem32QAM); //---- menuItem64QAM ---- menuItem64QAM.setText("\u041a\u0410\u041c-64\u2026"); menuItem64QAM.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { menuItem64QAMActionPerformed(e); } }); menuConstellations.add(menuItem64QAM); //---- menuItem256QAM ---- menuItem256QAM.setText("\u041a\u0410\u041c-256\u2026"); menuItem256QAM.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { menuItem256QAMActionPerformed(e); } }); menuConstellations.add(menuItem256QAM); } menuTools.add(menuConstellations); } menuMain.add(menuTools); //======== menuHelp ======== { menuHelp.setText("\u0414\u043e\u0432\u0456\u0434\u043a\u0430"); //---- menuItemAbout ---- menuItemAbout.setText("\u041f\u0440\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u0443\u2026"); menuItemAbout.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { menuItemAboutActionPerformed(e); } }); menuHelp.add(menuItemAbout); } menuMain.add(menuHelp); } add(menuMain, CC.xywh(1, 1, 9, 1, CC.FILL, CC.FILL)); //---- labelSource ---- labelSource.setText("\u0414\u0436\u0435\u0440\u0435\u043b\u043e:"); add(labelSource, CC.xy(1, 3)); add(chooserSource, CC.xy(3, 3)); //---- buttonAddToPlan ---- buttonAddToPlan.setText("\u2192"); buttonAddToPlan.setToolTipText( "\u0414\u043e\u0434\u0430\u0442\u0438 \u0434\u043e \u043f\u043b\u0430\u043d\u0443 \u0435\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0443"); buttonAddToPlan.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { buttonAddToPlanActionPerformed(e); } }); add(buttonAddToPlan, CC.xywh(5, 3, 1, 5)); //======== panelPlan ======== { panelPlan.setLayout(new GridLayout()); //======== scrollPane1 ======== { scrollPane1.setViewportView(listPlan); } panelPlan.add(scrollPane1); } add(panelPlan, CC.xywh(7, 3, 3, 13)); //---- labelCode ---- labelCode.setText("\u041a\u043e\u0434:"); add(labelCode, CC.xy(1, 5)); add(chooserCode, CC.xy(3, 5)); //---- labelModulation ---- labelModulation.setText("\u041c\u043e\u0434\u0443\u043b\u044f\u0446\u0456\u044f:"); add(labelModulation, CC.xy(1, 7)); add(chooserModulation, CC.xy(3, 7)); //---- labelChannel ---- labelChannel.setText("\u041a\u0430\u043d\u0430\u043b:"); add(labelChannel, CC.xy(1, 9)); add(chooserChannel, CC.xy(3, 9)); //---- buttonClearPlan ---- buttonClearPlan.setText("X"); buttonClearPlan.setToolTipText( "\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u0438 \u043f\u043b\u0430\u043d \u0435\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0443"); buttonClearPlan.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { buttonClearPlanActionPerformed(e); } }); add(buttonClearPlan, CC.xy(5, 9)); //---- labelErrors ---- labelErrors.setText("\u041f\u043e\u043c\u0438\u043b\u043a\u0438:"); add(labelErrors, CC.xy(1, 11)); add(chooserErrors, CC.xy(3, 11)); //---- labelLineWidth ---- labelLineWidth.setText("\u0422\u043e\u0432\u0449\u0438\u043d\u0430 \u043b\u0456\u043d\u0456\u0457:"); add(labelLineWidth, CC.xy(1, 13)); //---- spinnerLineWidth ---- spinnerLineWidth.setModel(new SpinnerNumberModel(2, 1, 5, 1)); add(spinnerLineWidth, CC.xy(3, 13)); //---- buttonRemoveFromPlan ---- buttonRemoveFromPlan.setText("\u2190"); buttonRemoveFromPlan.setToolTipText( "\u0412\u0438\u0434\u0430\u043b\u0438\u0442\u0438 \u0437 \u043f\u043b\u0430\u043d\u0443 \u0435\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0443"); buttonRemoveFromPlan.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { buttonRemoveFromPlanActionPerformed(e); } }); add(buttonRemoveFromPlan, CC.xywh(5, 11, 1, 5)); //---- labelLineColor ---- labelLineColor.setText("\u041a\u043e\u043b\u0456\u0440 \u043b\u0456\u043d\u0456\u0457:"); add(labelLineColor, CC.xy(1, 15)); add(chooserLineColor, CC.xy(3, 15)); //---- labelHSquare ---- labelHSquare.setText("h\u00b2="); add(labelHSquare, CC.xy(1, 17)); //---- spinnerHSquareLow ---- spinnerHSquareLow.setModel(new SpinnerNumberModel(0.0, null, null, 1.0)); add(spinnerHSquareLow, CC.xy(3, 17)); //---- labelEllipsis ---- labelEllipsis.setText("\u2026"); add(labelEllipsis, CC.xy(5, 17, CC.CENTER, CC.DEFAULT)); //---- spinnerHSquareHigh ---- spinnerHSquareHigh.setModel(new SpinnerNumberModel(15.0, null, null, 1.0)); add(spinnerHSquareHigh, CC.xy(7, 17)); //======== panelInner1 ======== { panelInner1.setLayout(new FormLayout("5*(default, $lcgap), default:grow", "default")); //---- labelHSquareStep ---- labelHSquareStep.setText(", \u043a\u0440\u043e\u043a:"); panelInner1.add(labelHSquareStep, CC.xy(1, 1)); //---- spinnerHSquareStep ---- spinnerHSquareStep.setModel(new SpinnerNumberModel(0.5, 0.001, null, 0.1)); panelInner1.add(spinnerHSquareStep, CC.xy(3, 1)); //---- labelMeasurementUnit ---- labelMeasurementUnit.setText(", \u043e\u0434\u0438\u043d\u0438\u0446\u0456:"); panelInner1.add(labelMeasurementUnit, CC.xy(5, 1)); //---- radioButtonMeasurementUnitTimes ---- radioButtonMeasurementUnitTimes.setText("\u0440\u0430\u0437\u0438"); radioButtonMeasurementUnitTimes.setSelected(true); panelInner1.add(radioButtonMeasurementUnitTimes, CC.xy(7, 1, CC.LEFT, CC.DEFAULT)); //---- radioButtonMeasurementUnitdB ---- radioButtonMeasurementUnitdB.setText("\u0434\u0411"); panelInner1.add(radioButtonMeasurementUnitdB, CC.xy(9, 1, CC.LEFT, CC.DEFAULT)); //---- buttonRunSimulation ---- buttonRunSimulation.setText("\u0412\u0438\u043a\u043e\u043d\u0430\u0442\u0438"); buttonRunSimulation.setToolTipText( "\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0438 \u043c\u043e\u0434\u0435\u043b\u044e\u0432\u0430\u043d\u043d\u044f"); buttonRunSimulation.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { buttonRunSimulationActionPerformed(e); } }); panelInner1.add(buttonRunSimulation, CC.xy(11, 1, CC.RIGHT, CC.DEFAULT)); } add(panelInner1, CC.xy(9, 17)); //---- labelIterations ---- labelIterations.setText("\u0406\u0442\u0435\u0440\u0430\u0446\u0456\u0439:"); add(labelIterations, CC.xy(1, 19)); //---- spinnerIterations ---- spinnerIterations.setModel(new SpinnerNumberModel(200000, 1, null, 50000)); add(spinnerIterations, CC.xy(3, 19)); //---- checkBoxShowLineNumbers ---- checkBoxShowLineNumbers.setText( "\u041d\u0443\u043c\u0435\u0440\u0443\u0432\u0430\u0442\u0438 \u0433\u0440\u0430\u0444\u0456\u043a\u0438"); add(checkBoxShowLineNumbers, CC.xywh(7, 19, 3, 1)); //======== tabbedPaneResults ======== { //======== panelChart ======== { panelChart.setLayout(new BoxLayout(panelChart, BoxLayout.X_AXIS)); } tabbedPaneResults.addTab("\u0413\u0440\u0430\u0444\u0456\u043a\u0438", panelChart); //======== panelNumeric ======== { panelNumeric.setLayout(new FormLayout("default:grow", "default:grow")); //======== scrollPane2 ======== { //---- textAreaNumeric ---- textAreaNumeric.setCursor(Cursor.getPredefinedCursor(Cursor.TEXT_CURSOR)); textAreaNumeric.setEditable(false); scrollPane2.setViewportView(textAreaNumeric); } panelNumeric.add(scrollPane2, CC.xy(1, 1, CC.DEFAULT, CC.FILL)); } tabbedPaneResults.addTab("\u0427\u0438\u0441\u043b\u043e\u0432\u0456 \u0434\u0430\u043d\u0456", panelNumeric); } add(tabbedPaneResults, CC.xywh(1, 21, 9, 1, CC.DEFAULT, CC.FILL)); add(progressBar, CC.xywh(1, 23, 9, 1)); //---- buttonGroupMeasurementUnit ---- ButtonGroup buttonGroupMeasurementUnit = new ButtonGroup(); buttonGroupMeasurementUnit.add(radioButtonMeasurementUnitTimes); buttonGroupMeasurementUnit.add(radioButtonMeasurementUnitdB); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:com.pianobakery.complsa.MainGui.java
/** * Method generated by IntelliJ IDEA GUI Designer * >>> IMPORTANT!! <<< * DO NOT edit this method OR call it in your code! * * @noinspection ALL/*from w ww. jav a 2s . c o m*/ */ private void $$$setupUI$$$() { createUIComponents(); mainPanel = new JPanel(); mainPanel.setLayout(new FormLayout("fill:max(m;620px):grow", "center:max(m;600px):grow")); tabbedPane1 = new JTabbedPane(); tabbedPane1.setEnabled(true); CellConstraints cc = new CellConstraints(); mainPanel.add(tabbedPane1, cc.xy(1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); setupPanel = new JPanel(); setupPanel.setLayout(new FormLayout( "fill:d:noGrow,left:4dlu:noGrow,fill:max(d;4px):noGrow,left:4dlu:noGrow,fill:126px:noGrow,fill:max(d;4px):noGrow,fill:max(d;4px):noGrow,left:4dlu:noGrow,fill:max(d;4px):noGrow,left:5dlu:noGrow,fill:max(d;4px):noGrow,left:4dlu:noGrow,fill:max(d;4px):noGrow,left:4dlu:noGrow,fill:max(d;4px):noGrow,left:4dlu:noGrow,fill:max(d;4px):noGrow,left:4dlu:noGrow,fill:max(d;4px):noGrow,left:4dlu:noGrow,fill:max(d;4px):noGrow,left:4dlu:noGrow,fill:max(d;4px):noGrow,left:4dlu:noGrow,fill:max(d;4px):noGrow,left:4dlu:noGrow,fill:d:grow,left:4dlu:noGrow,fill:max(d;4px):noGrow,left:4dlu:noGrow,fill:52px:noGrow,left:4dlu:noGrow,fill:max(d;4px):noGrow,left:4dlu:noGrow,fill:max(d;4px):noGrow,left:4dlu:noGrow,fill:max(d;4px):noGrow,left:4dlu:noGrow,fill:max(d;4px):noGrow,left:4dlu:noGrow,fill:max(d;4px):noGrow,left:4dlu:noGrow,fill:max(d;4px):noGrow,left:4dlu:noGrow,fill:max(d;4px):noGrow,left:4dlu:noGrow,fill:d:grow,left:4dlu:noGrow,fill:max(d;4px):noGrow,left:4dlu:noGrow,fill:d:grow,fill:d:grow,fill:d:grow,fill:66px:noGrow", "center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:d:noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow")); tabbedPane1.addTab("Project", setupPanel); newFolderButton = new JButton(); newFolderButton.setText("New Folder"); setupPanel.add(newFolderButton, cc.xy(1, 5)); final JLabel label1 = new JLabel(); label1.setText("Project Folder:"); setupPanel.add(label1, cc.xy(1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); selectFolderButton = new JButton(); selectFolderButton.setText("Select Folder"); setupPanel.add(selectFolderButton, cc.xy(5, 5)); wDirText = new JTextField(); wDirText.setEditable(false); wDirText.setText("Create or select Project Folder"); setupPanel.add(wDirText, cc.xyw(7, 5, 48, CellConstraints.FILL, CellConstraints.DEFAULT)); final JLabel label2 = new JLabel(); label2.setText("The Project Folder contains all the Project Data."); setupPanel.add(label2, cc.xyw(1, 3, 54)); final JLabel label3 = new JLabel(); label3.setText("Arrange your Documents in a Folder. Then add it to the Software."); setupPanel.add(label3, cc.xyw(1, 15, 54)); downloadModelButton = new JButton(); downloadModelButton.setText("Download Models"); setupPanel.add(downloadModelButton, cc.xy(1, 9)); final JLabel label4 = new JLabel(); label4.setText("Language Models:"); setupPanel.add(label4, cc.xy(5, 9)); langModelsText = new JLabel(); langModelsText.setText(""); setupPanel.add(langModelsText, cc.xyw(7, 9, 48)); trainCorpButton = new JButton(); trainCorpButton.setText("Train Semantics"); setupPanel.add(trainCorpButton, cc.xy(1, 33, CellConstraints.FILL, CellConstraints.DEFAULT)); final JLabel label5 = new JLabel(); label5.setText("Create Semantic Knowledge with selected Training Corpus:"); setupPanel.add(label5, cc.xyw(1, 25, 7)); addTopicCorpusButton = new JButton(); addTopicCorpusButton.setEnabled(true); addTopicCorpusButton.setText(" Add Corpus Folder"); setupPanel.add(addTopicCorpusButton, cc.xy(1, 19)); addCorpRecursiveCheckBox = new JCheckBox(); addCorpRecursiveCheckBox.setSelected(true); addCorpRecursiveCheckBox.setText("Recursive"); setupPanel.add(addCorpRecursiveCheckBox, cc.xy(5, 19)); createChunksCheckBox = new JCheckBox(); createChunksCheckBox.setSelected(true); createChunksCheckBox.setText("Split in Paragraph of:"); setupPanel.add(createChunksCheckBox, cc.xy(7, 19)); final JLabel label6 = new JLabel(); label6.setText("Add/Remove Training Corpus:"); setupPanel.add(label6, cc.xyw(1, 17, 5)); final JLabel label7 = new JLabel(); label7.setText("Select Training Corpus:"); setupPanel.add(label7, cc.xyw(1, 21, 54)); selectTrainCorp = new JComboBox(); selectTrainCorp.setEnabled(true); setupPanel.add(selectTrainCorp, cc.xyw(1, 23, 5)); removeTopicCorpusButton = new JButton(); removeTopicCorpusButton.setEnabled(true); removeTopicCorpusButton.setHorizontalAlignment(2); removeTopicCorpusButton.setText("Remove Training Corpus"); setupPanel.add(removeTopicCorpusButton, cc.xy(7, 23)); setupPanel.add(indexTypeComboBox, cc.xy(7, 33)); amountOfSentencesPerTextField = new JTextField(); amountOfSentencesPerTextField.setHorizontalAlignment(2); amountOfSentencesPerTextField.setText("20"); setupPanel.add(amountOfSentencesPerTextField, cc.xyw(9, 19, 6, CellConstraints.FILL, CellConstraints.DEFAULT)); posIndRadiusTextField = new JTextField(); posIndRadiusTextField.setHorizontalAlignment(2); posIndRadiusTextField.setText("20"); setupPanel.add(posIndRadiusTextField, cc.xyw(9, 33, 6, CellConstraints.FILL, CellConstraints.DEFAULT)); final JLabel label8 = new JLabel(); label8.setText("Indextype:"); setupPanel.add(label8, cc.xy(5, 33, CellConstraints.RIGHT, CellConstraints.DEFAULT)); final JLabel label9 = new JLabel(); label9.setHorizontalAlignment(2); label9.setText("Sentences"); setupPanel.add(label9, cc.xy(15, 19)); final JLabel label10 = new JLabel(); label10.setHorizontalAlignment(2); label10.setText("Words"); setupPanel.add(label10, cc.xy(15, 33)); setupPanel.add(termComboBox, cc.xyw(31, 33, 19)); final JLabel label11 = new JLabel(); label11.setText("Termweight:"); setupPanel.add(label11, cc.xyw(18, 33, 13)); updateIndexButton = new JButton(); updateIndexButton.setText("Update Index"); setupPanel.add(updateIndexButton, cc.xy(1, 29)); removeIndexButton = new JButton(); removeIndexButton.setText("Remove Index"); setupPanel.add(removeIndexButton, cc.xy(5, 29)); final JLabel label12 = new JLabel(); label12.setText("Add/Remove Search Corpus:"); setupPanel.add(label12, cc.xyw(1, 41, 5)); impSearchCorpButton = new JButton(); impSearchCorpButton.setText("Add Search Corpus"); setupPanel.add(impSearchCorpButton, cc.xy(1, 43)); impSearchCorpRecursiveCheckBox = new JCheckBox(); impSearchCorpRecursiveCheckBox.setSelected(true); impSearchCorpRecursiveCheckBox.setText("Recursive"); setupPanel.add(impSearchCorpRecursiveCheckBox, cc.xy(5, 43)); splitSearchCorpCheckBox = new JCheckBox(); splitSearchCorpCheckBox.setSelected(true); splitSearchCorpCheckBox.setText("Split in Paragraph of:"); setupPanel.add(splitSearchCorpCheckBox, cc.xy(7, 43)); amountSearchCorpSent = new JTextField(); amountSearchCorpSent.setHorizontalAlignment(2); amountSearchCorpSent.setText("20"); setupPanel.add(amountSearchCorpSent, cc.xyw(9, 43, 6, CellConstraints.FILL, CellConstraints.DEFAULT)); final JLabel label13 = new JLabel(); label13.setHorizontalAlignment(2); label13.setText("Sentences"); setupPanel.add(label13, cc.xy(15, 43)); searchCorpComboBox = new JComboBox(); setupPanel.add(searchCorpComboBox, cc.xyw(1, 47, 5, CellConstraints.DEFAULT, CellConstraints.TOP)); removeSearchCorpButton = new JButton(); removeSearchCorpButton.setText("Remove Search Corpus"); setupPanel.add(removeSearchCorpButton, cc.xy(7, 47)); final JLabel label14 = new JLabel(); label14.setText("Select Search Corpus:"); setupPanel.add(label14, cc.xyw(1, 45, 5)); final JLabel label15 = new JLabel(); label15.setText("Arrange your Search Corpus in a Folder. Then add it to the Software. "); setupPanel.add(label15, cc.xyw(1, 39, 54)); final JLabel label16 = new JLabel(); label16.setText("First update the Index."); setupPanel.add(label16, cc.xyw(1, 27, 5)); final JLabel label17 = new JLabel(); label17.setText( "Then select an Algorithm and train the Software. On the Search Tab you can select the Algorithms to run your semantic searches."); setupPanel.add(label17, cc.xyw(1, 31, 54)); final JLabel label18 = new JLabel(); label18.setText("Download Language Models:"); setupPanel.add(label18, cc.xyw(1, 7, 54)); final JLabel label19 = new JLabel(); label19.setText("Training Corpora:"); setupPanel.add(label19, cc.xyw(1, 13, 54)); final JLabel label20 = new JLabel(); label20.setText("Search Corpora:"); setupPanel.add(label20, cc.xyw(1, 37, 54)); final JLabel label21 = new JLabel(); label21.setEnabled(true); label21.setText(" "); setupPanel.add(label21, cc.xy(1, 11)); final JLabel label22 = new JLabel(); label22.setText(" "); setupPanel.add(label22, cc.xy(1, 35)); searchDocs = new JPanel(); searchDocs.setLayout(new FormLayout( "left:4dlu:noGrow,left:4dlu:noGrow,fill:max(d;4px):noGrow,left:4dlu:noGrow,fill:max(d;4px):noGrow,left:4dlu:noGrow,fill:277px:noGrow,left:4dlu:noGrow,left:4dlu:noGrow,fill:max(d;4px):noGrow,left:4dlu:noGrow,fill:max(m;400px):grow,left:4dlu:noGrow,fill:max(m;200px):grow", "center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,top:3dlu:noGrow,center:d:noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:243px:grow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:38px:noGrow,top:3dlu:noGrow")); searchDocs.setEnabled(true); tabbedPane1.addTab("Search", searchDocs); final JLabel label23 = new JLabel(); label23.setText("Choose Semantic Knowledge Algorithm:"); searchDocs.add(label23, cc.xyw(3, 1, 5)); final JLabel label24 = new JLabel(); label24.setText("Enter Search Text or select Search Document:"); searchDocs.add(label24, cc.xyw(3, 20, 5)); final JLabel label25 = new JLabel(); label25.setText("Document Search Results:"); searchDocs.add(label25, cc.xyw(10, 1, 3)); final JLabel label26 = new JLabel(); label26.setText("Selection Metadata:"); searchDocs.add(label26, cc.xyw(10, 27, 3)); selectIndexTypeComboBox = new JComboBox(); searchDocs.add(selectIndexTypeComboBox, cc.xyw(7, 10, 3)); final JLabel label27 = new JLabel(); label27.setText("Index Type:"); searchDocs.add(label27, cc.xy(7, 8)); final JLabel label28 = new JLabel(); label28.setText("Termweight:"); searchDocs.add(label28, cc.xy(7, 12)); selectTermweightComboBox = new JComboBox(); searchDocs.add(selectTermweightComboBox, cc.xy(7, 14)); final JLabel label29 = new JLabel(); label29.setText("Number of search results:"); searchDocs.add(label29, cc.xy(7, 16)); noOfSearchResultsText = new JTextField(); noOfSearchResultsText.setText("20"); searchDocs.add(noOfSearchResultsText, cc.xy(7, 18, CellConstraints.FILL, CellConstraints.DEFAULT)); final JScrollPane scrollPane1 = new JScrollPane(); searchDocs.add(scrollPane1, cc.xywh(7, 22, 1, 2, CellConstraints.FILL, CellConstraints.FILL)); searchTextArea = new JTextArea(); searchTextArea.setLineWrap(true); searchTextArea.setText(""); searchTextArea.setWrapStyleWord(true); scrollPane1.setViewportView(searchTextArea); selTextRadioButton = new JRadioButton(); selTextRadioButton.setSelected(true); selTextRadioButton.setText(""); searchDocs.add(selTextRadioButton, cc.xy(5, 22)); algTextField = new JLabel(); algTextField.setText("Knowledge Corpus: null"); searchDocs.add(algTextField, cc.xy(7, 3, CellConstraints.DEFAULT, CellConstraints.FILL)); selectDocumentButton = new JButton(); selectDocumentButton.setEnabled(false); selectDocumentButton.setText("Select Document"); searchDocs.add(selectDocumentButton, cc.xy(7, 25)); selDocRadioButton = new JRadioButton(); selDocRadioButton.setText(""); searchDocs.add(selDocRadioButton, cc.xy(5, 25)); final JLabel label30 = new JLabel(); label30.setText("Select Corpus to Search:"); searchDocs.add(label30, cc.xyw(3, 30, 5)); searchTopCorpRadioButton = new JRadioButton(); searchTopCorpRadioButton.setSelected(true); searchTopCorpRadioButton.setText("Topic Corpus"); searchDocs.add(searchTopCorpRadioButton, cc.xy(7, 32, CellConstraints.DEFAULT, CellConstraints.TOP)); searchSearchCorpRadioButton = new JRadioButton(); searchSearchCorpRadioButton.setSelected(false); searchSearchCorpRadioButton.setText("Search Corpus"); searchDocs.add(searchSearchCorpRadioButton, cc.xy(7, 34, CellConstraints.DEFAULT, CellConstraints.TOP)); searchButton = new JButton(); searchButton.setText("Search"); searchDocs.add(searchButton, cc.xy(7, 36)); final JScrollPane scrollPane2 = new JScrollPane(); searchDocs.add(scrollPane2, cc.xywh(10, 30, 3, 7, CellConstraints.FILL, CellConstraints.FILL)); metadataTextField = new JTextArea(); metadataTextField.setEditable(false); scrollPane2.setViewportView(metadataTextField); termTablePane = new JScrollPane(); termTablePane.setEnabled(true); termTablePane.setVerticalScrollBarPolicy(22); searchDocs.add(termTablePane, cc.xywh(14, 3, 1, 21, CellConstraints.FILL, CellConstraints.FILL)); termSearchResTable.setAutoCreateRowSorter(true); termSearchResTable.setAutoResizeMode(2); termSearchResTable.setFillsViewportHeight(false); termSearchResTable.setForeground(new Color(-16777216)); termTablePane.setViewportView(termSearchResTable); docTablePane = new JScrollPane(); docTablePane.setVerticalScrollBarPolicy(22); searchDocs.add(docTablePane, cc.xywh(10, 3, 3, 21, CellConstraints.FILL, CellConstraints.FILL)); docSearchResTable.setAutoCreateRowSorter(true); docTablePane.setViewportView(docSearchResTable); final JLabel label31 = new JLabel(); label31.setText("Term Search Result:"); searchDocs.add(label31, cc.xy(14, 1)); searchDocValue = new JLabel(); searchDocValue.setText("nothing selected"); searchDocs.add(searchDocValue, cc.xyw(12, 25, 3, CellConstraints.LEFT, CellConstraints.DEFAULT)); openSearchDocumentButton = new JButton(); openSearchDocumentButton.setEnabled(false); openSearchDocumentButton.setText("Open Search Document"); searchDocs.add(openSearchDocumentButton, cc.xy(10, 25, CellConstraints.LEFT, CellConstraints.DEFAULT)); }