Search in sources :

Example 1 with I18nString

use of org.vesalainen.nmea.viewer.I18n.I18nString in project NMEAParser by tvesalainen.

the class GaugePane method onMousePressed.

private void onMousePressed(MouseEvent e) {
    List<I18nString> list = new ArrayList<>();
    for (String p : propertyStore.getDisplayProperties()) {
        list.add(I18n.getI18nString(p));
    }
    list.sort(null);
    ChoiceDialog<I18nString> dia = new ChoiceDialog<>(list.get(0), list);
    ResourceBundle rb = I18n.get();
    dia.setTitle(rb.getString("addPropertyTitle"));
    dia.setContentText(rb.getString("addPropertyContent"));
    dia.setHeaderText(rb.getString("addPropertyHeader"));
    dia.showAndWait().ifPresent(response -> bind2(response.getKey()));
}
Also used : ChoiceDialog(javafx.scene.control.ChoiceDialog) ArrayList(java.util.ArrayList) ResourceBundle(java.util.ResourceBundle) I18nString(org.vesalainen.nmea.viewer.I18n.I18nString) I18nString(org.vesalainen.nmea.viewer.I18n.I18nString)

Aggregations

ArrayList (java.util.ArrayList)1 ResourceBundle (java.util.ResourceBundle)1 ChoiceDialog (javafx.scene.control.ChoiceDialog)1 I18nString (org.vesalainen.nmea.viewer.I18n.I18nString)1