All Downloads are FREE. Search and download functionalities are using the official Maven repository.

application.common.LocaleEntry Maven / Gradle / Ivy

There is a newer version: 1.0.1
Show newest version
package application.common;

import java.util.Locale;

import javafx.scene.control.ComboBox;

/**
 * Provides a locale entry to be used in a {@link ComboBox}.
 * @author Joel Håkansson
 *
 */
public class LocaleEntry extends NiceName implements Comparable {
	
	/**
	 * Creates an new instance with the specified locale.
	 * @param locale the locale
	 */
	public LocaleEntry(Locale locale) {
		super(locale.toLanguageTag(), locale.getDisplayName());
	}
	
	@Override
	public int compareTo(LocaleEntry o) {
		return getDisplayName().compareTo(o.getDisplayName());
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy