Examples of format()

Examples of org.apache.sis.measure.RangeFormat.format()

    public String toString(final Locale locale) {
        if (locale == null || locale == Locale.ROOT) {
            return toString();
        final RangeFormat format = new RangeFormat(locale, getElementType());
        return format.format(this);

     * Builds, caches and returns the unlocalized string representation of this range.
View Full Code Here

Examples of org.apache.sis.util.collection.TreeTableFormat.format()

    static String format(final TreeTable table) {
        final TreeTableFormat format = new TreeTableFormat(null, null);
        format.setColumnSeparatorPattern("?[ ] ← ");
        return format.format(table);
View Full Code Here

Examples of org.apache.struts2.json.annotations.JSON.format()

        } else if (clazz.equals(Date.class)) {
            try {
                JSON json = method.getAnnotation(JSON.class);

                DateFormat formatter = new SimpleDateFormat(
                        (json != null) && (json.format().length() > 0) ? json.format() : this.dateFormat);
                return formatter.parse((String) value);
            } catch (ParseException e) {
                LOG.error(e.getMessage(), e);
                throw new JSONException("Unable to parse date from: " + value);
View Full Code Here

Examples of org.apache.tapestry.form.TranslatedFieldSupport.format()


        expect(translator.format(comp, null)).andReturn("r2d2");
        translator.renderContributions(comp, writer, cycle);
        validator.renderContributions(comp, writer, cycle);

View Full Code Here

Examples of org.apache.tapestry.form.translator.DateTranslator.format()

        JSONObject cons = profile.getJSONObject(ValidationConstants.CONSTRAINTS);
        accumulateProperty(cons, field.getClientId(),
                new JSONLiteral("[tapestry.form.datetime.isValidDate,{"
                        + "min:"
                        + JSONObject.quote(translator.format(field, context.getLocale(), _minDate))
                        + ","
                        + "format:"
                        + JSONObject.quote(Strftime.convertToPosixFormat(translator.getPattern()))
                        + "}]"));
View Full Code Here

Examples of org.apache.tapestry.form.translator.NumberTranslator.format()

        String ret = null;
        NumberTranslator translator = (NumberTranslator)super.getFieldTranslator(field, NumberTranslator.class);

        if (translator != null)
            ret = translator.format(field, locale, new Double(_max));
            ret = String.valueOf(_max);

        return ret;
View Full Code Here

Examples of org.apache.tapestry.form.translator.Translator.format()

        translator.format(field, object);
        String result = support.format(field, object);
View Full Code Here

Examples of org.apache.tapestry.ioc.MessageFormatter.format()

        Messages messages = _source.getValidationMessages(Locale.ENGLISH);

        MessageFormatter formatter = messages.getFormatter("required");

        assertEquals(formatter.format("My Field"), "You must provide a value for My Field.");

    public void messages_instances_are_cached()
View Full Code Here

Examples of org.apache.tapestry.ioc.Messages.format()

    public void builtin_message()
        Messages messages = _source.getValidationMessages(Locale.ENGLISH);

                messages.format("required", "My Field"),
                "You must provide a value for My Field.");

    public void contributed_message()
View Full Code Here

Examples of org.apache.tapestry5.ioc.MessageFormatter.format()

    public void get_formatter()
        MessageFormatter mf = messages.getFormatter("result");

        assertEquals(mf.format("great"), "The result is 'great'.");

    public void formatters_are_cached()
View Full Code Here
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.