public class DecoratedListItem extends ListItem
new DecoratedListItem(resources.gear3(), "Command Panel", "Sub Label ");
ListItem.ShowArrowcom.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled| Modifier and Type | Field and Description |
|---|---|
protected com.google.gwt.user.client.ui.Image |
img |
protected HorizontalPanel |
mainPanel |
protected com.google.gwt.user.client.ui.Label |
subtitleLabel |
protected com.google.gwt.user.client.ui.Label |
titleLabel |
protected Object |
userObject |
protected VerticalPanel |
vPanel |
myDisabled, myShowArrow| Constructor and Description |
|---|
DecoratedListItem()
Default constructor.
|
DecoratedListItem(com.google.gwt.resources.client.ImageResource image,
int width,
int height,
String title,
String subtitle)
Default constructor.
|
DecoratedListItem(com.google.gwt.resources.client.ImageResource image,
String title,
String subtitle)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addImage(com.google.gwt.resources.client.ImageResource image)
Sets an image.
|
com.google.gwt.event.shared.HandlerRegistration |
addImageClickHandler(com.google.gwt.event.dom.client.ClickHandler handler)
Register a handler which processes clicks on the embedded image.
|
void |
addLine(String newLine)
Adds a new line to the list item in the style of the subtitle.
|
void |
addLine(String newLine,
String color)
Adds a new line to the list item in the style of the subtitle and a given color.
|
com.google.gwt.user.client.ui.Image |
getImage() |
HorizontalPanel |
getMainPanel() |
String |
getSubtitle() |
com.google.gwt.user.client.ui.Label |
getSubtitleLabel() |
String |
getTitle() |
com.google.gwt.user.client.ui.Label |
getTitleLabel() |
Object |
getUserObject() |
void |
setDisabled(boolean disabled)
Disabled/enables the widget.
|
void |
setImage(com.google.gwt.resources.client.ImageResource image)
Sets an image.
|
void |
setSubtitle(String subtitle)
Sets the subtitle.
|
void |
setTitle(String title)
Sets an title.
|
void |
setUserObject(Object userObject) |
addClickHanlder, getArrow, getDisabled, setShowArrowadd, add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, remove, removeadd, adopt, doAttachChildren, doDetachChildren, orphan, removeaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEventsaddStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, setVisible, setWidth, sinkBitlessEvent, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitprotected final com.google.gwt.user.client.ui.Image img
protected final com.google.gwt.user.client.ui.Label titleLabel
protected final com.google.gwt.user.client.ui.Label subtitleLabel
protected final HorizontalPanel mainPanel
protected final VerticalPanel vPanel
protected Object userObject
public DecoratedListItem()
@UiConstructor
public DecoratedListItem(com.google.gwt.resources.client.ImageResource image,
String title,
String subtitle)
image - image od the text boxtitle - titlesubtitle - subtitlepublic Object getUserObject()
public void setUserObject(Object userObject)
public void setDisabled(boolean disabled)
setDisabled in class ListItemdisabled - true if disabled.public void setImage(com.google.gwt.resources.client.ImageResource image)
image - the imagepublic void addImage(com.google.gwt.resources.client.ImageResource image)
image - the imagepublic void setTitle(String title)
setTitle in class com.google.gwt.user.client.ui.UIObjecttitle - the titlepublic String getTitle()
getTitle in class com.google.gwt.user.client.ui.UIObjectpublic void setSubtitle(String subtitle)
subtitle - subtitlepublic String getSubtitle()
public com.google.gwt.user.client.ui.Label getTitleLabel()
public com.google.gwt.user.client.ui.Label getSubtitleLabel()
public com.google.gwt.user.client.ui.Image getImage()
public HorizontalPanel getMainPanel()
public com.google.gwt.event.shared.HandlerRegistration addImageClickHandler(com.google.gwt.event.dom.client.ClickHandler handler)
handler - the handlerpublic void addLine(String newLine)
newLine - .Copyright © 2011–2015 SWM. All rights reserved.