public class MenuPath extends ArrayList<MenuEntry>
UIDetails
.Modifier and Type | Field and Description |
---|---|
static String |
PATH_SEPARATOR
The separator between elements of a menu path string.
|
modCount
Constructor and Description |
---|
MenuPath()
Creates an empty menu path.
|
MenuPath(Collection<? extends MenuEntry> menuEntries)
Creates a menu path with the given entries.
|
MenuPath(String path)
Creates a menu path with entries parsed from the given string.
|
MenuPath(String path,
String separator)
Creates a menu path with entries parsed from the given string, splitting on
the specified separator.
|
MenuPath(String path,
String separator,
boolean trim)
Creates a menu path with entries parsed from the given string, splitting on
the specified separator, and trimming whitespace if indicated.
|
Modifier and Type | Method and Description |
---|---|
MenuEntry |
getLeaf()
Gets the final element of the menu path.
|
String |
getMenuString()
Gets the menu path as a string.
|
String |
getMenuString(boolean includeLeaf)
Gets the menu path as a string, with or without the final element.
|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
equals, hashCode
containsAll, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
containsAll, equals, hashCode
parallelStream, stream
public static final String PATH_SEPARATOR
public MenuPath()
public MenuPath(Collection<? extends MenuEntry> menuEntries)
MenuPath
as
the argument will make a copy.public MenuPath(String path)
>
as the separator (e.g., File>New>Image
).PATH_SEPARATOR
public MenuPath(String path, String separator)
Copyright © 2015–2022 SciJava. All rights reserved.