de.hs_rm.cs.lecturenotes.client.module.whatsnew
Class WhatsNewEntryComposite

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.Composite
              extended by de.hs_rm.cs.lecturenotes.client.module.whatsnew.WhatsNewEntryComposite
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.HasVisibility, com.google.gwt.user.client.ui.IsRenderable, com.google.gwt.user.client.ui.IsWidget, IForm<WhatsNewEntryModel>

public final class WhatsNewEntryComposite
extends com.google.gwt.user.client.ui.Composite
implements IForm<WhatsNewEntryModel>

Shows a single Annotation entry.

Version:
$LastChangedRevision: 262 $
Author:
Enrico Homann

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
static boolean EDIT_MODE
          Policy specific Edit Mode.
static int TAB_SELECTIONINDEX_ANNOTATIONDETAILS
          Tab Selection Annotation Details.
static int TAB_SELECTIONINDEX_ANNOTATIONRESPONSES
          Tab Selection Annotation Responses (Children).
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
WhatsNewEntryComposite(WhatsNewModuleComposite oParentComposite)
          Constructor.
 
Method Summary
 void enableOwnershipActions(boolean bEnable)
          Enables or disables action components for editing.
 void fetchResponses()
          Triggers the download of the response annotations to the current Annotation from the server.
 WhatsNewEntryModel getFormModel()
          Will return the form model.
 WhatsNewModuleComposite getParentComposite()
          Will return the parent Composite.
 com.google.gwt.user.client.rpc.AsyncCallback<ResponseStatusEnum> getRemoveCallback(boolean reloadAnnotationList)
          Will return the AsyncCallback for the remove of an Annotation.
 com.google.gwt.user.client.ui.Widget getResponsePanel(Annotation currentAnnotation)
          Will return a Widget for a response annotation.
 ResponsePanelComposite getResponsePanelComposite()
          Will return the response panel Composite.
 com.google.gwt.user.client.rpc.AsyncCallback<java.util.List<Annotation>> getResponsesCallback()
          Will return the AsyncCallback for the Annotation response download.
 com.google.gwt.user.client.rpc.AsyncCallback<ResponseStatusEnum> getSavePositionCallback(boolean reloadAnnotationList)
          Will return the AsyncCallback to save the position of an Annotation.
 java.lang.String getStatusHTML(Annotation annotation, java.lang.String templ)
          Will return the status message representation for a Annotation annotation.
 void onButtonRemove()
          Event callback triggered when user hits the button "remove".
 void onButtonSavePosition()
          Event callback triggered when the user hits the save position button.
 void onUpdateModelFromView()
          Event callback meant to be called if an update of the model from the view components shall occur.
 void onUpdateViewFromModel()
          Event callback meant to be called if an update of the view components from the model shall occur.
 void setFormModel(WhatsNewEntryModel model)
          Sets the model.
 void setParentComposite(WhatsNewModuleComposite oParentComposite)
          Sets te parent Composite.
 
Methods inherited from class com.google.gwt.user.client.ui.Composite
claimElement, initializeClaimedElement, isAttached, onBrowserEvent, render, render
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, fireEvent, getLayoutData, getParent, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, isVisible, isVisible, removeStyleDependentName, removeStyleName, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EDIT_MODE

public static boolean EDIT_MODE
Policy specific Edit Mode.


TAB_SELECTIONINDEX_ANNOTATIONDETAILS

public static final int TAB_SELECTIONINDEX_ANNOTATIONDETAILS
Tab Selection Annotation Details.

See Also:
Constant Field Values

TAB_SELECTIONINDEX_ANNOTATIONRESPONSES

public static final int TAB_SELECTIONINDEX_ANNOTATIONRESPONSES
Tab Selection Annotation Responses (Children).

See Also:
Constant Field Values
Constructor Detail

WhatsNewEntryComposite

public WhatsNewEntryComposite(WhatsNewModuleComposite oParentComposite)
Constructor.

Parameters:
oParentComposite - WhatsNewModuleComposite
Method Detail

onButtonSavePosition

public void onButtonSavePosition()
Event callback triggered when the user hits the save position button.


getSavePositionCallback

public com.google.gwt.user.client.rpc.AsyncCallback<ResponseStatusEnum> getSavePositionCallback(boolean reloadAnnotationList)
Will return the AsyncCallback to save the position of an Annotation. boolean reloadAnnotationList indicates whether to reload the annotation list after success or not.

Parameters:
reloadAnnotationList - boolean
Returns:
AsyncCallback of ResponseStatusEnum.

fetchResponses

public void fetchResponses()
Triggers the download of the response annotations to the current Annotation from the server.


getParentComposite

public WhatsNewModuleComposite getParentComposite()
Will return the parent Composite.

Returns:
WhatsNewModuleComposite

setParentComposite

public void setParentComposite(WhatsNewModuleComposite oParentComposite)
Sets te parent Composite.

Parameters:
oParentComposite - WhatsNewModuleComposite

getResponsesCallback

public com.google.gwt.user.client.rpc.AsyncCallback<java.util.List<Annotation>> getResponsesCallback()
Will return the AsyncCallback for the Annotation response download.

Returns:
AsyncCallback of List of Annotation

getRemoveCallback

public com.google.gwt.user.client.rpc.AsyncCallback<ResponseStatusEnum> getRemoveCallback(boolean reloadAnnotationList)
Will return the AsyncCallback for the remove of an Annotation.

Parameters:
reloadAnnotationList - boolean, indicated whether the Annotation shall reload after processing or not
Returns:
AsnycCallback of ResponseStatusEnum

getResponsePanel

public com.google.gwt.user.client.ui.Widget getResponsePanel(Annotation currentAnnotation)
Will return a Widget for a response annotation.

Parameters:
currentAnnotation - Annotation
Returns:
Widget

getResponsePanelComposite

public ResponsePanelComposite getResponsePanelComposite()
Will return the response panel Composite.

Returns:
ResponsePanelComposite

getStatusHTML

public java.lang.String getStatusHTML(Annotation annotation,
                                      java.lang.String templ)
Will return the status message representation for a Annotation annotation.

Parameters:
annotation - Annotation
templ - String
Returns:
String

enableOwnershipActions

public void enableOwnershipActions(boolean bEnable)
Enables or disables action components for editing.

Parameters:
bEnable - boolean

onButtonRemove

public void onButtonRemove()
Event callback triggered when user hits the button "remove".


onUpdateViewFromModel

public void onUpdateViewFromModel()
Description copied from interface: IForm
Event callback meant to be called if an update of the view components from the model shall occur.

Specified by:
onUpdateViewFromModel in interface IForm<WhatsNewEntryModel>

onUpdateModelFromView

public void onUpdateModelFromView()
Description copied from interface: IForm
Event callback meant to be called if an update of the model from the view components shall occur.

Specified by:
onUpdateModelFromView in interface IForm<WhatsNewEntryModel>

setFormModel

public void setFormModel(WhatsNewEntryModel model)
Description copied from interface: IForm
Sets the model.

Specified by:
setFormModel in interface IForm<WhatsNewEntryModel>
Parameters:
model - T

getFormModel

public WhatsNewEntryModel getFormModel()
Description copied from interface: IForm
Will return the form model.

Specified by:
getFormModel in interface IForm<WhatsNewEntryModel>
Returns:
T