|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opencms.workplace.explorer.CmsExplorerContextMenu
public class CmsExplorerContextMenu
Provides methods to build a context menu for an explorer resource type.
This object stores all entries which are displayed in a context menu in a sorted list. The sort order is specified in an attribute of the context menu subnodes in the OpenCms configuration.
| Constructor Summary | |
|---|---|
CmsExplorerContextMenu()
Default constructor. |
|
| Method Summary | |
|---|---|
void |
addEntries(List entries)
Adds a list of CmsContextMenuItem objects to the context menu list. |
void |
addEntry(CmsExplorerContextMenuItem entry)
Adds a single CmsContextMenuItem object to the context menu list. |
void |
addMenuEntry(String key,
String uri,
String rules,
String target,
String order)
Adds a single context menu entry to the list of context menu items. |
void |
addMenuSeparator(String order)
Adds a menu separator to the list of context menu items. |
Object |
clone()
|
List |
getAllEntries()
Returns all entries of the context menu. |
String |
getJSEntries(CmsObject cms,
CmsExplorerTypeSettings settings,
int resTypeId,
Locale locale)
Builds the Javascript to create the context menu. |
boolean |
isEmpty()
Tests if the context menu is empty. |
boolean |
isMultiMenu()
Returns true if the menu is a multi context menu for more than one selected file. |
void |
setAllEntries(List entries)
Sets all entries of the context menu. |
void |
setMultiMenu(boolean multiMenu)
Sets if the menu is a multi context menu for more than one selected file. |
void |
sortEntries()
Sorts the list of entries according to the value of the "order" attribute in the configuration. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CmsExplorerContextMenu()
| Method Detail |
|---|
public void addEntries(List entries)
The list is sorted by their order after that operation.
entries - a list of initialized context menu itemspublic void addEntry(CmsExplorerContextMenuItem entry)
The list is sorted by their order after that operation.
entry - a single context menu item
public void addMenuEntry(String key,
String uri,
String rules,
String target,
String order)
key - the key of the current entryuri - the dialog URI to call with the current entryrules - the display rulestarget - the frame target of the menu entryorder - the sort order of the current entrypublic void addMenuSeparator(String order)
order - the sort order of the separatorpublic Object clone()
clone in class ObjectObject.clone()public List getAllEntries()
public String getJSEntries(CmsObject cms,
CmsExplorerTypeSettings settings,
int resTypeId,
Locale locale)
cms - the CmsObjectsettings - the explorer type settings for which the context menu is createdresTypeId - the id of the resource type which uses the context menulocale - the locale to generate the context menu for
public boolean isEmpty()
public boolean isMultiMenu()
public void setAllEntries(List entries)
The list is sorted by their order after that operation.
entries - all entries of the context menupublic void setMultiMenu(boolean multiMenu)
multiMenu - true, if the menu is a multi context menu for more than one selected file, otherwise falsepublic void sortEntries()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||