<commit_before>/*
 * This is part of Geomajas, a GIS framework, http://www.geomajas.org/.
 *
 * Copyright 2008-2012 Geosparc nv, http://www.geosparc.com/, Belgium.
 *
 * The program is available in open source according to the GNU Affero
 * General Public License. All contributions in this program are covered
 * by the Geomajas Contributors License Agreement. For full licensing
 * details, see LICENSE.txt in the project root.
 */
package org.geomajas.gwt.client.action.toolbar.parameter;

import org.geomajas.configuration.Parameter;

/**
 * {@link Parameter} that is used to configure the layout of a button in ribbon or drop down panel.
 * 
 * @author <NAME>
 *
 */
public class ButtonLayoutParameter extends Parameter {
	
	/**
	 * Layout values for a button in ribbon or drop down panel.
	 * @author <NAME>
	 *
	 */
	public enum Layout {
		/**
		 * Button layout, which is the same as a RibbonButton 
		 * in a ToolbarActionList; icon (16px) on the left and title on the right.
		 */
		ICON_AND_TITLE,
		/**
		 * Button layout consisting of an icon (24px) on the 
		 * left and the title and description on the right, the title on top of the description.
		 */
		ICON_TITLE_AND_DESCRIPTION
	}

	private static final long serialVersionUID = 1L;
	public static final String NAME = "buttonLayout";
	private Layout layout;
	
	public ButtonLayoutParameter() {
		super.setName(NAME);
	}
	
	/**
	 * {@inheritDoc}
	 */
	@Override
	public void setName(String name) {
		throw new IllegalArgumentException(
				"Public naming is not allowed for LayoutParameter (its name is always 'buttonLayout')");
	}
	
	@Override
	public void setValue(String value) {
		this.layout = Layout.valueOf(value);
		super.setValue(layout.toString());
	}
	
	public void setValue(Layout layout) {
		this.layout = layout;<commit_msg>GWT-401: Javadoc<commit_after>/*
 * This is part of Geomajas, a GIS framework, http://www.geomajas.org/.
 *
 * Copyright 2008-2012 Geosparc nv, http://www.geosparc.com/, Belgium.
 *
 * The program is available in open source according to the GNU Affero
 * General Public License. All contributions in this program are covered
 * by the Geomajas Contributors License Agreement. For full licensing
 * details, see LICENSE.txt in the project root.
 */
package org.geomajas.gwt.client.action.toolbar.parameter;

import org.geomajas.configuration.Parameter;

/**
 * {@link Parameter} that is used to configure the layout of a button in ribbon or drop down panel.
 * 
 * @author <NAME>
 *
 */
public class ButtonLayoutParameter extends Parameter {
	
	/**
	 * Layout values for a button in ribbon or drop down panel.
	 * @author <NAME>
	 *
	 */
	public enum Layout {
		/**
		 * Button layout, which is the same as a RibbonButton 
		 * in a ToolbarActionList; icon (16px) on the left and title on the right.
		 */
		ICON_AND_TITLE,
		/**
		 * Button layout consisting of an icon (24px) on the 
		 * left and the title and description on the right, the title on top of the description.
		 */
		ICON_TITLE_AND_DESCRIPTION
	}

	private static final long serialVersionUID = 1L;
	public static final String NAME = "buttonLayout";
	private Layout layout;
	
	public ButtonLayoutParameter() {
		super.setName(NAME);
	}
	
	/**
	 * {@inheritDoc}
	 */
	@Override
	public void setName(String name) {
		throw new IllegalArgumentException(
				"Public naming is not allowed for LayoutParameter (its name is always 'buttonLayout')");
	}
	
	/**
	 * {@inheritDoc}
	 */
	@Override
	public void setValue(String value) {
		this.layout = Layout.valueOf(value);
		super.setValue(layout.toString());
	}
	
	public void setValue(Layout layout) {
		this.layout = layout;
{'fraction_non_alphanumeric': 0.09475418840977753, 'fraction_numerical': 0.007964844822850866, 'mean_word_length': 3.5753768844221105, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2377178', 'n_tokens_mistral': 1174, 'n_tokens_neox': 1039, 'n_words': 403}