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

com.jwebmp.plugins.bootstrap.listgroup.BSListGroupListItem Maven / Gradle / Ivy

There is a newer version: 0.66.0.1
Show newest version
/*
 * Copyright (C) 2017 Marc Magon
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program 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 General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 */
package com.jwebmp.plugins.bootstrap.listgroup;

import com.jwebmp.core.base.html.ListItem;
import com.jwebmp.core.base.html.interfaces.children.ListItemChildren;

/**
 * Basic example The most basic list group is an unordered list with list items and the proper classes. Build upon it with the options that follow, or with your own CSS as needed.
 *
 * @param 
 *
 * @author GedMarc
 * @since 19 Jan 2017
 */
public class BSListGroupListItem>
		extends ListItem
		implements BSListGroupChildren, IBSListGroupListItem
{

	private static final long serialVersionUID = 1L;

	/**
	 * Basic example The most basic list group is an unordered list with list items and the proper classes. Build upon it with the options that follow, or with your own CSS as
	 * needed.
	 */
	public BSListGroupListItem()
	{
		addClass(BSComponentListGroupOptions.List_Group_Item);
	}

	/**
	 * Basic example The most basic list group is an unordered list with list items and the proper classes. Build upon it with the options that follow, or with your own CSS as
	 * needed.
	 *
	 * @param text
	 */
	public BSListGroupListItem(String text)
	{
		super(text);
		addClass(BSComponentListGroupOptions.List_Group_Item);
	}

	/**
	 * Active items Add .active to a .list-group-item to indicate the current active selection.
	 *
	 * @return
	 */
	@Override
	public J setActive()
	{
		addClass(BSComponentListGroupOptions.Active);
		return (J) this;
	}

	/**
	 * Contextual classes Use contextual classes to style list items with a stateful background and color.
	 *
	 * @return
	 */
	@Override
	public J setDanger()
	{
		addClass(BSComponentListGroupOptions.List_Group_Item_Danger);
		return (J) this;
	}

	/**
	 * Disabled items Add .disabled to a .list-group-item to make it appear disabled. Note that some elements with .disabled will also require custom JavaScript to fully disable
	 * their click events
	 * (e.g., links).
	 *
	 * @return
	 */
	@Override
	public J setDisabled()
	{
		addClass(BSComponentListGroupOptions.Disabled);
		return (J) this;
	}

	/**
	 * Contextual classes Use contextual classes to style list items with a stateful background and color.
	 *
	 * @return
	 */
	@Override
	public J setInfo()
	{
		addClass(BSComponentListGroupOptions.List_Group_Item_Info);
		return (J) this;
	}

	/**
	 * Contextual classes Use contextual classes to style list items with a stateful background and color.
	 *
	 * @return
	 */
	@Override
	public J setSuccess()
	{
		addClass(BSComponentListGroupOptions.List_Group_Item_Success);
		return (J) this;
	}

	/**
	 * Contextual classes Use contextual classes to style list items with a stateful background and color.
	 *
	 * @return
	 */
	@Override
	public J setWarning()
	{
		addClass(BSComponentListGroupOptions.List_Group_Item_Warning);
		return (J) this;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy