JXDatePicker.getLocale
Code IndexAdd Codota to your IDE (free)

Best code snippets using org.jdesktop.swingx.JXDatePicker.getLocale(Showing top 15 results out of 315)

  • Common ways to obtain JXDatePicker
private void myMethod () {
JXDatePicker j =
  • new JXDatePicker()
  • AI code suggestions by Codota
}
origin: org.swinglabs/swingx

/**
 * Called form property listener, updates all components locale, formats
 * etc.
 * 
 * @author PeS
 */
protected void updateLocale() {
  Locale locale = datePicker.getLocale();
  updateFormatLocale(locale);
  updateChildLocale(locale);
}
origin: org.swinglabs/swingx

/**
 * Update text on the link panel.
 * 
 */
private void updateLinkFormat() {
  // PENDING JW: move to ui
  String linkFormat = UIManagerExt.getString(
      "JXDatePicker.linkFormat", getLocale());
  
  if (linkFormat != null) {
    setLinkFormat(new MessageFormat(linkFormat));
  } else {
    setLinkFormat(new MessageFormat("{0,date, dd MMMM yyyy}"));
  }
}
origin: RaiMan/SikuliX-2014

/**
 * 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;
}
origin: RaiMan/SikuliX-2014

/**
 * Replaces the currently installed formatter and factory used by the
 * editor.<p>
 *
 * Note: The given formats are internally synched to the picker's current
 *    TimeZone.
 *
 * @param formats zero or more not null formats to use. Note that a
 *    null array is allowed and resets the formatter to use the
 *    localized default formats.
 * @throws NullPointerException any of its elements is null.
 */
public void setFormats(DateFormat... formats) {
  if (formats != null) {
    Contract.asNotNull(formats, "the array of formats " + "must not contain null elements");
  }
  DateFormat[] old = getFormats();
  _dateField.setFormatterFactory(new DefaultFormatterFactory(
      new DatePickerFormatter(formats, getLocale())));
  firePropertyChange("formats", old, getFormats());
}
origin: org.swinglabs.swingx/swingx-all

/**
 * Called form property listener, updates all components locale, formats
 * etc.
 * 
 * @author PeS
 */
protected void updateLocale() {
  Locale locale = datePicker.getLocale();
  updateFormatLocale(locale);
  updateChildLocale(locale);
}
origin: RaiMan/SikuliX-2014

/**
 * Called form property listener, updates all components locale, formats
 * etc.
 *
 * @author PeS
 */
protected void updateLocale() {
  Locale locale = datePicker.getLocale();
  updateFormatLocale(locale);
  updateChildLocale(locale);
}
origin: org.swinglabs/swingx-core

/**
 * Called form property listener, updates all components locale, formats
 * etc.
 * 
 * @author PeS
 */
protected void updateLocale() {
  Locale locale = datePicker.getLocale();
  updateFormatLocale(locale);
  updateChildLocale(locale);
}
origin: org.swinglabs.swingx/swingx-core

/**
 * Called form property listener, updates all components locale, formats
 * etc.
 * 
 * @author PeS
 */
protected void updateLocale() {
  Locale locale = datePicker.getLocale();
  updateFormatLocale(locale);
  updateChildLocale(locale);
}
origin: RaiMan/SikuliX-2014

/**
 * Update text on the link panel.
 *
 */
private void updateLinkFormat() {
  // PENDING JW: move to ui
  String linkFormat = UIManagerExt.getString(
      "JXDatePicker.linkFormat", getLocale());
  if (linkFormat != null) {
    setLinkFormat(new MessageFormat(linkFormat));
  } else {
    setLinkFormat(new MessageFormat("{0,date, dd MMMM yyyy}"));
  }
}
origin: org.swinglabs.swingx/swingx-core

/**
 * Update text on the link panel.
 * 
 */
private void updateLinkFormat() {
  // PENDING JW: move to ui
  String linkFormat = UIManagerExt.getString(
      "JXDatePicker.linkFormat", getLocale());
  
  if (linkFormat != null) {
    setLinkFormat(new MessageFormat(linkFormat));
  } else {
    setLinkFormat(new MessageFormat("{0,date, dd MMMM yyyy}"));
  }
}
origin: org.swinglabs/swingx-core

/**
 * Update text on the link panel.
 * 
 */
private void updateLinkFormat() {
  // PENDING JW: move to ui
  String linkFormat = UIManagerExt.getString(
      "JXDatePicker.linkFormat", getLocale());
  
  if (linkFormat != null) {
    setLinkFormat(new MessageFormat(linkFormat));
  } else {
    setLinkFormat(new MessageFormat("{0,date, dd MMMM yyyy}"));
  }
}
origin: org.swinglabs.swingx/swingx-all

