Java HTML Create italics(String inner)

Here you can find the source of italics(String inner)

Description

_more_

License

Open Source License

Parameter

Parameter Description
inner _more_

Return

_more_

Declaration

public static String italics(String inner) 

Method Source Code

//package com.java2s;
/*//from w w  w.  j a  v  a2s  .c  o m
 * Copyright 1997-2016 Unidata Program Center/University Corporation for Atmospheric Research
 * Copyright 2010-2015 Jeff McWhirter
 * 
 * This library is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation; either version 2.1 of the License, or (at
 * your option) any later version.
 * 
 * This library is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser
 * General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public License
 * along with this library; if not, write to the Free Software Foundation,
 * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 * 
 */

public class Main {
    /** _more_ */
    public static final String TAG_I = "i";

    /**
     * _more_
     *
     * @param inner _more_
     *
     * @return _more_
     */
    public static String italics(String inner) {
        return tag(TAG_I, "", inner);
    }

    /**
     * _more_
     *
     * @param comp _more_
     *
     * @return _more_
     */
    public static String tag(String comp) {
        return "<" + comp + "/>";
    }

    /**
     * _more_
     *
     * @param comp _more_
     * @param attrs _more_
     *
     * @return _more_
     */
    public static String tag(String comp, String attrs) {
        return "<" + comp + attrs + "/>";
    }

    /**
     * _more_
     *
     * @param tag _more_
     * @param attrs _more_
     * @param inner _more_
     *
     * @return _more_
     */
    public static String tag(String tag, String attrs, String inner) {
        return open(tag, attrs) + inner + close(tag);
    }

    /**
     * _more_
     *
     * @param comp _more_
     *
     * @return _more_
     */
    public static String open(String comp) {
        return "<" + comp + ">";
    }

    /**
     * _more_
     *
     * @param comp _more_
     * @param attrs _more_
     *
     * @return _more_
     */
    public static String open(String comp, String attrs) {
        return "<" + comp + attrs + ">";
    }

    /**
     * _more_
     *
     * @param comp _more_
     *
     * @return _more_
     */
    public static String close(String comp) {
        return "</" + comp + ">";
    }
}

Related

  1. bold(String text)
  2. bold(String text)
  3. boldenRefOrType(String label)
  4. boldHTML(String input)
  5. boldIf(String str, boolean bold)