Search in sources :

Example 1 with Unit

use of net.sf.latexdraw.util.Unit in project latexdraw by arnobl.

the class PreferencesSetter method initialize.

@Override
public void initialize(final URL location, final ResourceBundle resources) {
    latexIncludes.setTooltip(new Tooltip(// $NON-NLS-1$
    "<html>" + // $NON-NLS-1$
    LangTool.INSTANCE.getBundle().getString("PreferencesSetter.1") + // $NON-NLS-1$
    "<br>\\usepackage[frenchb]{babel}<br>\\usepackage[utf8]{inputenc}</html>"));
    langList.setCellFactory(l -> new LocaleCell());
    langList.setButtonCell(new LocaleCell());
    langList.getItems().addAll(LangTool.INSTANCE.getSupportedLocales());
    unitChoice.getItems().addAll(Arrays.stream(Unit.values()).map(Unit::getLabel).collect(Collectors.toList()));
    styleList.getItems().addAll(GridStyle.values());
    buttonOpen.setOnAction(evt -> {
        final File file = getFileChooser().showDialog(null);
        if (file != null) {
            pathOpenField.setText(file.getPath());
        }
    });
    buttonExport.setOnAction(evt -> {
        final File file = getFileChooser().showDialog(null);
        if (file != null) {
            pathExportField.setText(file.getPath());
            exporter.setPathExport(file.getPath());
        }
    });
}
Also used : Tooltip(javafx.scene.control.Tooltip) SetUnit(net.sf.latexdraw.commands.SetUnit) Unit(net.sf.latexdraw.util.Unit) File(java.io.File)

Aggregations

File (java.io.File)1 Tooltip (javafx.scene.control.Tooltip)1 SetUnit (net.sf.latexdraw.commands.SetUnit)1 Unit (net.sf.latexdraw.util.Unit)1