/**
 * Update text on the link panel.
 * 
 */
private void updateLinkFormat() {
  // PENDING JW: move to ui
  String linkFormat = UIManagerExt.getString(
      "JXDatePicker.linkFormat", getLocale());
  
  if (linkFormat != null) {
    setLinkFormat(new MessageFormat(linkFormat));
  } else {
    setLinkFormat(new MessageFormat("{0,date, dd MMMM yyyy}"));
  }
}
origin: org.swinglabs/swingx

/**
 * Replaces the currently installed formatter and factory used by the
 * editor.<p>
 *
 * Note: The given formats are internally synched to the picker's current
 *    TimeZone. 
 * 
 * @param formats zero or more not null formats to use. Note that a 
 *    null array is allowed and resets the formatter to use the 
 *    localized default formats.
 * @throws NullPointerException any of its elements is null.
 */
public void setFormats(DateFormat... formats) {
  if (formats != null) {
    Contract.asNotNull(formats, "the array of formats " + "must not contain null elements");
  }
  
  DateFormat[] old = getFormats();
  _dateField.setFormatterFactory(new DefaultFormatterFactory(
      new DatePickerFormatter(formats, getLocale())));
  firePropertyChange("formats", old, getFormats());
}
origin: org.swinglabs.swingx/swingx-core

/**
 * Replaces the currently installed formatter and factory used by the
 * editor.<p>
 *
 * Note: The given formats are internally synched to the picker's current
 *    TimeZone. 
 * 
 * @param formats zero or more not null formats to use. Note that a 
 *    null array is allowed and resets the formatter to use the 
 *    localized default formats.
 * @throws NullPointerException any of its elements is null.
 */
public void setFormats(DateFormat... formats) {
  if (formats != null) {
    Contract.asNotNull(formats, "the array of formats " + "must not contain null elements");
  }
  
  DateFormat[] old = getFormats();
  _dateField.setFormatterFactory(new DefaultFormatterFactory(
      new DatePickerFormatter(formats, getLocale())));
  firePropertyChange("formats", old, getFormats());
}
origin: org.swinglabs.swingx/swingx-all

/**
 * Replaces the currently installed formatter and factory used by the
 * editor.<p>
 *
 * Note: The given formats are internally synched to the picker's current
 *    TimeZone. 
 * 
 * @param formats zero or more not null formats to use. Note that a 
 *    null array is allowed and resets the formatter to use the 
 *    localized default formats.
 * @throws NullPointerException any of its elements is null.
 */
public void setFormats(DateFormat... formats) {
  if (formats != null) {
    Contract.asNotNull(formats, "the array of formats " + "must not contain null elements");
  }
  
  DateFormat[] old = getFormats();
  _dateField.setFormatterFactory(new DefaultFormatterFactory(
      new DatePickerFormatter(formats, getLocale())));
  firePropertyChange("formats", old, getFormats());
}
org.jdesktop.swingxJXDatePickergetLocale

Popular methods of JXDatePicker

  • <init>
    Intantiates a date picker with no selection and the defaultDatePickerFormatter. The date picker is
  • addActionListener
    Adds an ActionListener. The ActionListener will receive an ActionEvent when a selection has been mad
  • getDate
    Returns the currently selected date.
  • getEditor
    Returns the formatted text field used to edit the date selection. Clients should NOT use this method
  • setDate
    Sets the date property. Does nothing if the ui vetos the new date - as might happen if the code tri
  • setFormats
    Replaces the currently installed formatter and factory used by the editor. Note: The given formats a
  • addPropertyChangeListener
  • getMonthView
    Return the JXMonthView used in the popup to select dates from.
  • getUI
    Returns the look and feel (L&F) object that renders this component.
  • add
  • addFocusListener
  • cancelEdit
    Cancels the editor's changes and notifies ActionListeners.
  • addFocusListener,
  • cancelEdit,
  • commitEdit,
  • fireActionPerformed,
  • firePropertyChange,
  • getActionMap,
  • getComponentOrientation,
  • getFormats,
  • getHeight,
  • getInputMap

Popular classes and methods

  • notifyDataSetChanged (ArrayAdapter)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • setScale (BigDecimal)
    Returns a new BigDecimal instance with the specified scale. If the new scale is greater than the old
  • String (java.lang)
    An immutable sequence of characters/code units ( chars). A String is represented by array of UTF-16
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • TreeMap (java.util)
    A map whose entries are sorted by their keys. All optional operations such as #put and #remove are s
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • ImageIO (javax.imageio)
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Runner (org.openjdk.jmh.runner)
    Runner executes JMH benchmarks.This is the entry point for JMH Java API. Runner is not usually reu

For IntelliJ IDEA and
Android Studio

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)