Examples of TextFormat


Examples of Framework.TextFormat

     * <p>
     * @param source Type: TextData
     * @param format Type: DataFormat
     */
    public void decodeValue(TextData source, DataFormat format) {
        TextFormat tf = new TextFormat();
        tf.setTemplate(new TextData("###-####-###"));
        this.setValue( (String)tf.decodeText(source).getValue());
    }
View Full Code Here

Examples of Framework.TextFormat

     * fillString<p>
     * <p>
     * @param target Type: TextData
     */
    public void fillString(TextData target) {
        TextFormat tf = new TextFormat();
        tf.setTemplate(new TextData("###-####-###"));
        target.setValue(tf.formatText(new TextData(this.getValue())).getValue());
    }
View Full Code Here

Examples of Framework.TextFormat

            }
            else if (type instanceof NumericData) {
                type.decodeValue(value.getTextValue(), new NumericFormat(templateText));
            }
            else if (type instanceof TextData) {
                type.decodeValue(value.getTextValue(), new TextFormat(templateText, qq_Resolver.cTEMPLATE));
            }
            else {
                type.setValue(value);
            }
        }
View Full Code Here

Examples of Framework.TextFormat

            }
            else if (type instanceof NumericData) {
                type.decodeValue(value.getTextValue(), new NumericFormat(templateText));
            }
            else if (type instanceof TextData) {
                type.decodeValue(value.getTextValue(), new TextFormat(templateText, qq_Resolver.cTEMPLATE));
            }
            else {
                type.setValue(value);
            }
        }
View Full Code Here

Examples of com.google.visualization.datasource.base.TextFormat

                    uFormat = new BooleanFormat(pattern);
                    uFormat.format(BooleanValue.TRUE.getObjectToFormat());
                    break;
                case TEXT:
                    // Dummy format so no need to check it for problems.
                    uFormat = new TextFormat();
                    break;
                case DATE:
                    uFormat = new SimpleDateFormat(pattern, locale);
                    ((SimpleDateFormat) uFormat).setTimeZone(TimeZone.getTimeZone("GMT"));
                    uFormat.format(new DateValue(1995, 7, 3).getObjectToFormat());
View Full Code Here

Examples of com.google.visualization.datasource.base.TextFormat

          uFormat = new BooleanFormat(pattern);
          uFormat.format(BooleanValue.TRUE.getObjectToFormat());
          break;
        case TEXT:
          // Dummy format so no need to check it for problems.
          uFormat = new TextFormat();
          break;
        case DATE:
          uFormat = new SimpleDateFormat(pattern, locale);
          ((SimpleDateFormat) uFormat).setTimeZone(TimeZone.getTimeZone("GMT"));
          uFormat.format(new DateValue(1995, 7, 3).getObjectToFormat());
View Full Code Here

Examples of javolution.text.TextFormat

            if (cfg == null)
                continue;
            // Use the default value to retrieve the configurable type
            // and the associated textual format.
            Class type = cfg.getDefault().getClass();
            TextFormat format = TextFormat.getInstance(type);
            if (!format.isParsingSupported()) {
                LogContext.error("Cannot find suitable TextFormat to parse instances of " + type);
                continue;
            }
            Object newValue = format.parse(Configurable.toCsq(textValue));
            Configurable.configure(cfg, newValue);
        }
    }
View Full Code Here

Examples of javolution.text.TextFormat

            CharArray value = getAttribute(name);
            if (value == null)
                return defaultValue;
            // Parses attribute value.
            Class type = defaultValue.getClass();
            TextFormat format = TextFormat.getInstance(type);
            if (!format.isParsingSupported())
                throw new XMLStreamException("No TextFormat instance for " + type);
            return ( T ) format.parse(value);
        }
View Full Code Here

Examples of javolution.text.TextFormat

        public void setAttribute(String name, Object value)
                throws XMLStreamException {
            if (value == null)
                return;
            Class type = value.getClass();
            TextFormat format = TextFormat.getInstance(type);
            setAttribute(name, (TextBuilder) format.format(value,
                    _tmpTextBuilder.clear()));
        }
View Full Code Here

Examples of playn.core.TextFormat

    public final int textColor;
    public final EffectRenderer effect;
    public final boolean underlined;

    public TextConfig (int textColor) {
        this(new TextFormat(), textColor, EffectRenderer.NONE);
    }
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.