private void parseArgs (String[] args) { float scale = 1f; for (int i = 0; i < args.length; i++) { final String param = args[i]; final boolean more = i < args.length - 1; if (param.equals("-b") || param.equals("--batch")) { batchMode = true; } else if (more && (param.equals("-s") || param.equals("--scale"))) { scale = Float.parseFloat(args[++i]); } else if (more && (param.equals("-i") || param.equals("--input"))) { File f = new File(args[++i]); open(f); fontFileRadio.setText(""); updateFont(); } else if (more && (param.equals("-o") || param.equals("--output"))) { File f = new File(args[++i]); saveBm(f); } else { System.err.println("Unknown parameter: " + param); exit(3); } } fontSizeSpinner.setValue((int)(0.5f + Math.max(4, scale * ((Integer)fontSizeSpinner.getValue())))); }
private void parseArgs (String[] args) { float scale = 1f; for (int i = 0; i < args.length; i++) { final String param = args[i]; final boolean more = i < args.length - 1; if (param.equals("-b") || param.equals("--batch")) { batchMode = true; } else if (more && (param.equals("-s") || param.equals("--scale"))) { scale = Float.parseFloat(args[++i]); } else if (more && (param.equals("-i") || param.equals("--input"))) { File f = new File(args[++i]); open(f); fontFileRadio.setText(""); updateFont(); } else if (more && (param.equals("-o") || param.equals("--output"))) { File f = new File(args[++i]); saveBm(f); } else { System.err.println("Unknown parameter: " + param); exit(3); } } fontSizeSpinner.setValue((int)(0.5f + Math.max(4, scale * ((Integer)fontSizeSpinner.getValue())))); }
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()); b.setActionCommand(b.getText()); if (values.getKey().equals(XPathRule.VERSION_DESCRIPTOR.defaultValue())) { b.setSelected(true); } xpathVersionButtonGroup.add(b); p.add(b); } return p; }
rbLeft.setText("left"); rbLeft.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); rbLeft.setMargin(new java.awt.Insets(0, 0, 0, 0)); rbRight.setText("right"); rbRight.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); rbRight.setMargin(new java.awt.Insets(0, 0, 0, 0)); rbBoth.setText("both"); rbBoth.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); rbBoth.setMargin(new java.awt.Insets(0, 0, 0, 0));
rbLeft.setText("left"); rbLeft.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); rbLeft.setMargin(new java.awt.Insets(0, 0, 0, 0)); rbRight.setText("right"); rbRight.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); rbRight.setMargin(new java.awt.Insets(0, 0, 0, 0)); rbBoth.setText("both"); rbBoth.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); rbBoth.setMargin(new java.awt.Insets(0, 0, 0, 0));
GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, JBUI.insets(16, 8), 0, 0)); useProjectConfigurationRadio.setText(CheckStyleBundle.message("config.module.project-configuration.text")); useProjectConfigurationRadio.setToolTipText(CheckStyleBundle.message("config.module.project-configuration.tooltip")); useProjectConfigurationRadio.addActionListener(new RadioListener()); useModuleConfigurationRadio.setText(CheckStyleBundle.message("config.module.module-configuration.text")); useModuleConfigurationRadio.setToolTipText(CheckStyleBundle.message("config.module.module-configuration.tooltip")); useModuleConfigurationRadio.addActionListener(new RadioListener()); excludeRadio.setText(CheckStyleBundle.message("config.module.exclude.text")); excludeRadio.setToolTipText(CheckStyleBundle.message("config.module.exclude.tooltip")); excludeRadio.addActionListener(new RadioListener());
insecureHttpCheckbox.setToolTipText(CheckStyleBundle.message("config.file.insecure-http.tooltip")); fileLocationRadio.setText(CheckStyleBundle.message("config.file.file.text")); fileLocationRadio.addActionListener(new RadioButtonActionListener()); urlLocationRadio.setText(CheckStyleBundle.message("config.file.url.text")); urlLocationRadio.addActionListener(new RadioButtonActionListener()); classpathLocationRadio.setText(CheckStyleBundle.message("config.file.classpath.text")); classpathLocationRadio.addActionListener(new RadioButtonActionListener());
public JRadioButton getLiteralButton() { if (literalButton == null) { literalButton = new JRadioButton(); literalButton.setText("Literal"); literalButton.setMnemonic('L'); literalButton.setSelected(true); literalButton.addActionListener(this); } return literalButton; }
private void resetAllPreviews() { for (Map.Entry<Integer, JRadioButton> entry : templateButtonMapping.entrySet()) { entry.getValue().setText(getTemplatePreviewText(entry.getKey(), false)); } }
@Override public void actionPerformed(ActionEvent e) { if (e.getSource() instanceof JRadioButton) { JRadioButton rbutton = (JRadioButton) e.getSource(); int IdIndex = rbutton.getText().indexOf("template") + 8; //NOI18N int templateId = Integer.parseInt(rbutton.getText().substring(IdIndex, IdIndex + 1)); resetAllPreviews(); templateButtonMapping.get(templateId).setText(getTemplatePreviewText(templateId, true)); } } };
public JRadioButton getRegexButton() { if (regexButton == null) { regexButton = new JRadioButton(); regexButton.setText("Regular Expressions"); regexButton.setMnemonic('x'); regexButton.setDisplayedMnemonicIndex(9); regexButton.addActionListener(this); } return regexButton; }
public JRadioButton getWildCardsButton() { if (wildCardsButton == null) { wildCardsButton = new JRadioButton(); wildCardsButton.setText("Wild Cards"); wildCardsButton.setMnemonic('i'); wildCardsButton.setDisplayedMnemonicIndex(1); wildCardsButton.addActionListener(this); } return wildCardsButton; }
protected void createFieldSimulAdvParamsLibLoggerError() { $objectMap.put("fieldSimulAdvParamsLibLoggerError", fieldSimulAdvParamsLibLoggerError = new JRadioButton()); fieldSimulAdvParamsLibLoggerError.setName("fieldSimulAdvParamsLibLoggerError"); fieldSimulAdvParamsLibLoggerError.setText(t("isisfish.common.error")); fieldSimulAdvParamsLibLoggerError.addActionListener(JAXXUtil.getEventListener(ActionListener.class, "actionPerformed", this, "doActionPerformed__on__fieldSimulAdvParamsLibLoggerError")); }
protected void createFieldSimulAdvParamsLibLoggerWarn() { $objectMap.put("fieldSimulAdvParamsLibLoggerWarn", fieldSimulAdvParamsLibLoggerWarn = new JRadioButton()); fieldSimulAdvParamsLibLoggerWarn.setName("fieldSimulAdvParamsLibLoggerWarn"); fieldSimulAdvParamsLibLoggerWarn.setText(t("isisfish.common.warn")); fieldSimulAdvParamsLibLoggerWarn.addActionListener(JAXXUtil.getEventListener(ActionListener.class, "actionPerformed", this, "doActionPerformed__on__fieldSimulAdvParamsLibLoggerWarn")); }
protected void createBeginGroupLengthTypeGrowthCurve() { $objectMap.put("beginGroupLengthTypeGrowthCurve", beginGroupLengthTypeGrowthCurve = new JRadioButton()); beginGroupLengthTypeGrowthCurve.setName("beginGroupLengthTypeGrowthCurve"); beginGroupLengthTypeGrowthCurve.setText(t("isisfish.wizardGroupCreation.computedGrowthCurve")); beginGroupLengthTypeGrowthCurve.addActionListener(JAXXUtil.getEventListener(ActionListener.class, "actionPerformed", this, "doActionPerformed__on__beginGroupLengthTypeGrowthCurve")); }
protected void createBeginGroupLengthTypeInput() { $objectMap.put("beginGroupLengthTypeInput", beginGroupLengthTypeInput = new JRadioButton()); beginGroupLengthTypeInput.setName("beginGroupLengthTypeInput"); beginGroupLengthTypeInput.setText(t("isisfish.wizardGroupCreation.allValues")); beginGroupLengthTypeInput.addActionListener(JAXXUtil.getEventListener(ActionListener.class, "actionPerformed", this, "doActionPerformed__on__beginGroupLengthTypeInput")); }
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 createFieldSpeciesDynamicAge() { $objectMap.put("fieldSpeciesDynamicAge", fieldSpeciesDynamicAge = new JRadioButton()); fieldSpeciesDynamicAge.setName("fieldSpeciesDynamicAge"); fieldSpeciesDynamicAge.setText(t("isisfish.species.age")); fieldSpeciesDynamicAge.addItemListener(JAXXUtil.getEventListener(ItemListener.class, "itemStateChanged", this, "doItemStateChanged__on__fieldSpeciesDynamicAge")); }
protected void createServerAuthenticationMethodSsh() { $objectMap.put("serverAuthenticationMethodSsh", serverAuthenticationMethodSsh = new JRadioButton()); serverAuthenticationMethodSsh.setName("serverAuthenticationMethodSsh"); serverAuthenticationMethodSsh.setText(t("isisfish.launch.ssh")); { serverAuthenticationMethodSsh.putClientProperty("$value", "ssh"); Object $buttonGroup = serverAuthenticationMethodSsh.getClientProperty("$buttonGroup"); if ($buttonGroup instanceof JAXXButtonGroup) { ((JAXXButtonGroup) $buttonGroup).updateSelectedValue(); } } serverAuthenticationMethodSsh.addActionListener(JAXXUtil.getEventListener(ActionListener.class, "actionPerformed", this, "doActionPerformed__on__serverAuthenticationMethodSsh")); }