public class ContextMenuManager
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
NO_MOUSE_MODIFIER_EX |
Modifier and Type | Method and Description |
---|---|
javax.swing.JMenu |
createContextMenuItems(ContextMenuIf callerIf,
Program program,
boolean markDefaultIf)
Creates the context menu items.
|
javax.swing.JPopupMenu |
createRemovedProgramContextMenu(Program program) |
ContextMenuIf[] |
getAvailableContextMenuIfs(boolean includingDisabledItems,
boolean cleanSeparator)
Returns all available ContextMenuItems
|
ContextMenuIf |
getContextMenuArrayForModifierEx(int modifierEx,
boolean leftMouseButton,
boolean singleClick)
Gets the ContextMenuIf for a mouse click and modifier.
|
ContextMenuIf |
getContextMenuForDoubleClick(java.awt.event.MouseEvent e)
Gets the ContextMenuIf for a double mouse click.
|
ContextMenuIf |
getContextMenuForSingleClick(java.awt.event.MouseEvent e)
Gets the ContextMenuIf for a single mouse click.
|
ContextMenuIf |
getContextMenuIfForId(java.lang.String id)
Returns the ContextMenuIf for the id.
|
java.util.List<ContextMenuIf> |
getDisabledContextMenuIfs()
Returns a List with all disabled ContextMenuIfs
|
static ContextMenuManager |
getInstance()
Returns the instance of this class.
|
void |
init() |
public static final int NO_MOUSE_MODIFIER_EX
public void init()
public static ContextMenuManager getInstance()
public ContextMenuIf getContextMenuForSingleClick(java.awt.event.MouseEvent e)
e
- The MouseEvent to get the ContextMenuIf for.null
if there is no single mouse click ContextMenuIf for the mouse event.public ContextMenuIf getContextMenuArrayForModifierEx(int modifierEx, boolean leftMouseButton, boolean singleClick)
modifierEx
- The modifier for the mouse event.leftMouseButton
- If the ContextMenuIf for the left mouse button should be gotten.singleClick
- If the ContextMenuIf for a single mouse click should be gotten.null
if there is no single mouse click ContextMenuIf.public ContextMenuIf getContextMenuForDoubleClick(java.awt.event.MouseEvent e)
e
- The MouseEvent to get the ContextMenuIf for.null
if there is no double mouse click ContextMenuIf for the mouse event.public ContextMenuIf getContextMenuIfForId(java.lang.String id)
id
- The id to get the ContextMenuIf for.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 javax.swing.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 java.util.List<ContextMenuIf> getDisabledContextMenuIfs()
public javax.swing.JPopupMenu createRemovedProgramContextMenu(Program program)
TV-Browser 3.4.4, Copyright (C) 2004-2008 TV-Browser Team (dev@tvbrowser.org)