|
||||||||||
| 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.google.gwt.user.client.ui.Label
com.google.gwt.user.client.ui.HTML
org.cafesip.gwtcomp.client.ui.DraggableLabel
public class DraggableLabel
A label object that can be dragged and dropped into a
DroppableList. The label consists of a
name and optionally, an icon to the left of the name. This label can be
dragged by holding the mouse button down and by moving the pointer. The
object can be dropped into a DroppableList object.
The draggable/droppable classes use the scriptaculous javascript library for providing the functionality. Therefore, you must add the following segment to your application HTML file (see the GWTCompExamples.html for an example).
<script src="gwtcomp-scripts/scriptaculous/prototype.js" type="text/javascript"></script>
<script src="gwtcomp-scripts/scriptaculous/scriptaculous.js" type="text/javascript"></script>
<script src="gwtcomp-scripts/scriptaculous/dragdrop.js" type="text/javascript"></script>
Examples:
CSS Style Rules:
Screen-Shots:
| 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 |
| Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasHorizontalAlignment |
|---|
com.google.gwt.user.client.ui.HasHorizontalAlignment.HorizontalAlignmentConstant |
| Nested classes/interfaces inherited from interface com.google.gwt.i18n.client.HasDirection |
|---|
com.google.gwt.i18n.client.HasDirection.Direction |
| Field Summary |
|---|
| Fields inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
DEBUG_ID_PREFIX |
| Fields inherited from interface com.google.gwt.user.client.ui.HasHorizontalAlignment |
|---|
ALIGN_CENTER, ALIGN_DEFAULT, ALIGN_LEFT, ALIGN_RIGHT |
| Constructor Summary | |
|---|---|
DraggableLabel(java.lang.String name,
java.lang.String id,
java.lang.String clazz)
A constructor for this class with just the text label (no icon). |
|
DraggableLabel(java.lang.String imageUrl,
java.lang.String name,
java.lang.String id,
java.lang.String clazz)
A constructor for this class that displays an icon and a text label. |
|
| Method Summary | |
|---|---|
java.lang.String |
getImageUrl()
|
protected void |
onLoad()
|
protected void |
onUnload()
|
| Methods inherited from class com.google.gwt.user.client.ui.HTML |
|---|
getHTML, setHTML, wrap |
| Methods inherited from class com.google.gwt.user.client.ui.Label |
|---|
addClickListener, addMouseListener, addMouseWheelListener, getDirection, getHorizontalAlignment, getText, getWordWrap, onBrowserEvent, removeClickListener, removeMouseListener, removeMouseWheelListener, setDirection, setHorizontalAlignment, setText, setWordWrap |
| Methods inherited from class com.google.gwt.user.client.ui.Widget |
|---|
doAttachChildren, doDetachChildren, getParent, isAttached, onAttach, onDetach, removeFromParent |
| Methods inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkEvents, toString, unsinkEvents |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.google.gwt.user.client.ui.HasText |
|---|
getText, setText |
| Constructor Detail |
|---|
public DraggableLabel(java.lang.String imageUrl,
java.lang.String name,
java.lang.String id,
java.lang.String clazz)
imageUrl - The URL of the icon.name - The text of the label.id - The DOM id of this object. It must be unique. See the
description for
Draggable for details.clazz - The class value for this label. See the description for
Draggable for details.
public DraggableLabel(java.lang.String name,
java.lang.String id,
java.lang.String clazz)
name - The text of the label.id - The DOM id of this object. It must be unique. See the
description for
Draggable for details.clazz - The class value for this label. See the description for
Draggable for details.| Method Detail |
|---|
protected void onLoad()
onLoad in class com.google.gwt.user.client.ui.Widgetprotected void onUnload()
onUnload in class com.google.gwt.user.client.ui.Widgetpublic java.lang.String getImageUrl()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||