SslModeComponent() { super(); setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0)); fullModeRadioButton = new JRadioButton("Full Verification"); fullModeRadioButton.putClientProperty("SSL_MODE", AgentBootstrapperArgs.SslMode.FULL); fullModeRadioButton.setToolTipText("Perform a complete SSL verification before connecting to the agent."); noneModeRadioButton = new JRadioButton("No verification"); noneModeRadioButton.putClientProperty("SSL_MODE", AgentBootstrapperArgs.SslMode.NONE); noneModeRadioButton.setToolTipText("Completely disable any SSL verification"); noHostVerifyModeRadioButton = new JRadioButton("Don't verify host"); noHostVerifyModeRadioButton.putClientProperty("SSL_MODE", AgentBootstrapperArgs.SslMode.NO_VERIFY_HOST); noHostVerifyModeRadioButton.setToolTipText("Verify the server certificate, but not the hostname."); ButtonGroup sslModeButtonGroup = new ButtonGroup(); ActionListener actionListener = e -> { JRadioButton b = (JRadioButton) e.getSource(); setSslMode((AgentBootstrapperArgs.SslMode) b.getClientProperty("SSL_MODE")); }; for (JRadioButton button : Arrays.asList(fullModeRadioButton, noneModeRadioButton, noHostVerifyModeRadioButton)) { sslModeButtonGroup.add(button); add(button); button.addActionListener(actionListener); } }
useProjectConfigurationRadio.setToolTipText(CheckStyleBundle.message("config.module.project-configuration.tooltip")); useProjectConfigurationRadio.addActionListener(new RadioListener()); useModuleConfigurationRadio.setToolTipText(CheckStyleBundle.message("config.module.module-configuration.tooltip")); useModuleConfigurationRadio.addActionListener(new RadioListener()); excludeRadio.setToolTipText(CheckStyleBundle.message("config.module.exclude.tooltip")); excludeRadio.addActionListener(new RadioListener());
this.radioIsTamperingSpaceToMultilineComment.setToolTipText(tooltipIsTamperingSpaceToMultilineComment); this.radioIsTamperingSpaceToMultilineComment.setFocusable(false); JButton labelIsTamperingSpaceToMultilineComment = new JButton("Replace blank space ' ' to multiline comment '/**/'"); this.radioIsTamperingSpaceToDashComment.setToolTipText(tooltipIsTamperingSpaceToDashComment); this.radioIsTamperingSpaceToDashComment.setFocusable(false); JButton labelIsTamperingSpaceToDashComment = new JButton("Replace blank space ' ' to dash comment '--\\n'"); this.radioIsTamperingSpaceToSharpComment.setToolTipText(tooltipIsTamperingSpaceToSharpComment); this.radioIsTamperingSpaceToSharpComment.setFocusable(false); JButton labelIsTamperingSpaceToSharpComment = new JButton("Replace blank space ' ' to sharp comment '#\\n'");
public void run() { if (project != null) { org.openide.awt.Mnemonics.setLocalizedText(fromProjectRadio, Bundle.CompareSnapshotsAction_FromProjectRadioText()); fromProjectRadio.setToolTipText(null); } else { org.openide.awt.Mnemonics.setLocalizedText(fromProjectRadio, Bundle.CompareSnapshotsAction_FromCurrentLocationRadioText()); fromProjectRadio.setToolTipText(snapshotDir != null ? snapshotDir.getAbsolutePath() : null); } } });
private void createRadioButton(String label,String toolTipText,boolean state,String methodName,ButtonGroup filterGroup,JPanel radioBar) { JRadioButton noStateFilter = new JRadioButton(label,state); noStateFilter.setToolTipText(toolTipText); noStateFilter.addActionListener(EventHandler.create(ActionListener.class, this, methodName)); filterGroup.add(noStateFilter); radioBar.add(noStateFilter); } private JPanel createFilterComponents() {
private void fillMetrics(String[] metrics, JPanel panel) { if (metrics != null) { MetricActionListener listener = new MetricActionListener(); for (int i = 0; i < metrics.length / 2; i++) { JRadioButton radio = new JRadioButton(metrics[2 * i]); String action = metrics[2 * i]; if (action.endsWith(defaultMarker)) { action = action.substring(0, action.length() - defaultMarker.length()); } radio.setActionCommand(action); radio.setToolTipText(metrics[2 * i + 1]); radio.addActionListener(listener); buttonGroupMetrics.add(radio); panel.add(radio); } } else { panel.add(new JLabel(" None...")); } }
private void initProcessors() { int i = 0; for (Processor processor : Lookup.getDefault().lookupAll(Processor.class)) { JRadioButton radio = new JRadioButton(processor.getDisplayName()); radio.setToolTipText(processor.getDisplayName()); radio.putClientProperty(PROCESSOR_KEY, processor); processorGroup.add(radio); } }
private void fillMetrics(String[] metrics, JPanel panel) { if (metrics != null) { MetricActionListener listener = new MetricActionListener(); for (int i = 0; i < metrics.length / 2; i++) { JRadioButton radio = new JRadioButton(metrics[2 * i]); String action = metrics[2 * i]; if (action.endsWith(defaultMarker)) { action = action.substring(0, action.length() - defaultMarker.length()); } radio.setActionCommand(action); radio.setToolTipText(metrics[2 * i + 1]); radio.addActionListener(listener); buttonGroupMetrics.add(radio); panel.add(radio); } } else { panel.add(new JLabel(" None...")); } }
private void fillMetrics(String[] metrics, JPanel panel) { if (metrics != null) { MetricActionListener listener = new MetricActionListener(); for (int i = 0; i < metrics.length / 2; i++) { JRadioButton radio = new JRadioButton(metrics[2 * i]); String action = metrics[2 * i]; if (action.endsWith(defaultMarker)) { action = action.substring(0, action.length() - defaultMarker.length()); } radio.setActionCommand(action); radio.setToolTipText(metrics[2 * i + 1]); radio.addActionListener(listener); buttonGroupMetrics.add(radio); panel.add(radio); } } else { panel.add(new JLabel(" None...")); } }
private void addTabularPresentationRadioButton(JPanel panel, int col, int row) { final GridBagConstraints c = new GridBagConstraints(); c.gridx = col; c.gridy = row; c.gridwidth = 2; // Span across two columns c.anchor = GridBagConstraints.WEST; final String cbToolTipText = s_stringMgr.getString("DBDiffPreferencesPanel.tabularPresentationRadioButtonToolTipText"); tabularPresentationRadioButton.setToolTipText(cbToolTipText); tabularPresentationRadioButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { if (e.getSource() == tabularPresentationRadioButton) { internalDiffWindowRadioButton.setEnabled(false); externalDiffToolRadionButton.setEnabled(false); externalDiffToolCommandLabel.setEnabled(false); externalDiffToolCommandTextField.setEnabled(false); } } }); panel.add(tabularPresentationRadioButton, c); }
private JPanel createChooseResPanel() { JPanel chooseResPanel = new JPanel(new BorderLayout(0, 5)); sysResButton = new JRadioButton(); sysResButton.setSelected(true); sysResButton.setText(SYS_RES_COMMAND); sysResButton.setToolTipText(SYS_RES_COMMAND); sysResButton.setEnabled(true); sysResButton.addActionListener(this); custResButton = new JRadioButton(); custResButton.setSelected(false); custResButton.setText(CUST_RES_COMMAND); custResButton.setToolTipText(CUST_RES_COMMAND); custResButton.setEnabled(true); custResButton.addActionListener(this); providerDNSradioGroup.add(sysResButton); providerDNSradioGroup.add(custResButton); chooseResPanel.add(sysResButton, BorderLayout.WEST); chooseResPanel.add(custResButton, BorderLayout.CENTER); return chooseResPanel; }
private void addInternalDiffWindowRadionButton(JPanel panel, int col, int row) { final GridBagConstraints c = new GridBagConstraints(); c.gridx = col; c.gridy = row; c.gridwidth = 2; // Span across two columns c.insets = new Insets(5, 20, 0, 0); c.anchor = GridBagConstraints.WEST; final String cbLabelStr = s_stringMgr.getString("DBDiffPreferencesPanel.internalDiffWindowRadionButtonLabel"); final String toolTipText = s_stringMgr.getString("DBDiffPreferencesPanel.internalDiffWindowRadionButtonToolTip"); internalDiffWindowRadioButton = new JRadioButton(cbLabelStr); internalDiffWindowRadioButton.setToolTipText(toolTipText); internalDiffWindowRadioButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { if (e.getSource() == internalDiffWindowRadioButton) { externalDiffToolCommandLabel.setEnabled(false); externalDiffToolCommandTextField.setEditable(false); } } }); panel.add(internalDiffWindowRadioButton, c); }
JRadioButton jrb = new JRadioButton(); int width = (int) SwingUtilities2.getFontMetrics( jrb, jrb.getFont() ).getStringBounds( cat.getDescription(), null ).getWidth(); for (Case c : cases) { JRadioButton jrbCase = new JRadioButton(); jrbCase.setText(c.getDescription()); jrbCase.setToolTipText(c.getText()); jrbCase.setPreferredSize( new Dimension( width, jrbCase.getPreferredSize().height ) ); bgCases.add(jrbCase); jp.add(jrbCase); }
protected void createDmdFormat() { $objectMap.put("dmdFormat", dmdFormat = new JRadioButton()); dmdFormat.setName("dmdFormat"); dmdFormat.setText(t("jaxx.coordinate.format.dmd")); dmdFormat.setToolTipText(t("jaxx.coordinate.format.dmd.tip")); }
protected void createDdFormat() { $objectMap.put("ddFormat", ddFormat = new JRadioButton()); ddFormat.setName("ddFormat"); ddFormat.setText(t("jaxx.coordinate.format.dd")); ddFormat.setToolTipText(t("jaxx.coordinate.format.dd.tip")); }
protected void createDmsFormat() { $objectMap.put("dmsFormat", dmsFormat = new JRadioButton()); dmsFormat.setName("dmsFormat"); dmsFormat.setText(t("jaxx.coordinate.format.dms")); dmsFormat.setToolTipText(t("jaxx.coordinate.format.dms.tip")); }
public static JRadioButton createRadioButton(String label, String toolTip) { JRadioButton radioButton = new JRadioButton(label); radioButton.setToolTipText(toolTip); radioButton.setIcon(Icons.light_off); radioButton.setRolloverIcon(Icons.light_off); radioButton.setSelectedIcon(Icons.light_on); radioButton.setRolloverSelectedIcon(Icons.light_on); return radioButton; }
protected void $initialize_05_setProperties() { if (log.isDebugEnabled()) { log.debug(this); } // apply 11 property setters editor.setNumberType(Float.class); editor.setNumberPattern(SwingUtil.DECIMAL1_PATTERN); editor.setProperty(TemperatureEditorModel.PROPERTY_TEMPERATURE); cFormat.setText(JaxxWidgetsTemperatureI18nEnumHelper.getLabel(TemperatureFormat.C)); { cFormat.putClientProperty("$value", TemperatureFormat.C); Object $buttonGroup = cFormat.getClientProperty("$buttonGroup"); if ($buttonGroup instanceof JAXXButtonGroup) { ((JAXXButtonGroup) $buttonGroup).updateSelectedValue(); } } cFormat.setToolTipText(JaxxWidgetsTemperatureI18nEnumHelper.getDescription(TemperatureFormat.C)); fFormat.setText(JaxxWidgetsTemperatureI18nEnumHelper.getLabel(TemperatureFormat.F)); { fFormat.putClientProperty("$value", TemperatureFormat.F); Object $buttonGroup = fFormat.getClientProperty("$buttonGroup"); if ($buttonGroup instanceof JAXXButtonGroup) { ((JAXXButtonGroup) $buttonGroup).updateSelectedValue(); } } fFormat.setToolTipText(JaxxWidgetsTemperatureI18nEnumHelper.getDescription(TemperatureFormat.F)); }
private void initLabels() { lblCreateType.setText(i18n.LBL_CREATE_TYPE); rbPrimaryKey.setText(i18n.LBL_RB_PRIMARY_KEY); rbPrimaryKey.setToolTipText(i18n.TOOLTIP_RB_PRIMARY_KEY); rbUniqueIndex.setText(i18n.LBL_RB_UNIQUE_INDEX); rbUniqueIndex.setToolTipText(i18n.TOOLTIP_RB_UNIQUE_INDEX); lblIndexname.setText(i18n.LBL_INDEXNAME); lblTitleListSourceColumns.setText(i18n.LBL_LIST_SOURCE_COLUMNS); lblTitleListTargetColumns.setText(i18n.LBL_LIST_TARGET_COLUMNS); lblDdl.setText(i18n.LBL_DDL); btnRemove.setText(""); btnRemove.setToolTipText(i18n.TOOLTIP_BTN_REMOVE); btnAdd.setText(""); btnAdd.setToolTipText(i18n.TOOLTIP_BTN_ADD); btnAddAll.setText(""); btnAddAll.setToolTipText(i18n.TOOLTIP_BTN_ADD_ALL); btnRemoveAll.setText(""); btnRemoveAll.setToolTipText(i18n.TOOLTIP_BTN_REMOVE_ALL); btnExecuteDdl.setText(i18n.LBL_BTN_EXECUTE_DDL); btnExecuteDdl.setToolTipText(i18n.TOOLTIP_BTN_EXECUTE_DDL); btnAdd.setIcon(SmarttoolsHelper.loadIcon("add16x16.png")); btnAddAll.setIcon(SmarttoolsHelper.loadIcon("addAll16x16.png")); btnRemove.setIcon(SmarttoolsHelper.loadIcon("remove16x16.png")); btnRemoveAll.setIcon(SmarttoolsHelper.loadIcon("removeAll16x16.png")); btnExecuteDdl.setIcon(SmarttoolsHelper.loadIcon("change16x16.png")); }
@Override protected void initUI() { // do not call super.initUI() since we don't want any labels to be created _radioButton = new JRadioButton(); nameEditorComponent(_radioButton); if (getParameter().getProperties().getLabel() != null) { _radioButton.setText(getParameter().getProperties().getLabel()); } if (getParameter().getProperties().getDescription() != null) { _radioButton.setToolTipText(getParameter().getProperties().getDescription()); } _radioButton.addItemListener(new ItemListener() { public void itemStateChanged(final ItemEvent event) { updateParameter(); } }); }