org.cafesip.gwtcomp.client.ui
Class DraggableLabel
java.lang.Object
com.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
- All Implemented Interfaces:
- HasAllMouseHandlers, HasClickHandlers, HasMouseDownHandlers, HasMouseMoveHandlers, HasMouseOutHandlers, HasMouseOverHandlers, HasMouseUpHandlers, HasMouseWheelHandlers, HasHandlers, HasDirection, EventListener, HasHorizontalAlignment, HasHTML, HasText, HasWordWrap, SourcesClickEvents, SourcesMouseEvents
public class DraggableLabel
- extends HTML
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>
CSS Style Rules:
- .gwtcomp-DraggableLabel { } - style for the label
Screen-Shots:
- Author:
- Amit Chatterjee
| Methods inherited from class com.google.gwt.user.client.ui.Label |
addClickHandler, addClickListener, addMouseDownHandler, addMouseListener, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseUpHandler, addMouseWheelHandler, addMouseWheelListener, getDirection, getHorizontalAlignment, getText, getWordWrap, removeClickListener, removeMouseListener, removeMouseWheelListener, setDirection, setHorizontalAlignment, setText, setWordWrap |
| Methods inherited from class com.google.gwt.user.client.ui.Widget |
addDomHandler, addHandler, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, removeFromParent, setLayoutData, sinkEvents |
| 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, toString, unsinkEvents |
DraggableLabel
public DraggableLabel(String imageUrl,
String name,
String id,
String clazz)
- A constructor for this class that displays an icon and a text label.
- Parameters:
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.
DraggableLabel
public DraggableLabel(String name,
String id,
String clazz)
- A constructor for this class with just the text label (no icon).
- Parameters:
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.
onLoad
protected void onLoad()
- Overrides:
onLoad in class Widget
onUnload
protected void onUnload()
- Overrides:
onUnload in class Widget
getImageUrl
public String getImageUrl()
- Returns:
- Returns the imageUrl.
Copyright © 2010 Cafesip.org. All Rights Reserved.