Package org.foray.fotree.value

Examples of org.foray.fotree.value.DtTextDeco


        }

        /* Tokenize the value and loop through the tokens, adjusting the
         * TextDecoDT instance accordingly.
         */
        DtTextDeco textDeco = null;
        final StringTokenizer st = new StringTokenizer(value);
        if (st.countTokens() < 1) {
            throw this.unexpectedValue(value, fobj);
        }
        while (st.hasMoreTokens()) {
View Full Code Here


     */
    private static DtTextDeco getTextDecoDT(final DtTextDeco textDeco) {
        if (textDeco != null) {
            return textDeco;
        }
        return new DtTextDeco(false, false, false, false);
    }
View Full Code Here

     * @throws PropertyException For an invalid keyword.
     */
    private DtTextDeco checkOneKeyword(final DtTextDeco inputTextDeco,
            final String value, final FObj fobj)
            throws PropertyException {
        DtTextDeco textDeco = inputTextDeco;
        if (value.equals("underline")) {
            textDeco = getTextDecoDT(textDeco);
            textDeco.setUnderlined(true);
            return textDeco;
        }

        if (value.equals("overline")) {
            textDeco = getTextDecoDT(textDeco);
            textDeco.setOverlined(true);
            return textDeco;
        }

        if (value.equals("line-through")) {
            textDeco = getTextDecoDT(textDeco);
            textDeco.setLineThrough(true);
            return textDeco;
        }

        if (value.equals("blink")) {
            textDeco = getTextDecoDT(textDeco);
            textDeco.setBlink(true);
            return textDeco;
        }

        if (value.equals("no-underline")) {
            textDeco = getTextDecoDT(textDeco);
            textDeco.setUnderlined(false);
            return textDeco;
        }

        if (value.equals("no-overline")) {
            textDeco = getTextDecoDT(textDeco);
            textDeco.setOverlined(false);
            return textDeco;
        }

        if (value.equals("no-line-through")) {
            textDeco = getTextDecoDT(textDeco);
            textDeco.setLineThrough(false);
            return textDeco;
        }

        if (value.equals("no-blink")) {
            textDeco = getTextDecoDT(textDeco);
            textDeco.setBlink(false);
            return textDeco;
        }
        throw unexpectedValue(value, fobj);
    }
View Full Code Here

     * @param context An object that knows how to resolve FO Tree context
     * issues.
     * @return True iff this should be underlined.
     */
    public boolean getUnderlineScore(final FObj fobj, final FoContext context) {
        final DtTextDeco textDecoration = getTextDecoration(fobj, context);
        if (textDecoration == null) {
            return false;
        }
        return textDecoration.getIsUnderlined();
    }
View Full Code Here

     * @param context An object that knows how to resolve FO Tree context
     * issues.
     * @return True iff this should be overlined.
     */
    public boolean getOverlineScore(final FObj fobj, final FoContext context) {
        final DtTextDeco textDecoration = getTextDecoration(fobj, context);
        if (textDecoration == null) {
            return false;
        }
        return textDecoration.getIsOverlined();
    }
View Full Code Here

     * issues.
     * @return True iff this should be through-scored (i.e. a line drawn
     * through, as if it were crossed out).
     */
    public boolean getThroughScore(final FObj fobj, final FoContext context) {
        final DtTextDeco textDecoration = getTextDecoration(fobj, context);
        if (textDecoration == null) {
            return false;
        }
        return textDecoration.getIsLineThrough();
    }
View Full Code Here

     * issues.
     * @return True iff this should be through-scored (i.e. a line drawn
     * through, as if it were crossed out).
     */
    public boolean getBlink(final FObj fobj, final FoContext context) {
        final DtTextDeco textDecoration = getTextDecoration(fobj, context);
        if (textDecoration == null) {
            return false;
        }
        return textDecoration.getIsBlink();
    }
View Full Code Here

TOP

Related Classes of org.foray.fotree.value.DtTextDeco

Copyright © 2018 www.massapicom. 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.