Examples of StringFormat


Examples of br.net.woodstock.rockframework.text.StringFormat

  private StringFormat  format;

  public TextConverter(final String pattern) {
    super();
    this.format = new StringFormat(pattern);
  }
View Full Code Here

Examples of br.net.woodstock.rockframework.text.StringFormat

    this.format = new StringFormat(pattern);
  }

  public TextConverter(final String pattern, final char character) {
    super();
    this.format = new StringFormat(pattern, character);
  }
View Full Code Here

Examples of br.net.woodstock.rockframework.text.StringFormat

  public void doTag() throws IOException {
    if (this.value == null) {
      return;
    }

    StringFormat format = null;

    if (ConditionUtils.isNotEmpty(this.template)) {
      format = StringFormatTemplate.getInstance().getFormat(this.template);
      if (format == null) {
        throw new IllegalStateException("Template not found");
      }
    } else if (ConditionUtils.isNotEmpty(this.format)) {
      format = new StringFormat(this.format, this.character);
    } else {
      throw new IllegalStateException("Pattern or template must be defined");
    }

    String value = this.value.toString();
    Writer writer = this.getJspContext().getOut();
    String formated = "";

    try {
      formated = format.format(value);
      formated = StringUtils.escapeHTML(formated);
    } catch (ArrayIndexOutOfBoundsException e) {
      WebLog.getInstance().getLog().warn("Error formating '" + value + "'  with mask '" + this.format + "'");
      formated = FormatTag.ERROR_VALUE;
    }
View Full Code Here

Examples of br.net.woodstock.rockframework.text.StringFormat

  public void doTag() throws IOException {
    if (this.value == null) {
      return;
    }

    StringFormat format = null;

    if (ConditionUtils.isNotEmpty(this.template)) {
      format = StringFormatTemplate.getInstance().getFormat(this.template);
      if (format == null) {
        throw new IllegalStateException("Template not found");
      }
    } else if (ConditionUtils.isNotEmpty(this.format)) {
      format = new StringFormat(this.format, this.character);
    } else {
      throw new IllegalStateException("Pattern or template must be defined");
    }

    String value = this.value.toString();
    Writer writer = this.getJspContext().getOut();
    String formated = "";

    try {
      formated = format.format(value);
      formated = StringUtils.escapeHTML(formated);
    } catch (ArrayIndexOutOfBoundsException e) {
      WebLog.getInstance().getLogger().warn("Error formating '" + value + "'  with mask '" + this.format + "'");
      formated = FormatTag.ERROR_VALUE;
    }
View Full Code Here

Examples of br.net.woodstock.rockframework.text.StringFormat

  public void doTag() throws IOException {
    if (this.value == null) {
      return;
    }

    StringFormat format = null;

    if (ConditionUtils.isNotEmpty(this.template)) {
      format = StringFormatTemplate.getInstance().getFormat(this.template);
      if (format == null) {
        throw new IllegalStateException("Template not found");
      }
    } else if (ConditionUtils.isNotEmpty(this.format)) {
      format = new StringFormat(this.format, this.character);
    } else {
      throw new IllegalStateException("Pattern or template must be defined");
    }

    String value = this.value.toString();
    Writer writer = this.getJspContext().getOut();
    String formated = "";

    try {
      formated = format.format(value);
      formated = StringUtils.escapeHTML(formated);
    } catch (ArrayIndexOutOfBoundsException e) {
      WebLog.getInstance().getLog().warning("Error formating '" + value + "'  with mask '" + this.format + "'");
      formated = FormatTag.ERROR_VALUE;
    }
View Full Code Here

Examples of cli.System.Drawing.StringFormat

    /**
     * {@inheritDoc}
     */
    @Override
    float getCodePointAdvance( int cp ) {
        StringFormat format = new StringFormat(StringFormat.get_GenericTypographic());

        format.set_FormatFlags( StringFormatFlags.wrap( StringFormatFlags.MeasureTrailingSpaces | StringFormatFlags.NoWrap |
                             StringFormatFlags.FitBlackBox ));
        format.set_Trimming( StringTrimming.wrap( StringTrimming.None ) );
        format.SetMeasurableCharacterRanges(new CharacterRange[] {new CharacterRange(0, 1)});
        Graphics g = createGraphics( frc );
        Region[] regions = g.MeasureCharacterRanges(String.valueOf((char)cp), font.getNetFont(),
                                                    new RectangleF(0, 0, Integer.MAX_VALUE, Integer.MAX_VALUE), format);
        SizeF size = regions[0].GetBounds(g).get_Size();
        regions[0].Dispose();
View Full Code Here

Examples of javango.util.StringFormat

    String display = params.get("display");   
    String results = params.get("results"); // URLDecoder.decode(params.get("results"), "UTF-16");
    String orderBy = params.get("order_by");
    String[] resultColumns = results.split(",");
   
    context.put("StringFormat", new StringFormat()); // needed in the template to format the display
    context.put("field_name", fieldName);
   
    context.put("field_list", resultColumns);
    context.put("display", display);
    context.put("prompt_data", URLEncoder.encode(encodedString, "UTF-8"));
View Full Code Here

Examples of org.apache.camel.dataformat.bindy.format.StringFormat

        } else if (clazz == BigDecimal.class) {
            return new BigDecimalFormat(impliedDecimalSeparator, precision, getLocale(locale));
        } else if (clazz == BigInteger.class) {
            return new BigIntegerFormat();
        } else if (clazz == String.class) {
            return new StringFormat();
        } else if (clazz == Date.class) {
            return new DatePatternFormat(pattern, timezone, getLocale(locale));
        } else if (clazz == char.class || clazz == Character.class) {
            return new CharacterFormat();
        } else if (clazz.isEnum()) {
View Full Code Here

Examples of org.apache.camel.dataformat.bindy.format.StringFormat

        } else if (clazz == BigInteger.class) {
            return new BigIntegerFormat();

        } else if (clazz == String.class) {
            return new StringFormat();

        } else if (clazz == Date.class) {
            return new DatePatternFormat(pattern, getLocale(locale));

        } else if (clazz == char.class || clazz == Character.class) {
View Full Code Here

Examples of org.apache.camel.dataformat.bindy.format.StringFormat

        } else if (clazz == BigInteger.class) {
            return new BigIntegerFormat();

        } else if (clazz == String.class) {
            return new StringFormat();

        } else if (clazz == Date.class) {
            return new DatePatternFormat(pattern, getLocale(locale));

        } else if (clazz == char.class || clazz == Character.class) {
View Full Code Here
TOP
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.