| net.mygwt.ui.client.widget.Component net.mygwt.ui.client.widget.Item net.mygwt.ui.client.widget.ToolItem
All known Subclasses: net.mygwt.ui.client.widget.ToolItemAdapter,
ToolItem | public class ToolItem extends Item (Code) | | A selectable item in a ToolBar .
- Styles:
- PUSH, TOGGLE, MENU, SPLIT_MENU, SEPERATOR
- Events:
- Select : (widget)
Fires after the item is selected.
- CSS:
- my-toolitem (the tool item)
- my-toolitem-text (the tool item text)
Note: Only one of the styles PUSH, TOGGLE, MENU and SPLIT_MENU may be
specified.
|
Constructor Summary | |
public | ToolItem() Creates a new PUSH toolitem. | public | ToolItem(int style) Creates a new tool item. |
ToolItem | public ToolItem()(Code) | | Creates a new PUSH toolitem.
|
ToolItem | public ToolItem(int style)(Code) | | Creates a new tool item.
Parameters: style - the item's style information |
addSelectionListener | public void addSelectionListener(SelectionListener listener)(Code) | | Adds a listener interface to receive selection events.
Parameters: listener - the listener to add |
getMenu | public Menu getMenu()(Code) | | Returns the item's menu.
the menu |
getToolBar | public ToolBar getToolBar()(Code) | | Returns the item's parent tool bar.
the toolbar |
isSelected | public boolean isSelected()(Code) | | Returns true if the item is selected.
the selected state |
onHideMenu | protected void onHideMenu()(Code) | | |
onMenuClick | protected void onMenuClick(Event event)(Code) | | |
onRender | protected void onRender()(Code) | | |
onShowMenu | protected void onShowMenu()(Code) | | |
onSplitMenuClick | protected void onSplitMenuClick(Event event)(Code) | | |
removeSelectionListener | public void removeSelectionListener(SelectionListener listener)(Code) | | Removes a previously added listener.
Parameters: listener - the listener to be removed |
setMenu | public void setMenu(Menu menu)(Code) | | Sets the item's menu.
Only applicable when item is of type MENU or
SPLIT_MENU .
Parameters: menu - the menu for the drop down |
setSelected | public void setSelected(boolean selected)(Code) | | Sets the item's selected state.
Parameters: selected - the select state |
setStyle | public void setStyle(int style)(Code) | | Sets the item's style. Has no effect if called after the item has been rendered.
Parameters: style - the style |
setText | public void setText(String text)(Code) | | Sets the item's text.
Parameters: text - the text |
Methods inherited from net.mygwt.ui.client.widget.Component | public void addListener(int eventType, Listener listener)(Code)(Java Doc) public void addStyleName(String style)(Code)(Java Doc) public void addWidgetListener(WidgetListener listener)(Code)(Java Doc) protected void afterRender()(Code)(Java Doc) protected Component blur()(Code)(Java Doc) public void disable()(Code)(Java Doc) protected void disableContextMenu(boolean disable)(Code)(Java Doc) public void disableTextSelection(boolean disable)(Code)(Java Doc) public void dispose()(Code)(Java Doc) public void enable()(Code)(Java Doc) public void enableEvents(boolean enable)(Code)(Java Doc) public boolean fireEvent(int type)(Code)(Java Doc) public boolean fireEvent(int type, BaseEvent be)(Code)(Java Doc) public boolean fireEvent(int eventType, Widget widget, Widget item)(Code)(Java Doc) public boolean fireEvent(int eventType, Widget widget, Widget item, int index)(Code)(Java Doc) public Component focus()(Code)(Java Doc) public Rectangle getBounds()(Code)(Java Doc) public Rectangle getBounds(boolean content)(Code)(Java Doc) protected Menu getContextMenu()(Code)(Java Doc) public Object getData()(Code)(Java Doc) public Object getData(String key)(Code)(Java Doc) public String getDisabledStyle()(Code)(Java Doc) public Element getElement()(Code)(Java Doc) protected Element getFocusElement()(Code)(Java Doc) public int getHeight()(Code)(Java Doc) public int getHeight(boolean content)(Code)(Java Doc) public String getId()(Code)(Java Doc) public int getStyle()(Code)(Java Doc) public ToolTip getToolTip()(Code)(Java Doc) public int getWidth()(Code)(Java Doc) public int getWidth(boolean content)(Code)(Java Doc) public void hide()(Code)(Java Doc) public boolean isDisposed()(Code)(Java Doc) public boolean isEnabled()(Code)(Java Doc) public boolean isRendered()(Code)(Java Doc) public boolean isVisible()(Code)(Java Doc) protected void onAttach()(Code)(Java Doc) public void onBaseEvent(BaseEvent be)(Code)(Java Doc) public void onBrowserEvent(Event event)(Code)(Java Doc) protected void onDestroy()(Code)(Java Doc) protected void onDetach()(Code)(Java Doc) protected void onDisable()(Code)(Java Doc) protected void onEnable()(Code)(Java Doc) protected void onHide()(Code)(Java Doc) protected void onHideContextMenu()(Code)(Java Doc) protected void onLoad()(Code)(Java Doc) protected void onRender()(Code)(Java Doc) protected void onResize(int width, int height)(Code)(Java Doc) protected void onRightClick(BaseEvent be)(Code)(Java Doc) protected void onShow()(Code)(Java Doc) protected void onShowContextMenu(int x, int y)(Code)(Java Doc) public void recalculate()(Code)(Java Doc) public void removeAllListeners()(Code)(Java Doc) public void removeFromParent()(Code)(Java Doc) public void removeListener(int eventType, Listener listener)(Code)(Java Doc) public void removeStyleName(String style)(Code)(Java Doc) public void removeWidgetListener(WidgetListener listener)(Code)(Java Doc) protected void render()(Code)(Java Doc) public void setBorders(boolean show)(Code)(Java Doc) public void setBounds(int x, int y, int width, int height)(Code)(Java Doc) public void setBounds(Rectangle rect)(Code)(Java Doc) protected void setContextMenu(Menu menu)(Code)(Java Doc) public void setData(Object data)(Code)(Java Doc) public void setData(String key, Object data)(Code)(Java Doc) public void setDisabledStyle(String style)(Code)(Java Doc) public void setElement(Element elem)(Code)(Java Doc) public void setEnabled(boolean enabled)(Code)(Java Doc) public void setHeight(int height)(Code)(Java Doc) public void setHeight(String height)(Code)(Java Doc) public void setId(String id)(Code)(Java Doc) public void setIntStyleAttribute(String attr, int value)(Code)(Java Doc) public void setPagePosition(int x, int y)(Code)(Java Doc) public void setPixelSize(int width, int height)(Code)(Java Doc) public void setSize(int width, int height)(Code)(Java Doc) public void setSize(String width, String height)(Code)(Java Doc) public void setStyleAttribute(String attr, String value)(Code)(Java Doc) public void setStyleName(String style)(Code)(Java Doc) public void setTitle(String title)(Code)(Java Doc) public void setToolTip(String text)(Code)(Java Doc) public void setToolTip(String title, String text)(Code)(Java Doc) public void setVisible(boolean visible)(Code)(Java Doc) public void setWidth(int width)(Code)(Java Doc) public void setWidth(String width)(Code)(Java Doc) public void show()(Code)(Java Doc) public void unhook(int type, EventListener listener)(Code)(Java Doc)
|
|
|