@groovy.transform.ToString(includeNames: true, includePackage: false) class TaskMenu extends java.lang.Object
Defines a task menu which has folders and tasks the user can execute. This class maintains the menu items/folders for a given task menu.
Type | Name and description |
---|---|
private TaskMenuFolder |
root The root folder. |
private boolean |
sorted Tracks if the task menu needs re-sorting due to new values inserted. |
Constructor and description |
---|
TaskMenu
() |
Type Params | Return Type | Name and description |
---|---|---|
|
protected TaskMenuFolder |
buildFoldersIfNeeded(java.lang.String folderDefinition) This will build the folders in the correct hierarchy. |
|
protected TaskMenuFolder |
buildFoldersIfNeeded(java.util.List<TaskMenuFolder> currentFolders, java.util.List<TaskMenuFolder> menuFolders) This will build the folders in the correct hierarchy. |
|
java.lang.Object |
leftShift(TaskMenuItem menuItem) Adds the given menu item to the folder structure in the correct location. |
|
void |
sort() Sorts the folders and all sub folders. |
|
java.lang.String |
toFullString() Build human readable version of this object's full contents. |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
The root folder. Never displayed. It just contains the first level of folders.
Tracks if the task menu needs re-sorting due to new values inserted. This only tracks the calls to leftShift().
This will build the folders in the correct hierarchy. It will add them to the current folder list and return the lowest level folder.
folderDefinition
- The folder definition string to use in creating the folders.This will build the folders in the correct hierarchy. It will add them to the current folder list and return the lowest level folder.
currentFolders
- The current level of folders being processed.menuFolders
- The list of folders to process from the current level.Adds the given menu item to the folder structure in the correct location. Will create the folders as needed.
menuItem
- The menu item.Sorts the folders and all sub folders. Also sorts the menu items. See TaskMenuFolder for details.
Build human readable version of this object's full contents. This produces a multi-line string with indentation to show levels. @return
Groovy Documentation