|
|||||||||
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.desktop.client.Shortcut
public class Shortcut
A selectable icon and text added to the desktop. Each shortcut requires an id that has matching css styles for the icon.
<code> Shortcut s2 = new Shortcut(); s2.setText("Accordion Window"); s2.setId("acc-win-shortcut"); #acc-win-shortcut img { width: 48px; height: 48px; background-image: url(../images/im48x48.png); } </code>
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.extjs.gxt.ui.client.widget.Component |
---|
afterRender, attachables, baseStyle, disabled, disabledStyle, disableTextSelection, dummy, focusable, hidden, mask, maskMessage, maskMessageStyleName, monitorWindowResize, rendered, resizeHandler, setElementRender, stateId, swallowEvents, toolTip, windowResizeDelay, windowResizeTask |
Fields inherited from class com.google.gwt.user.client.ui.UIObject |
---|
DEBUG_ID_PREFIX |
Constructor Summary | |
---|---|
Shortcut()
Creates a new shortcut. |
|
Shortcut(java.lang.String id,
java.lang.String text)
Creates a new shortcut. |
Method Summary | |
---|---|
void |
addSelectionListener(SelectionListener<? extends ComponentEvent> listener)
Adds a selection listener. |
com.google.gwt.user.client.ui.AbstractImagePrototype |
getIcon()
Returns the icon. |
java.lang.String |
getText()
Returns the shortcuts text. |
protected void |
onClick(ComponentEvent ce)
|
void |
onComponentEvent(ComponentEvent ce)
Any events a component receives will be forwarded to this method. |
protected void |
onRender(com.google.gwt.user.client.Element target,
int index)
Subclasses must override and ensure setElement is called for lazy rendered components. |
void |
removeSelectionListener(SelectionListener<? extends ComponentEvent> listener)
Removes a previously added listener. |
void |
setIcon(com.google.gwt.user.client.ui.AbstractImagePrototype icon)
Sets the icon. |
void |
setIconStyle(java.lang.String icon)
Sets the icon style. |
void |
setText(java.lang.String text)
Sets the shortcuts text. |
Methods inherited from class com.google.gwt.user.client.ui.Widget |
---|
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onUnload, setLayoutData |
Methods inherited from class com.google.gwt.user.client.ui.UIObject |
---|
addStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, removeStyleDependentName, setElement, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent, unsinkEvents |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Shortcut()
public Shortcut(java.lang.String id, java.lang.String text)
id
- the shortcut idtext
- the shortcut textMethod Detail |
---|
public void addSelectionListener(SelectionListener<? extends ComponentEvent> listener)
listener
- the listener to addpublic com.google.gwt.user.client.ui.AbstractImagePrototype getIcon()
IconSupport
getIcon
in interface IconSupport
public java.lang.String getText()
public void onComponentEvent(ComponentEvent ce)
Component
Component.onBrowserEvent(com.google.gwt.user.client.Event)
method
should not be overridden or modified.
onComponentEvent
in class Component
ce
- the base eventpublic void removeSelectionListener(SelectionListener<? extends ComponentEvent> listener)
listener
- the listener to be removedpublic void setIcon(com.google.gwt.user.client.ui.AbstractImagePrototype icon)
IconSupport
setIcon
in interface IconSupport
icon
- the iconpublic void setIconStyle(java.lang.String icon)
IconSupport
setIconStyle
in interface IconSupport
icon
- a CSS style namepublic void setText(java.lang.String text)
text
- the textprotected void onClick(ComponentEvent ce)
protected void onRender(com.google.gwt.user.client.Element target, int index)
Component
onRender
in class Component
target
- the target elementindex
- the insert location
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |