All Downloads are FREE. Search and download functionalities are using the official Maven repository.

wicket.contrib.tinymce.settings.TinyMCESettings Maven / Gradle / Ivy

There is a newer version: 10.0.0-M2
Show newest version
/*
    This file is part of Wicket-Contrib-TinyMce. See
    

    Wicket-Contrib-TinyMce 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 3 of the
    License, or (at your option) any later version.

    Wicket-Contrib-TinyMce 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 Wicket-Contrib-TinyMce.  If not, see
    .
 */
package wicket.contrib.tinymce.settings;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;

import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.Predicate;
import org.apache.commons.collections4.set.ListOrderedSet;
import org.apache.wicket.Component;
import org.apache.wicket.Session;
import org.apache.wicket.request.cycle.RequestCycle;
import org.apache.wicket.request.resource.JavaScriptResourceReference;
import org.apache.wicket.request.resource.ResourceReference;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import wicket.contrib.tinymce.InPlaceEditBehavior;

/**
 * Settings class for TinyMCE editor. User can add/remove buttons, enable/disable resizing, change
 * positions, orientation, alignment and much more.
 * 
 * @author Iulian-Corneliu Costan ([email protected])
 * @author Frank Bille Jensen ([email protected])
 * @see Plugin
 * @see Button
 */
public class TinyMCESettings implements Serializable
{
	private static final long serialVersionUID = 3L;
	private static final Logger LOG = LoggerFactory.getLogger(TinyMCESettings.class);
	public static final ResourceReference REFERENCE = new JavaScriptResourceReference(
		InPlaceEditBehavior.class, "tiny_mce/tiny_mce_src.js");
	public static final ResourceReference REFERENCE_MIN = new JavaScriptResourceReference(
		InPlaceEditBehavior.class, "tiny_mce/tiny_mce.js");
	public static final Set languages = new HashSet(
		Arrays.asList(Language.values()));

	private Theme theme;
	private Location toolbarLocation;
	private Location statusbarLocation;
	private Align toolbarAlign;
	private Language language;
	private EntityEncoding entityEncoding;
	private boolean resizing = false;
	private boolean horizontalResizing = true;
	private boolean resizingUseCookie = true;
	@Deprecated
	private boolean autoResize = false;;
	private boolean readOnly = false;

	private Set plugins = new ListOrderedSet();
	private List controls = new LinkedList();
	private Set




© 2015 - 2024 Weber Informatics LLC | Privacy Policy