public class ContextMenuManager extends Object
Modifier and Type | Method and Description |
---|---|
JMenu |
createContextMenuItems(ContextMenuIf callerIf,
Program program,
boolean markDefaultIf)
Creates the context menu items.
|
ContextMenuIf[] |
getAvailableContextMenuIfs(boolean includingDisabledItems,
boolean cleanSeparator)
Returns all available ContextMenuItems
|
ContextMenuIf |
getContextMenuIfForId(String id)
Returns the ContextMenuIf for the id.
|
ContextMenuIf |
getDefaultContextMenuIf()
Gets the default context menu interface.
|
List<ContextMenuIf> |
getDisabledContextMenuIfs()
Returns a List with all disabled ContextMenuIfs
|
static ContextMenuManager |
getInstance()
Returns the instance of this class.
|
ContextMenuIf |
getLeftSingleClickIf()
Gets the left single click context menu interface.
|
ContextMenuIf |
getMiddleClickIf()
Gets the middle click context menu interface.
|
void |
setDefaultContextMenuIf(ContextMenuIf value)
Sets the default context menu interface.
|
void |
setLeftSingleClickIf(ContextMenuIf value)
Sets the left single click context menu interface.
|
void |
setMiddleClickIf(ContextMenuIf value)
Sets the middle click context menu interface.
|
public static ContextMenuManager getInstance()
public ContextMenuIf getContextMenuIfForId(String id)
id
- The id to get the ContextMenuIf for.public ContextMenuIf getLeftSingleClickIf()
This is context menu that should be executed by default when single left clicking a program in the program table. It is shown with a dark green font in the context menu.
null
if there is no
default context menu interface.public ContextMenuIf getDefaultContextMenuIf()
This is context menu that should be executed by default when double-clicking a program in the program table. It is shown with a bold font in the context menu.
null
if there is no
default context menu interface.public ContextMenuIf getMiddleClickIf()
This is the context menu that should be executed by default when middle-clicking a program in the program table. It is shown with an italic font in the context menu.
null
if there is no
middle click context menu interface defined.public void setLeftSingleClickIf(ContextMenuIf value)
value
- The ContextMenuIf to set as left single click context menu interface.public void setDefaultContextMenuIf(ContextMenuIf value)
value
- The ContextMenuIf to set as default context menu interface.public void setMiddleClickIf(ContextMenuIf value)
value
- The ContextMenuIf to set as middle click context menu interface.public ContextMenuIf[] getAvailableContextMenuIfs(boolean includingDisabledItems, boolean cleanSeparator)
includingDisabledItems
- If true the List also contains all disabled ItemscleanSeparator
- If true, all Separators that follow directly another Separator will be removedpublic JMenu createContextMenuItems(ContextMenuIf callerIf, Program program, boolean markDefaultIf)
callerIf
- The caller Context menu interface.program
- The program to show the context menu for.markDefaultIf
- True if the default context menu interfaces should be highlighted.public List<ContextMenuIf> getDisabledContextMenuIfs()
TV-Browser 2.7.6, Copyright (C) 04-2003 Martin Oberhauser (martin@tvbrowser.org)