|
|||||||||
| 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<Component>
com.extjs.gxt.ui.client.widget.menu.Menu
public class Menu
A menu component.
BaseEvent.setCancelled(boolean).BaseEvent.setCancelled(boolean).BaseEvent.setCancelled(boolean).BaseEvent.setCancelled(boolean).
| 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(Component item)
Adds a item to the menu. |
java.lang.String |
getDefaultAlign()
Returns the default alignment. |
El |
getLayoutTarget()
Returns the container's layout target. |
int |
getMaxHeight()
|
int |
getMinWidth()
Returns the menu's minimum width. |
Item |
getParentItem()
Returns the menu's parent item. |
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(Component item,
int index)
Inserts an item into the menu. |
boolean |
isConstrainViewport()
Returns true if constrain to viewport is enabled. |
boolean |
isEnableScrolling()
|
boolean |
isFocusOnShow()
|
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(Component 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 |
setEnableScrolling(boolean enableScrolling)
|
void |
setFocusOnShow(boolean focusOnShow)
|
void |
setMaxHeight(int maxHeight)
|
void |
setMinWidth(int minWidth)
Sets he minimum width of the menu in pixels (defaults to 120). |
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.Element elem,
java.lang.String pos,
int[] offsets)
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 |
|---|
disable, enable, 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, getShadowOffset, getShadowPosition, getSize, getWidth, getWidth, isAutoHeight, isAutoWidth, isDeferHeight, isShim, setAutoHeight, setAutoWidth, setBounds, setBounds, setDeferHeight, setHeight, setHeight, setPagePosition, setPagePosition, setPixelSize, setPosition, setShadow, setShadowOffset, setShadowPosition, setShim, setSize, setSize, setWidth, setWidth, sync, syncSize |
| Methods inherited from class com.extjs.gxt.ui.client.widget.Component |
|---|
addListener, addPlugin, addStyleName, addWidgetListener, clearState, disableEvents, disableTextSelection, el, enableEvents, fireEvent, fireEvent, fireEvent, fly, focus, getBaseStyle, getBorders, getContextMenu, getData, getElement, getHideMode, getId, getItemId, getListeners, getModel, getState, getStateId, getToolTip, hasListeners, hasListeners, hideToolTip, isDisabledEvents, isEnabled, isRendered, isStateful, mask, mask, mask, onBrowserEvent, recalculate, removeAllListeners, removeFromParent, removeListener, removeStyleName, removeSwallow, removeToolTip, removeWidgetListener, render, render, repaint, saveState, setBorders, setContextMenu, setData, setElement, setEnabled, setHideMode, setId, setIntStyleAttribute, setItemId, setStateful, setStateId, setStyleAttribute, setStyleName, setTitle, setToolTip, setToolTip, setVisible, setZIndex, show, sinkEvents, swallowEvent, swallowEvent, toString, unmask |
| Methods inherited from class com.google.gwt.user.client.ui.Widget |
|---|
fireEvent, 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, 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(Component item)
item - the new itempublic java.lang.String getDefaultAlign()
public El getLayoutTarget()
Container
getLayoutTarget in class Container<Component>public int getMaxHeight()
public int getMinWidth()
public Item getParentItem()
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(Component item,
int index)
item - the item to insertindex - the insert locationpublic boolean isConstrainViewport()
public boolean isEnableScrolling()
public boolean isFocusOnShow()
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(Component 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 setEnableScrolling(boolean enableScrolling)
public void setFocusOnShow(boolean focusOnShow)
public void setMaxHeight(int maxHeight)
public void setMinWidth(int minWidth)
minWidth - the min widthpublic 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.Element elem,
java.lang.String pos,
int[] offsets)
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)offsets - the menu align offsetspublic 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 | ||||||||