use of java.util.prefs.Preferences in project jgnash by ccavanaugh.
the class AbstractCrosstabReport method refreshReport.
@Override
protected void refreshReport() {
final Preferences p = getPreferences();
p.putBoolean(HIDE_ZERO_BALANCE, hideZeroBalanceAccounts.isSelected());
p.putBoolean(USE_LONG_NAMES, showLongNamesCheckBox.isSelected());
p.putInt(MONTHS, DateUtils.getLastDayOfTheMonths(startDateField.getLocalDate(), endDateField.getLocalDate()).size());
super.refreshReport();
}
use of java.util.prefs.Preferences in project jgnash by ccavanaugh.
the class PortfolioReport method refreshReport.
@Override
protected void refreshReport() {
Preferences p = getPreferences();
p.putBoolean(RECURSIVE, subAccountCheckBox.isSelected());
p.putBoolean(USE_LONG_NAMES, verboseCheckBox.isSelected());
super.refreshReport();
}
use of java.util.prefs.Preferences in project ceylon-compiler by ceylon.
the class Launcher method main.
public static void main(String... args) {
JavaCompiler javac = ToolProvider.getSystemJavaCompiler();
JFileChooser fileChooser;
Preferences prefs = Preferences.userNodeForPackage(Launcher.class);
if (args.length > 0)
fileChooser = new JFileChooser(args[0]);
else {
String fileName = prefs.get("recent.file", null);
fileChooser = new JFileChooser();
if (fileName != null) {
fileChooser = new JFileChooser();
fileChooser.setSelectedFile(new File(fileName));
}
}
if (fileChooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {
String fileName = fileChooser.getSelectedFile().getPath();
prefs.put("recent.file", fileName);
javac.run(System.in, null, null, "-d", "/tmp", fileName);
}
}
use of java.util.prefs.Preferences in project jgnash by ccavanaugh.
the class DateUtils method setDateFormatPattern.
public static void setDateFormatPattern(@NotNull final String pattern) throws IllegalArgumentException {
Objects.requireNonNull(pattern);
final Preferences preferences = Preferences.userNodeForPackage(DateUtils.class);
preferences.put(DATE_FORMAT, pattern);
try {
shortDateFormatter = DateTimeFormatter.ofPattern(pattern).withResolverStyle(ResolverStyle.SMART);
shortDateManualEntryFormatter = DateTimeFormatter.ofPattern(getShortDateManualEntryPattern()).withResolverStyle(ResolverStyle.SMART);
} catch (IllegalArgumentException e) {
throw new IllegalArgumentException(e);
}
}
use of java.util.prefs.Preferences in project jgnash by ccavanaugh.
the class AbstractAuthenticator method setUseProxy.
public static void setUseProxy(boolean use) {
final Preferences pref = Preferences.userRoot().node(NODEHTTP);
pref.putBoolean(USEPROXY, use);
}
Aggregations