org.sakaiproject.cheftool.menu.MenuDivider Maven / Gradle / Ivy
/**********************************************************************************
* $URL$
* $Id$
***********************************************************************************
*
* Copyright (c) 2003, 2004, 2005, 2006, 2008 The Sakai Foundation
*
* Licensed under the Educational Community License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.opensource.org/licenses/ECL-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
**********************************************************************************/
package org.sakaiproject.cheftool.menu;
import java.util.ArrayList;
import java.util.List;
import org.sakaiproject.cheftool.api.MenuItem;
/**
*
* MenuDivider is a menu item that makes a visible divider in the menu.
*
*/
public class MenuDivider implements MenuItem
{
/**
* Construct a menu divider.
*/
public MenuDivider()
{
} // MenuDivider
/**
* Does this item act as a container for other items?
*
* @return true if this MenuItem is a container for other items, false if not.
*/
public boolean getIsContainer()
{
return false;
} // getIsContainer
/**
* Is this item a divider ?
*
* @return true if this MenuItem is a divider, false if not.
*/
public boolean getIsDivider()
{
return true;
} // getIsDivider
/**
* Access the display title for the item.
*
* @return The display title for the item.
*/
public String getTitle()
{
return "-";
} // getTitle
/**
* Access the icon name for the item (or null if no icon).
*
* @return The icon name for the item (or null if no icon).
*/
public String getIcon()
{
return null;
} // getIcon
/**
* Access the enabled flag for the item.
*
* @return True if the item is enabled, false if not.
*/
public boolean getIsEnabled()
{
return true;
} // getIsEnabled
/**
* Access the action string for this item; what to do when the user clicks. Note: if getIsMenu(), there will not be an action string (will return "").
*
* @return The action string for this item.
*/
public String getAction()
{
return "";
} // getAction
/**
* Access the full URL string for this item; what to do when the user clicks. Note: this if defined overrides getAction() which should be "". Note: if getIsMenu(), there will not be a URL string (will return "").
*
* @return The full URL string for this item.
*/
public String getUrl()
{
return "";
} // getUrl
/**
* Access the form name whose values will be used when this item is selected.
*
* @return The form name whose values will be used when this item is selected.
*/
public String getForm()
{
return null;
} // getForm
/**
* Access the sub-items of the item. Note: if !isContainer(), there will be no sub-items (will return EmptyIterator).
*
* @return The sub-items of the item.
*/
public List
© 2015 - 2024 Weber Informatics LLC | Privacy Policy