01: /*
02: * @(#)TopLevelMenuContainer.java
03: *
04: * Copyright 2002 - 2004 JIDE Software Inc. All rights reserved.
05: */
06: package com.jidesoft.swing;
07:
08: /**
09: * A markup interface to indicate this is a top level menu or command bar.
10: * The original Swing code used JMenuBar to determine if it is TopLeveMenu. However
11: * since we introduced CommandBar, this crieta is not correct anymore. The new condition is
12: * if a contianer implements TopLevelMenuContainer, the children in that contianer is top level menu.
13: * If isMenuBar returns true, it means the container is really a menu bar, just like JMenuBar.
14: */
15: public interface TopLevelMenuContainer {
16: /**
17: * Checks if the TopLevelMenuContainer is used as JMenuBar.
18: *
19: * @return true if the TopLevelMenuContainer is used as JMenuBar.
20: */
21: boolean isMenuBar();
22: }
|