/** * Sets the locale of this component. * Calls the reinit method. * @param locale the locale */ @Override public void setLocale(Locale locale) { super.setLocale(locale); reinit(); }
/** * Sets the locale of this component. * Calls the reinit method. * @param locale the locale */ @Override public void setLocale(Locale locale) { super.setLocale(locale); reinit(); }
@Override public void setLocale(Locale locale) { if (locale == getLocale()) { return; } super.setLocale(locale); dateFormatter = (SimpleDateFormat) DateFormat.getDateInstance(DateFormat.MEDIUM, locale); setToolTipText(dateFormatter.toPattern()); setDate(date, false); doLayout(); }
void jbInit() { gridBagLayout2.rowWeights = new double[] { 1.0, 0.0 }; gridBagLayout2.columnWeights = new double[] { 0.0, 1.0, 0.0, 0.0 }; jPanelMode.setLayout(gridBagLayout2); JMVUtils.setPreferredWidth(jTextFieldLineWidth, 170); jTextFieldLineWidth.setLocale(LocalUtil.getLocaleFormat()); jTextFieldLineWidth.setFormatterFactory(DecFormater.setPreciseDoubleFormat(0.000005d, Double.MAX_VALUE)); jTextFieldLineWidth.setValue(1.0); JMVUtils.addCheckAction(jTextFieldLineWidth); jLabelKnownDist.setText(Messages.getString("CalibrationView.known") + StringUtil.COLON); //$NON-NLS-1$ this.setLayout(borderLayout1); this.add(jPanelMode, BorderLayout.CENTER); jPanelMode.add(jComboBoxUnit, new GridBagConstraints(3, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 3, 0, 0), 0, 0)); jPanelMode.add(jLabelKnownDist, new GridBagConstraints(0, 1, 2, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 10, 0, 5), 0, 0)); jPanelMode.add(jTextFieldLineWidth, new GridBagConstraints(2, 1, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 2, 0, 5), 0, 0)); FlowLayout flowLayout = (FlowLayout) panel.getLayout(); flowLayout.setHgap(10); flowLayout.setAlignment(FlowLayout.LEFT); add(panel, BorderLayout.SOUTH); panel.add(lblApplyTo); ratioGroup.add(radioButtonSeries); ratioGroup.add(radioButtonImage); panel.add(radioButtonSeries); panel.add(radioButtonImage); }
private void updateChildLocale(Locale locale) { if (locale != null) { datePicker.getEditor().setLocale(locale); datePicker.getLinkPanel().setLocale(locale); datePicker.getMonthView().setLocale(locale); } }
private void updateChildLocale(Locale locale) { if (locale != null) { datePicker.getEditor().setLocale(locale); datePicker.getLinkPanel().setLocale(locale); datePicker.getMonthView().setLocale(locale); } }
private void updateChildLocale(Locale locale) { if (locale != null) { datePicker.getEditor().setLocale(locale); datePicker.getLinkPanel().setLocale(locale); datePicker.getMonthView().setLocale(locale); } }
private void updateChildLocale(Locale locale) { if (locale != null) { datePicker.getEditor().setLocale(locale); datePicker.getLinkPanel().setLocale(locale); datePicker.getMonthView().setLocale(locale); } }
private void updateChildLocale(Locale locale) { if (locale != null) { datePicker.getEditor().setLocale(locale); datePicker.getLinkPanel().setLocale(locale); datePicker.getMonthView().setLocale(locale); } }
/** * This method initializes this * * @return void */ private void initialize() { // setFocusable(true); // getEditor().setFocusable(true); getEditor().setLocale(SwingUtility.getDefaultLocale()); add(this.calendarButton, BorderLayout.LINE_END); setOpaque(true); setBorder(BorderFactory.createEmptyBorder()); setLocale(SwingUtility.getDefaultLocale()); setDateFormatString(JKFormatUtil.DEFAULT_DATE_PATTERN); addKeyListener(new TransferFocusOnEnterKeyListener(this)); }
dateFormat = (SimpleDateFormat)DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM, locale); dateFormat.applyPattern(dateFormatString); editor.setLocale(locale); installFormatterFactoryOnEditor();