public interface IContextMenuManager
Modifier and Type | Method and Description |
---|---|
void |
addMenuEntry(ArrayList<ISelectionModel> modelList,
String actionID,
String container,
String insertAt,
int seek)
Adds a new entry to the contemporary context menu.
|
IExtendedContextMenu |
createContextMenu(IAbstractFileSelection selection)
Creates a concrete instance of the template that was specified by the id
parameter.
|
IFileTypeFilter |
createFileTypeFilter(String name,
String type,
String content,
int min,
int max)
Creates a new FileTypeFilter.
|
ISelectionModel |
createSelectionModel(ArrayList<ISelectionFilter> filterList)
Creates a new SelectionModel.
|
void |
insertContextMenuTemplate()
Creates and adds the context menu template to the contextmenu manager.
|
void |
removeMenuEntry(String actionID)
Removes a menu entry from the contemporary context menu.
|
void insertContextMenuTemplate()
IExtendedContextMenu createContextMenu(IAbstractFileSelection selection)
selection
- void addMenuEntry(ArrayList<ISelectionModel> modelList, String actionID, String container, String insertAt, int seek)
modelList
- the SelectionModels that determine if the entry shall be
displayed or not for the current selectionactionID
- the id of the action that is added to the menucontainer
- the id of the containing action, if the added action is a
submenu of another menu. If it is no submenu, leave container
empty.insertAt
- the id of the action, that shall serve as an anchor for the
added action. The position of the menu entry is determined
relatively to this anchor.seek
- the distance from the inserAt, e.g. 1, if the entry shall be
displayed directly below the anchor.void removeMenuEntry(String actionID)
actionID
- the id of the action that shall be removed.IFileTypeFilter createFileTypeFilter(String name, String type, String content, int min, int max)
name
- a regular expression that specifies all file names that are
accepted by the filtertype
- the accepted file types, "f" for normal files, "d" for
directories, "" for all file typescontent
- checks weather a given file provider is registered, i.e.
"viptool.petrinet.io.TroyNetFileProvider", usually this
field remains emptymin
- number of files that have to be selected at leastmax
- number of files that may maximally be selected, -1 for maxIntISelectionModel createSelectionModel(ArrayList<ISelectionFilter> filterList)
filterList
- a list of ISelectionFilters, that the SelectionModel shall
contain.