public class MenuDescription
extends java.lang.Object
implements java.io.Externalizable
| Modifier and Type | Field and Description |
|---|---|
private java.util.LinkedHashMap<java.lang.Integer,MenuDescription> |
descriptions
Descriptions of immediate child containers
|
private int |
menuId
Root menu ID.
|
private boolean |
suppressRedraw
Suppress redraw on push of menu description.
|
private java.util.LinkedHashMap<java.lang.Integer,WidgetConfig> |
widgets
The widget configuration data.
|
| Constructor and Description |
|---|
MenuDescription()
Default constructor (only used for serialization).
|
MenuDescription(int id)
The constructor creates a menu description with the given root frame
ID.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addChildDescription(MenuDescription description,
int widgetID)
Add a widget configuration (to the current menu description) and
assign that widget the specified ID.
|
void |
addConfig(WidgetConfig config)
Add a widget configuration to the current menu description.
|
void |
addConfig(WidgetConfig config,
int widgetID)
Add a widget configuration (to the current menu description) and
assign that widget the specified ID.
|
private void |
addConfigInt(WidgetConfig config)
Common worker to add a widget configuration to the menu description.
|
MenuDescription[] |
getChildDescrArray()
Get an array of all sub-descriptions inside this menu description.
|
WidgetConfig |
getConfig(int id)
Gets a specific widget configuration instance for the widget with the
ID provided.
|
java.util.Iterator<WidgetConfig> |
getConfigsIterator()
Get an iterator to enumerate all widget configurations inside this
menu description.
|
int |
getRootMenuID()
Get the root menu ID.
|
java.util.ArrayList<java.lang.Integer> |
getWidgetsInMenu(int menuId)
Gets an array of all immediate widget IDs in a given menu.
|
boolean |
isSuppressRedraw()
Get current value of 'suppress redraw' flag.
|
void |
readExternal(java.io.ObjectInput in)
Replacement for the default object reading method.
|
void |
removeConfig(WidgetConfig config)
Removes a widget configuration from the current menu description.
|
void |
setSuppressRedraw(boolean suppressRedraw)
Set new value for 'suppress redraw' flag.
|
void |
writeExternal(java.io.ObjectOutput out)
Replacement for the default object writing method.
|
private java.util.LinkedHashMap<java.lang.Integer,WidgetConfig> widgets
private java.util.LinkedHashMap<java.lang.Integer,MenuDescription> descriptions
private int menuId
private boolean suppressRedraw
public MenuDescription()
public MenuDescription(int id)
id - Identifies the root frame (or the only frame if this is not
going to hold the configuration of a frame family).public int getRootMenuID()
public java.util.ArrayList<java.lang.Integer> getWidgetsInMenu(int menuId)
menuId - ID of the menu for which widget IDs are requested.public java.util.Iterator<WidgetConfig> getConfigsIterator()
public MenuDescription[] getChildDescrArray()
public WidgetConfig getConfig(int id)
id - The widget ID.null otherwise.public void addConfig(WidgetConfig config)
config - New config to be added to the current menu description.public void addConfig(WidgetConfig config, int widgetID)
config - New config to be added to the current menu description.widgetID - Widget ID.public void addChildDescription(MenuDescription description, int widgetID)
description - New child container descriptionwidgetID - Child container ID.public void removeConfig(WidgetConfig config)
config - The config to be removed from the current menu description.public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablein - The input source from which fields will be restored.java.io.IOException - In case of I/O errors.java.lang.ClassNotFoundException - If pay-load can't be instantiated.public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizableout - The output destination to which fields will be saved.java.io.IOException - In case of I/O errors.public void setSuppressRedraw(boolean suppressRedraw)
suppressRedraw - New value of flag.public boolean isSuppressRedraw()
private void addConfigInt(WidgetConfig config)
config - Widget configuration.