de.hs_rm.cs.lecturenotes.client.module.annotation
Class AnnotationModuleComposite

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.annotation.AnnotationModuleComposite
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<AnnotationModuleModel>, IModuleComposite<AnnotationModuleModel>

public final class AnnotationModuleComposite
extends com.google.gwt.user.client.ui.Composite
implements IModuleComposite<AnnotationModuleModel>

Represents the Annotation in a user interface list.

Version:
$LastChangedRevision: 313 $
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 java.lang.String ANNOTATIONPANEL_ICONHTML_ANNOTATION_FREE
          Icon Html Image Code for Freetext Annotation in right annotation panel.
static java.lang.String ANNOTATIONPANEL_ICONHTML_ANNOTATION_QUESTION
          Icon Html Image Code for Question Annotation in right annotation panel.
static java.lang.String ANNOTATIONPANEL_ICONHTML_ANNOTATION_RESPONSE
          Icon Html Image Code for Response Annotation in right annotation panel.
static java.lang.String ANNOTATIONPANEL_ICONHTML_PARANODE
          Icon Html Image Code for Paragraph Node in right annotation panel.
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
AnnotationModuleComposite()
          Default Constructor.
 
Method Summary
 void afterDataTransmissionFailure(java.lang.Throwable caught)
          Event callback triggered after data transmission failure.
 void afterDataTransmissionSuccess()
          Event callback triggered after data transmission success.
 void clearView()
          Clears the view.
 void fillByParagraph(Paragraph para, com.google.gwt.user.client.ui.Widget panel, java.util.List<Annotation> annotations, int currentTableRow, java.lang.String newPosition)
          Fills annotations by Paragraph object.
 com.google.gwt.user.client.ui.Composite getComposite()
          Will return the GWT Composite view.
 com.google.gwt.user.client.ui.FlexTable getFlexTable()
          Will return the FlexTable object.
 AnnotationModuleModel getFormModel()
          Will return the form model.
 com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Long> getNumbersResponsesForAnnotationCallback(com.google.gwt.user.client.ui.TreeItem item)
          Will return the AsyncCallback to retrieve the numbers of responses to an Annotation that was inserted into the sidebar tree.
 void onDataTransmission()
          Event callback triggered on data transmission.
 void onUpdateModelFromView()
          Event callback meant to be called if an update of the model from the view components shall occur.
 void onUpdateUI()
          Updates the user interface.
 void onUpdateViewFromModel()
          Event callback meant to be called if an update of the view components from the model shall occur.
 void setFormModel(AnnotationModuleModel model)
          Sets the model.
 
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

ANNOTATIONPANEL_ICONHTML_PARANODE

public static final java.lang.String ANNOTATIONPANEL_ICONHTML_PARANODE
Icon Html Image Code for Paragraph Node in right annotation panel.


ANNOTATIONPANEL_ICONHTML_ANNOTATION_QUESTION

public static final java.lang.String ANNOTATIONPANEL_ICONHTML_ANNOTATION_QUESTION
Icon Html Image Code for Question Annotation in right annotation panel.


ANNOTATIONPANEL_ICONHTML_ANNOTATION_FREE

public static final java.lang.String ANNOTATIONPANEL_ICONHTML_ANNOTATION_FREE
Icon Html Image Code for Freetext Annotation in right annotation panel.


ANNOTATIONPANEL_ICONHTML_ANNOTATION_RESPONSE

public static final java.lang.String ANNOTATIONPANEL_ICONHTML_ANNOTATION_RESPONSE
Icon Html Image Code for Response Annotation in right annotation panel.

Constructor Detail

AnnotationModuleComposite

public AnnotationModuleComposite()
Default Constructor.

Method Detail

onUpdateUI

public void onUpdateUI()
Updates the user interface.


clearView

public void clearView()
Clears the view.


getFlexTable

public com.google.gwt.user.client.ui.FlexTable getFlexTable()
Will return the FlexTable object.

Returns:
FlexTable

onDataTransmission

public void onDataTransmission()
Description copied from interface: IModuleComposite
Event callback triggered on data transmission.

Specified by:
onDataTransmission in interface IModuleComposite<AnnotationModuleModel>

afterDataTransmissionSuccess

public void afterDataTransmissionSuccess()
Description copied from interface: IModuleComposite
Event callback triggered after data transmission success.

Specified by:
afterDataTransmissionSuccess in interface IModuleComposite<AnnotationModuleModel>

afterDataTransmissionFailure

public void afterDataTransmissionFailure(java.lang.Throwable caught)
Description copied from interface: IModuleComposite
Event callback triggered after data transmission failure.

Specified by:
afterDataTransmissionFailure in interface IModuleComposite<AnnotationModuleModel>
Parameters:
caught - Throwable

getComposite

public com.google.gwt.user.client.ui.Composite getComposite()
Description copied from interface: IModuleComposite
Will return the GWT Composite view.

Specified by:
getComposite in interface IModuleComposite<AnnotationModuleModel>
Returns:
Composite

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<AnnotationModuleModel>

fillByParagraph

public void fillByParagraph(Paragraph para,
                            com.google.gwt.user.client.ui.Widget panel,
                            java.util.List<Annotation> annotations,
                            int currentTableRow,
                            java.lang.String newPosition)
Fills annotations by Paragraph object.

Parameters:
para - Paragraph
panel - Widget
annotations - List of Annotation
currentTableRow - int
newPosition - String

getNumbersResponsesForAnnotationCallback

public com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Long> getNumbersResponsesForAnnotationCallback(com.google.gwt.user.client.ui.TreeItem item)
Will return the AsyncCallback to retrieve the numbers of responses to an Annotation that was inserted into the sidebar tree.

Parameters:
item - TreeItem
Returns:
AsyncCallback of Long

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<AnnotationModuleModel>

setFormModel

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

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

getFormModel

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

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