001/*
002 *  Copyright 2017 Anyware Services
003 *
004 *  Licensed under the Apache License, Version 2.0 (the "License");
005 *  you may not use this file except in compliance with the License.
006 *  You may obtain a copy of the License at
007 *
008 *      http://www.apache.org/licenses/LICENSE-2.0
009 *
010 *  Unless required by applicable law or agreed to in writing, software
011 *  distributed under the License is distributed on an "AS IS" BASIS,
012 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 *  See the License for the specific language governing permissions and
014 *  limitations under the License.
015 */
016package org.ametys.core.ui.widgets.richtext;
017
018import org.ametys.runtime.i18n.I18nizableText;
019
020/**
021 * A style is a way to render a table, a link, an image, a paragraph, an ordered list or an unordered list.
022 */
023public interface RichTextConfigurationStyle
024{
025    /**
026     * Optionally a style can specify a tag name to use. For example, some 'paragraph' styles may use 'p' while another can use 'h1'.<br>
027     * Tag has to be authorized separately
028     * @return The tag name. Can be null.
029     */
030    public String getTagName();
031    /**
032     * Optionally a style can specify a CSS class name to use.<br>
033     * The 'class' attribute has to be separately authorized and this particular value also.
034     * @return The class name. Can be null.
035     */
036    public String getClassName();
037    
038    /**
039     * Get the style label. A short name for button text.
040     * @return A non-null value
041     */
042    public I18nizableText getButtonLabel();
043    /**
044     * Get the style description. A long description for tips.
045     * @return A non-null value
046     */
047    public I18nizableText getButtonDescription();
048    /**
049     * Get the optional css to apply to the button.<br>
050     * The CSS file declaring this class has to be loaded separately.
051     * @return A class name. Can be null.
052     */
053    public String getButtonCSSClass();
054    /**
055     * Get the optional image to set on the button. Small is 16x16.
056     * @return An image url. Can be null.
057     */
058    public String getButtonSmallIcon();
059    /**
060     * Get the optional image to set on the button. Medium is 32x32.
061     * @return An image url. Can be null.
062     */
063    public String getButtonMediumIcon();
064    /**
065     * Get the optional image to set on the button. Large is 48x48.
066     * @return An image url. Can be null.
067     */
068    public String getButtonLargeIcon();
069}