public final class Menu extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Menu.EventHandler |
Modifier | Constructor and Description |
---|---|
protected |
Menu(String title) |
protected |
Menu(String title,
boolean enabled) |
Modifier and Type | Method and Description |
---|---|
void |
add(Menu menu) |
void |
add(MenuItem item) |
Menu.EventHandler |
getEventHandler() |
List<Object> |
getItems()
Gets list of menu elements.
|
String |
getTitle() |
void |
insert(Menu menu,
int pos) |
void |
insert(MenuItem item,
int pos) |
boolean |
isEnabled() |
protected void |
notifyMenuClosed() |
protected void |
notifyMenuOpening() |
void |
remove(int pos) |
void |
setEnabled(boolean enabled) |
void |
setEventHandler(Menu.EventHandler eventHandler) |
boolean |
setPixels(Pixels pixels) |
void |
setTitle(String title) |
protected Menu(String title)
protected Menu(String title, boolean enabled)
public Menu.EventHandler getEventHandler()
public void setEventHandler(Menu.EventHandler eventHandler)
public String getTitle()
public void setTitle(String title)
public boolean isEnabled()
public void setEnabled(boolean enabled)
public boolean setPixels(Pixels pixels)
public List<Object> getItems()
public void add(Menu menu)
public void add(MenuItem item)
public void insert(Menu menu, int pos) throws IndexOutOfBoundsException
IndexOutOfBoundsException
public void insert(MenuItem item, int pos) throws IndexOutOfBoundsException
IndexOutOfBoundsException
public void remove(int pos) throws IndexOutOfBoundsException
IndexOutOfBoundsException
protected void notifyMenuOpening()
protected void notifyMenuClosed()
Copyright © 2020. All rights reserved.