/** * Gets the bundle. * * @return the resource bundle */ public static ResourceBundle getBundle() { return BundleFactory.getBundle(ValidationBundle.class.getName(), LocaleProvider.getInstance().getLocale()); }
/** * Gets the bundle. * * @return the resource bundle */ public static ResourceBundle getBundle() { return BundleFactory.getBundle(AppCoreBundle.class.getName(), LocaleProvider.getInstance().getLocale()); }
/** * Gets the bundle. * * @return the resource bundle */ public static ResourceBundle getBundle() { return BundleFactory.getBundle(CommonCommonBundle.class.getName(), LocaleProvider.getInstance().getLocale()); }
/** * Gets the bundle. * * @return the resource bundle */ public static ResourceBundle getBundle() { return BundleFactory.getBundle(FxFxBundle.class.getName(), LocaleProvider.getInstance().getLocale()); }
/** * Gets the bundle. * * @return the resource bundle */ public static ResourceBundle getBundle() { return BundleFactory.getBundle(SwingSwingBundle.class.getName(), LocaleProvider.getInstance().getLocale()); }
/** * Creates a zero BMoney with a scale according to * the currency of the current locale. */ public BMoney () { this(Currency.getInstance(LocaleProvider.getInstance().getCurrentLocale()).getDefaultFractionDigits()); }
/** * Applies a set of patterns to the current locale. * * @param patterns the patterns */ public static void applyPatterns(Patterns patterns) { Locale locale = LocaleProvider.getInstance().getLocale(); applyPatterns(locale, patterns); }
/** * Gets the bundle. * * @return the resource bundle */ public static ResourceBundle getBundle() { return getBundle(LocaleProvider.getInstance().getLocale()); }
/** * Gets the formatting for the current locale. * * @return the formatting */ private static Formatting getFormatting() { Locale locale = LocaleProvider.getInstance().getLocale(); return FORMATTING_MAP.computeIfAbsent(locale, l -> new Formatting(l, new Patterns(locale))); }
/** * Creates an empty BMoneyFormField.<br> * Notice: setting doc != null requires a doc derived from FormFieldDocument. * * @param doc the document model, null = default * @param columns the number of columns, 0 = minimum width * @param parseDMoney true if getFormValue() returns DMoney, false if BMoney */ public BMoneyFormField (Document doc, int columns, boolean parseDMoney) { super (doc, columns); this.parseDMoney = parseDMoney; autoComma = defaultAutoComma; decimalFormat.applyPattern(FormatHelper.getMoneyPattern()); // generate default decimalFormat // set the commaChar and the scale from the current locale commaChar = decimalFormat.getDecimalFormatSymbols().getDecimalSeparator(); setScale(Currency.getInstance(LocaleProvider.getInstance().getLocale()).getDefaultFractionDigits()); }
/** * Restores the thread-locals, session's ownerthread and MDC. */ public void restore() { Session.setCurrentSession(currentSession); Db db = delegate.getSession(); if (db != null) { db.setOwnerThread(ownerThread); } LocaleProvider.getInstance().setCurrentLocale(currentLocale); }
LocaleProvider.getInstance().getLocale(), ex);
/** * Creates and retrieves the current settings. * * @param delegate the remote delegate */ public InvocationLocals(RemoteDelegateImpl<?> delegate) { this.delegate = delegate; ownerThread = delegate.getSession().getOwnerThread(); currentSession = Session.getCurrentSession(); currentLocale = LocaleProvider.getInstance().getCurrentLocale(); }
/** * Creates a money print label. * * @param columns the width in columns, 0 = minimum width */ public BMoneyPrintLabel (int columns) { super (columns); // generate default format format.setGroupingUsed(true); format.setGroupingSize(3); format.applyPattern(FormatHelper.getMoneyPattern()); setScale(Currency.getInstance(LocaleProvider.getInstance().getLocale()).getDefaultFractionDigits()); setPrintValue(new BMoney()); }
/** * Updates the thread local memory. */ protected void updateThreadLocal() { delegate.getSession().makeCurrent(); LocaleProvider.getInstance().setCurrentLocale(delegate.getSession().getSessionInfo().getLocale()); }
prefName.append('_').append(LocaleProvider.getInstance().getEffectiveLocale());
resources = BundleFactory.getBundle(resourcesStr, LocaleProvider.getInstance().getLocale());
prefName.append('_').append(LocaleProvider.getInstance().getEffectiveLocale());
delegate.getSession().setOwnerThread(null); Session.setCurrentSession(null); LocaleProvider.getInstance().setCurrentLocale(null); clearMDC(); throw t;