|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.extjs.gxt.ui.client.widget.Component
com.extjs.gxt.ui.client.widget.BoxComponent
com.extjs.gxt.ui.client.widget.Container<Item>
com.extjs.gxt.ui.client.widget.menu.Menu
public class Menu
A menu component.
false to cancel the menu being displayed.false to cancel the menu being hidden.doit field to false to cancel the action.doit
field to false to cancel the action.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled |
| Field Summary |
|---|
| Fields inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
DEBUG_ID_PREFIX |
| Constructor Summary | |
|---|---|
Menu()
Creates a new menu. |
|
| Method Summary | |
|---|---|
boolean |
add(Item item)
Adds a item to the menu. |
java.lang.String |
getDefaultAlign()
Returns the default alignment. |
int |
getMinWidth()
Returns the menu's minimum width. |
Item |
getParentItem()
Returns the menu's parent item. |
Shadow.ShadowPosition |
getShadowPosition()
Returns the shadow position. |
java.lang.String |
getSubMenuAlign()
Returns the sub menu alignment. |
void |
hide()
Hides the menu. |
Menu |
hide(boolean deep)
Hides this menu and optionally all parent menus |
boolean |
insert(Item item,
int index)
Inserts an item into the menu. |
boolean |
isConstrainViewport()
Returns true if constrain to viewport is enabled. |
boolean |
isVisible()
Returns true if the component is visible. |
void |
onComponentEvent(ComponentEvent ce)
Any events a component receives will be forwarded to this method. |
boolean |
remove(Item item)
Removes a item from the menu. |
void |
setConstrainViewport(boolean constrainViewport)
Sets whether the menu should be constrained to the viewport when shown. |
void |
setDefaultAlign(java.lang.String defaultAlign)
Sets the default El.alignTo(com.google.gwt.user.client.Element, java.lang.String, int[]) anchor position value for this menu
relative to its element of origin (defaults to "tl-bl?"). |
void |
setMinWidth(int minWidth)
Sets he minimum width of the menu in pixels (defaults to 120). |
void |
setShadowPosition(Shadow.ShadowPosition shadowPosition)
Sets the shadow position (defaults to SIDES). |
void |
setSubMenuAlign(java.lang.String subMenuAlign)
The El.alignTo(com.google.gwt.user.client.Element, java.lang.String, int[]) anchor position value to use for submenus of this
menu (defaults to "tl-tr-?"). |
void |
show(com.google.gwt.user.client.Element elem,
java.lang.String pos)
Displays this menu relative to another element. |
void |
show(com.google.gwt.user.client.ui.Widget widget)
Displays this menu relative to the widget using the default alignment. |
void |
showAt(int x,
int y)
Displays this menu at a specific xy position. |
| Methods inherited from class com.extjs.gxt.ui.client.widget.Container |
|---|
findItem, getItem, getItemByItemId, getItemCount, getItems, getWidget, indexOf, iterator, removeAll, scrollIntoView |
| Methods inherited from class com.extjs.gxt.ui.client.widget.BoxComponent |
|---|
getBounds, getHeight, getHeight, getPosition, getShadow, getSize, getWidth, getWidth, isAutoHeight, isAutoWidth, isDeferHeight, isShim, setAutoHeight, setAutoWidth, setBounds, setBounds, setDeferHeight, setHeight, setHeight, setPagePosition, setPagePosition, setPixelSize, setPosition, setShadow, setShim, setSize, setSize, setWidth, setWidth |
| Methods inherited from class com.extjs.gxt.ui.client.widget.Component |
|---|
addListener, addStyleName, addWidgetListener, disable, disableEvents, disableTextSelection, el, enable, enableEvents, fireEvent, fireEvent, fireEvent, fly, focus, getBaseStyle, getBorders, getData, getData, getElement, getId, getItemId, getModel, getState, getToolTip, hideToolTip, isEnabled, isRendered, onBrowserEvent, recalculate, removeAllListeners, removeFromParent, removeListener, removeStyleName, removeWidgetListener, render, render, saveState, setBorders, setData, setData, setElement, setEnabled, setEnableState, setId, setIntStyleAttribute, setItemId, setStyleAttribute, setStyleName, setTitle, setToolTip, setToolTip, setVisible, show, toString |
| Methods inherited from class com.google.gwt.user.client.ui.Widget |
|---|
getParent, isAttached |
| Methods inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
addStyleDependentName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, isVisible, removeStyleDependentName, setStylePrimaryName, setVisible, sinkEvents, unsinkEvents |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Menu()
| Method Detail |
|---|
public boolean add(Item item)
item - the new itempublic java.lang.String getDefaultAlign()
public int getMinWidth()
public Item getParentItem()
public Shadow.ShadowPosition getShadowPosition()
public java.lang.String getSubMenuAlign()
public void hide()
hide in class Componentpublic Menu hide(boolean deep)
deep - true to close all parent menus
public boolean insert(Item item,
int index)
item - the item to insertindex - the insert locationpublic boolean isConstrainViewport()
public boolean isVisible()
Componenttrue if the component is visible.
isVisible in class Componentpublic void onComponentEvent(ComponentEvent ce)
ComponentComponent.onBrowserEvent(com.google.gwt.user.client.Event) method
should not be overridden or modified.
onComponentEvent in class Componentce - the base eventpublic boolean remove(Item item)
item - the menu to remove
true if the item was removedpublic void setConstrainViewport(boolean constrainViewport)
showAt(int, int).
constrainViewport - true to contrainpublic void setDefaultAlign(java.lang.String defaultAlign)
El.alignTo(com.google.gwt.user.client.Element, java.lang.String, int[]) anchor position value for this menu
relative to its element of origin (defaults to "tl-bl?").
defaultAlign - the default alignpublic void setMinWidth(int minWidth)
minWidth - the min widthpublic void setShadowPosition(Shadow.ShadowPosition shadowPosition)
shadowPosition - the positionpublic void setSubMenuAlign(java.lang.String subMenuAlign)
El.alignTo(com.google.gwt.user.client.Element, java.lang.String, int[]) anchor position value to use for submenus of this
menu (defaults to "tl-tr-?").
subMenuAlign - the sub alignment
public void show(com.google.gwt.user.client.Element elem,
java.lang.String pos)
elem - the element to align topos - the El.alignTo(com.google.gwt.user.client.Element, java.lang.String, int[]) anchor position to use in aligning to the
element (defaults to defaultAlign)public void show(com.google.gwt.user.client.ui.Widget widget)
widget - the align widget
public void showAt(int x,
int y)
x - the x coordinatey - the y coordinate
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||