|
|||||||||
| 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.smartgwt.client.widgets.BaseWidget
com.smartgwt.client.widgets.Canvas
com.smartgwt.client.widgets.layout.Layout
com.smartgwt.client.widgets.toolbar.Toolbar
public abstract class Toolbar
A Toolbar creates a vertical or horizontal strip of similar components (typically Buttons) and provides managed resizing and reordering behavior over those components.
If you are creating a bar with a mixture of different elements (eg
some MenuButtons, some Labels, some Buttons, some custom components), you want to use a ToolStrip. A Toolbar is better suited for managing a set of highly similar,
interchangeable components, such as ListGrid headers.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled |
| Field Summary |
|---|
| Fields inherited from class com.smartgwt.client.widgets.BaseWidget |
|---|
config, configOnly, id, isElementSet, scClassName |
| Fields inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
DEBUG_ID_PREFIX |
| Constructor Summary | |
|---|---|
Toolbar()
|
|
Toolbar(JavaScriptObject jsObj)
|
|
| Method Summary | |
|---|---|
HandlerRegistration |
addItemClickHandler(ItemClickHandler handler)
Add a itemClick handler. |
HandlerRegistration |
addItemDragResizedHandler(ItemDragResizedHandler handler)
Add a itemDragResized handler. |
protected JavaScriptObject |
create()
|
Boolean |
getCanAcceptDrop()
If true, items (buttons) can be dropped into this toolbar, and the toolbar will show a drop line at the drop location. |
Boolean |
getCanReorderItems()
If true, items can be reordered by dragging on them. |
Boolean |
getCanResizeItems()
If true, items (buttons) can be resized by dragging on them. |
Boolean |
getVertical()
Indicates whether the buttons are drawn horizontally from left to right (false), or vertically from top to bottom (true). |
void |
itemDoubleClick(Button item,
int itemNum)
Called when one of the buttons receives a double-click event |
void |
setCanAcceptDrop(Boolean canAcceptDrop)
If true, items (buttons) can be dropped into this toolbar, and the toolbar will show a drop line at the drop location. |
void |
setCanReorderItems(Boolean canReorderItems)
If true, items can be reordered by dragging on them. |
void |
setCanResizeItems(Boolean canResizeItems)
If true, items (buttons) can be resized by dragging on them. |
static void |
setDefaultProperties(Toolbar toolbarProperties)
Class level method to set the default properties of this class. |
void |
setVertical(Boolean vertical)
Indicates whether the buttons are drawn horizontally from left to right (false), or vertically from top to bottom (true). |
| Methods inherited from class com.google.gwt.user.client.ui.Widget |
|---|
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents |
| Methods inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
addStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getStyleElement, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent, unsinkEvents |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
|---|
fireEvent |
| Constructor Detail |
|---|
public Toolbar()
public Toolbar(JavaScriptObject jsObj)
| Method Detail |
|---|
protected JavaScriptObject create()
create in class Layoutpublic void setCanAcceptDrop(Boolean canAcceptDrop)
Note : This is an advanced setting
setCanAcceptDrop in class CanvascanAcceptDrop - canAcceptDrop Default value is falseDragdrop overview and related methods,
Drag create Examplepublic Boolean getCanAcceptDrop()
getCanAcceptDrop in class CanvasDragdrop overview and related methods,
Drag create Examplepublic void setCanReorderItems(Boolean canReorderItems)
Note : This is an advanced setting
canReorderItems - canReorderItems Default value is falsepublic Boolean getCanReorderItems()
public void setCanResizeItems(Boolean canResizeItems)
canResizeItems at runtime.
Note : This is an advanced setting
canResizeItems - New value for this.canResizeItems. Default value is falsepublic Boolean getCanResizeItems()
public void setVertical(Boolean vertical)
setVertical in class Layoutvertical - vertical Default value is falseAppearance overview and related methodspublic Boolean getVertical()
getVertical in class LayoutAppearance overview and related methodspublic HandlerRegistration addItemClickHandler(ItemClickHandler handler)
Called when one of the buttons receives a click event
addItemClickHandler in interface HasItemClickHandlershandler - the itemClick handler
HandlerRegistration used to remove this handler
public void itemDoubleClick(Button item,
int itemNum)
item - pointer to the button in questionitemNum - number of the button in questionpublic HandlerRegistration addItemDragResizedHandler(ItemDragResizedHandler handler)
Observable, overrideable method - called when one of the Toolbar buttons is drag resized.
addItemDragResizedHandler in interface HasItemDragResizedHandlershandler - the itemDragResized handler
HandlerRegistration used to remove this handlerpublic static void setDefaultProperties(Toolbar toolbarProperties)
Note: This method is intended for setting default attributes only and will effect all instances of the underlying class (including those automatically generated in JavaScript). This method should not be used to apply standard EventHandlers or override methods for a class - use a custom subclass instead.
toolbarProperties - properties that should be used as new defaults when instances of this class are created
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||