com.allen_sauer.gwt.dnd.demo.client.example
Class Example

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.google.gwt.user.client.ui.Panel
              extended by com.google.gwt.user.client.ui.SimplePanel
                  extended by com.allen_sauer.gwt.dnd.demo.client.example.Example
All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.AcceptsOneWidget, com.google.gwt.user.client.ui.HasOneWidget, com.google.gwt.user.client.ui.HasVisibility, com.google.gwt.user.client.ui.HasWidgets, com.google.gwt.user.client.ui.HasWidgets.ForIsWidget, com.google.gwt.user.client.ui.IsWidget, java.lang.Iterable<com.google.gwt.user.client.ui.Widget>
Direct Known Subclasses:
AbsolutePositionExample, BinExample, DragHandleExample, DualListExample, FlexTableRowExample, FlowPanelExample, GridConstrainedExample, InsertPanelExample, MatryoshkaExample, PaletteExample, PuzzleExample, ResetCacheExample, WindowExample

public abstract class Example
extends com.google.gwt.user.client.ui.SimplePanel

Class representing a single drag-and-drop example.


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.HasWidgets
com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
 
Field Summary
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
Example()
          Constructor for examples which create their own drag controller.
Example(DragController dragController)
          Constructor for examples which utilize the common drag controller.
 
Method Summary
protected  com.google.gwt.user.client.ui.Widget createDraggable()
          Convenience method to create a default draggable widget.
abstract  java.lang.String getDescription()
          Get a brief description of this example.
 DragController getDragController()
          Get our DragController.
 java.lang.String getHistoryToken()
           
abstract  java.lang.Class<?>[] getInvolvedClasses()
          Return the classes involved in this example.
protected  void onInitialLoad()
          Called when onLoad() is called for the first time.
protected  void onLoad()
          Calls onInitialLoad() when called for the first time.
 
Methods inherited from class com.google.gwt.user.client.ui.SimplePanel
add, getContainerElement, getWidget, iterator, remove, setWidget, setWidget
 
Methods inherited from class com.google.gwt.user.client.ui.Panel
add, adopt, adopt, clear, disown, doAttachChildren, doDetachChildren, orphan, remove
 
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, onAttach, onBrowserEvent, onDetach, onUnload, 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, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Example

public Example()
Constructor for examples which create their own drag controller.


Example

public Example(DragController dragController)
Constructor for examples which utilize the common drag controller.

Parameters:
dragController - the shared drag controller
Method Detail

getDescription

public abstract java.lang.String getDescription()
Get a brief description of this example.

Returns:
the description

getDragController

public DragController getDragController()
Get our DragController.

Returns:
the drag controller.

getHistoryToken

public java.lang.String getHistoryToken()

getInvolvedClasses

public abstract java.lang.Class<?>[] getInvolvedClasses()
Return the classes involved in this example.

Returns:
an array of involved classes

createDraggable

protected com.google.gwt.user.client.ui.Widget createDraggable()
Convenience method to create a default draggable widget. The widget is automatically made draggable by calling DragController.makeDraggable(Widget).

Returns:
a new draggable widget

onInitialLoad

protected void onInitialLoad()
Called when onLoad() is called for the first time.


onLoad

protected void onLoad()
Calls onInitialLoad() when called for the first time.

Overrides:
onLoad in class com.google.gwt.user.client.ui.Widget