|
org.openide.awt 7.23.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DynamicMenuContent
Dynamic result of a Presenter.Menu
or Presenter.Popup
. If the presenters return
an instance of DynamicMenuContent
, then the framework code
will use it's methods to populate the menu and keep it uptodate.
Field Summary | |
---|---|
static String |
HIDE_WHEN_DISABLED
Marker for actions which should be hidden rather than merely disabled. |
Method Summary | |
---|---|
JComponent[] |
getMenuPresenters()
Create main menu/popup menuitems. |
JComponent[] |
synchMenuPresenters(JComponent[] items)
update main menu presenters. |
Field Detail |
---|
static final String HIDE_WHEN_DISABLED
Utilities.actionsToPopup(Action[],Lookup)
will skip over any disabled
actions which have this property set to true, unless they implement
Presenter.Popup
.
This is a convenient way to make context menu items disappear when disabled;
for more complex cases you still need to have a popup presenter with dynamic
menu content.
Method Detail |
---|
JComponent[] getMenuPresenters()
synchMenuPresenters()
method.
If you want different behaviour for menu and popup,
use a different implementation returned by Presenter.Popup
and Presenter.Menu
.
JComponent[] synchMenuPresenters(JComponent[] items)
items
- the previously used menuitems returned by previous call to getMenuPresenters()
or synchMenuPresenters()
|
org.openide.awt 7.23.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |