protected void createEditor() { $objectMap.put("editor", editor = new JFormattedTextField()); editor.setName("editor"); editor.setColumns(15); }
protected void createEditor() { $objectMap.put("editor", editor = new JFormattedTextField()); editor.setName("editor"); editor.setColumns(15); }
protected void createEditor() { $objectMap.put("editor", editor = new JFormattedTextField()); editor.setName("editor"); editor.setColumns(15); }
protected void createEditor() { $objectMap.put("editor", editor = new JFormattedTextField()); editor.setName("editor"); editor.setColumns(15); editor.addKeyListener(JAXXUtil.getEventListener(KeyListener.class, "keyReleased", this, "doKeyReleased__on__editor")); }
protected void createEditor() { $objectMap.put("editor", editor = new JFormattedTextField()); editor.setName("editor"); editor.setColumns(15); editor.addKeyListener(JAXXUtil.getEventListener(KeyListener.class, "keyReleased", this, "doKeyReleased__on__editor")); }
protected void createEditor() { $objectMap.put("editor", editor = new JFormattedTextField()); editor.setName("editor"); editor.setColumns(15); editor.addKeyListener(JAXXUtil.getEventListener(KeyListener.class, "keyReleased", this, "doKeyReleased__on__editor")); }
protected void createEditor() { $objectMap.put("editor", editor = new JFormattedTextField()); editor.setName("editor"); editor.setColumns(15); editor.addKeyListener(JAXXUtil.getEventListener(KeyListener.class, "keyReleased", this, "doKeyReleased__on__editor")); }
protected void createEditor() { $objectMap.put("editor", editor = new JFormattedTextField()); editor.setName("editor"); editor.setColumns(15); editor.addKeyListener(JAXXUtil.getEventListener(KeyListener.class, "keyReleased", this, "doKeyReleased__on__editor")); }
protected void createFieldEffortDescriptionFishingOperation() { $objectMap.put("fieldEffortDescriptionFishingOperation", fieldEffortDescriptionFishingOperation = new JFormattedTextField()); fieldEffortDescriptionFishingOperation.setName("fieldEffortDescriptionFishingOperation"); fieldEffortDescriptionFishingOperation.setColumns(15); fieldEffortDescriptionFishingOperation.addKeyListener(JAXXUtil.getEventListener(KeyListener.class, "keyReleased", this, "doKeyReleased__on__fieldEffortDescriptionFishingOperation")); fieldEffortDescriptionFishingOperation.putClientProperty("sensitivityBean", EffortDescription.class); fieldEffortDescriptionFishingOperation.putClientProperty("sensitivityMethod", "FishingOperation"); }
private JPanel buildFieldsPanel() { JPanel panel = new JPanel(new FlowLayout(FlowLayout.LEFT, 2, 2)); jFormattedTextFieldFundsQuantity = new JFormattedTextField(); jFormattedTextFieldFundsQuantity.addFocusListener(this); jFormattedTextFieldFundsQuantity.setFormatterFactory(new DefaultFormatterFactory(new NumberFormatter(NumberFormat.getIntegerInstance()))); jFormattedTextFieldFundsQuantity.setText(resourceMap.getString("jFormattedTextFieldFundsQuantity.text")); // NOI18N jFormattedTextFieldFundsQuantity.setToolTipText(resourceMap.getString("jFormattedTextFieldFundsQuantity.toolTipText")); // NOI18N jFormattedTextFieldFundsQuantity.setName("jFormattedTextFieldFundsQuantity"); // NOI18N jFormattedTextFieldFundsQuantity.setColumns(10); panel.add(jFormattedTextFieldFundsQuantity); categoryCombo = new JComboBox<String>(Transaction.getCategoryList()); categoryCombo.setSelectedItem(Transaction.getCategoryName(Transaction.C_MISC)); categoryCombo.setToolTipText("The category the transaction falls into."); categoryCombo.setName("categoryCombo"); panel.add(categoryCombo); descriptionField = new JFormattedTextField("Rich Uncle"); descriptionField.addFocusListener(this); descriptionField.setToolTipText("Description of the transaction."); descriptionField.setName("descriptionField"); descriptionField.setColumns(20); panel.add(descriptionField); return panel; }
/** * Creates the editor used to edit the date selection. The editor is * configured with the default DatePickerFormatter marked as UIResource. * * @return an instance of a JFormattedTextField */ protected JFormattedTextField createEditor() { JFormattedTextField f = new DefaultEditor( new DatePickerFormatterUIResource(datePicker.getLocale())); f.setName("dateField"); // this produces a fixed pref widths, looking a bit funny // int columns = UIManagerExt.getInt("JXDatePicker.numColumns", null); // if (columns > 0) { // f.setColumns(columns); // } // that's always 0 as it comes from the resourcebundle // f.setColumns(UIManager.getInt("JXDatePicker.numColumns")); Border border = UIManager.getBorder("JXDatePicker.border"); if (border != null) { f.setBorder(border); } return f; }
/** * Creates the editor used to edit the date selection. The editor is * configured with the default DatePickerFormatter marked as UIResource. * * @return an instance of a JFormattedTextField */ protected JFormattedTextField createEditor() { JFormattedTextField f = new DefaultEditor( new DatePickerFormatterUIResource(datePicker.getLocale())); f.setName("dateField"); // this produces a fixed pref widths, looking a bit funny // int columns = UIManagerExt.getInt("JXDatePicker.numColumns", null); // if (columns > 0) { // f.setColumns(columns); // } // that's always 0 as it comes from the resourcebundle // f.setColumns(UIManager.getInt("JXDatePicker.numColumns")); Border border = UIManager.getBorder("JXDatePicker.border"); if (border != null) { f.setBorder(border); } return f; }
/** * Creates the editor used to edit the date selection. The editor is * configured with the default DatePickerFormatter marked as UIResource. * * @return an instance of a JFormattedTextField */ protected JFormattedTextField createEditor() { JFormattedTextField f = new DefaultEditor( new DatePickerFormatterUIResource(datePicker.getLocale())); f.setName("dateField"); // this produces a fixed pref widths, looking a bit funny // int columns = UIManagerExt.getInt("JXDatePicker.numColumns", null); // if (columns > 0) { // f.setColumns(columns); // } // that's always 0 as it comes from the resourcebundle // f.setColumns(UIManager.getInt("JXDatePicker.numColumns")); Border border = UIManager.getBorder("JXDatePicker.border"); if (border != null) { f.setBorder(border); } return f; }
/** * Creates the editor used to edit the date selection. The editor is * configured with the default DatePickerFormatter marked as UIResource. * * @return an instance of a JFormattedTextField */ protected JFormattedTextField createEditor() { JFormattedTextField f = new DefaultEditor( new DatePickerFormatterUIResource(datePicker.getLocale())); f.setName("dateField"); // this produces a fixed pref widths, looking a bit funny // int columns = UIManagerExt.getInt("JXDatePicker.numColumns", null); // if (columns > 0) { // f.setColumns(columns); // } // that's always 0 as it comes from the resourcebundle // f.setColumns(UIManager.getInt("JXDatePicker.numColumns")); Border border = UIManager.getBorder("JXDatePicker.border"); if (border != null) { f.setBorder(border); } return f; }
/** * Creates the editor used to edit the date selection. The editor is * configured with the default DatePickerFormatter marked as UIResource. * * @return an instance of a JFormattedTextField */ protected JFormattedTextField createEditor() { JFormattedTextField f = new DefaultEditor( new DatePickerFormatterUIResource(datePicker.getLocale())); f.setName("dateField"); // this produces a fixed pref widths, looking a bit funny // int columns = UIManagerExt.getInt("JXDatePicker.numColumns", null); // if (columns > 0) { // f.setColumns(columns); // } // that's always 0 as it comes from the resourcebundle // f.setColumns(UIManager.getInt("JXDatePicker.numColumns")); Border border = UIManager.getBorder("JXDatePicker.border"); if (border != null) { f.setBorder(border); } return f; }
textField.setName(getName()+"/text");
public NumberEditorExt(NumberFormat formatter) { super(createFormattedTextField(formatter)); final JFormattedTextField textField = ((JFormattedTextField)getComponent()); textField.setName("Table.editor"); textField.setHorizontalAlignment(JTextField.RIGHT); // remove action listener added in DefaultCellEditor textField.removeActionListener(delegate); // replace the delegate created in DefaultCellEditor delegate = new EditorDelegate() { @Override public void setValue(Object value) { ((JFormattedTextField)getComponent()).setValue(value); } @Override public Object getCellEditorValue() { JFormattedTextField textField = ((JFormattedTextField)getComponent()); try { textField.commitEdit(); return textField.getValue(); } catch (ParseException ex) { return null; } } }; textField.addActionListener(delegate); }
public StealthNumberEditor(JSpinner spinner) { super(spinner); setBorder(BorderFactory.createEmptyBorder()); setOpaque(false); remove(getTextField()); JFormattedTextField ftf = new StealthFormattedTextField(); ftf.setName("Spinner.formattedTextField"); ftf.setValue(spinner.getValue()); ftf.addPropertyChangeListener(this); ftf.setEditable(false); ftf.setInheritsPopupMenu(true); String toolTipText = spinner.getToolTipText(); if (toolTipText != null) { ftf.setToolTipText(toolTipText); } add(ftf); } }
final JFormattedTextField textField = getComponent(); textField.setName("Table.editor"); textField.setHorizontalAlignment(JTextField.RIGHT);
final JFormattedTextField textField = getComponent(); textField.setName("Table.editor"); textField.setHorizontalAlignment(JTextField.RIGHT);