de.hs_rm.cs.lecturenotes.client.module.lecture
Class LectureDetailsPopupPanel

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.google.gwt.user.client.ui.PopupPanel
                      extended by de.hs_rm.cs.lecturenotes.client.module.lecture.LectureDetailsPopupPanel
All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.logical.shared.HasCloseHandlers<com.google.gwt.user.client.ui.PopupPanel>, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.EventPreview, com.google.gwt.user.client.ui.AcceptsOneWidget, com.google.gwt.user.client.ui.HasAnimation, 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, com.google.gwt.user.client.ui.SourcesPopupEvents, IForm<Lecture>, java.lang.Iterable<com.google.gwt.user.client.ui.Widget>

public final class LectureDetailsPopupPanel
extends com.google.gwt.user.client.ui.PopupPanel
implements IForm<Lecture>

Details Panel for a Lecture. Uses the globel Lecture of AppClientModel.

Version:
$LastChangedRevision: 237 $
Author:
Enrico Homann

Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.PopupPanel
com.google.gwt.user.client.ui.PopupPanel.PositionCallback
 
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
static boolean STATS_TOPANNOTATED_INCLUDERESPONSES
          Indicates whether to include the responses to an annotation with the top calculation.
static int STATS_TOPANNOTATED_LIMIT
          SQL Limit value for top annotated paragraphs of the lecture.
static boolean STATS_TOPANNOTATED_PREFETCHCONTENTS
          Indicates whether the top annotated paragraph list content's shall be prefetched for faster navigation after selection.
static SQLSortDirectionEnum STATS_TOPANNOTATED_SORTDIRECTION
          Initial SQL Sort direction for the top annotated paragraphs fetch.
static int TABSELECTION_STATS_TOPTENANNOTATED
          Tab selection index for the top annotated paragraphs.
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
LectureDetailsPopupPanel()
          Default constructor.
 
Method Summary
 void clearInputFields()
          Clears the user interface input fields.
 com.google.gwt.user.cellview.client.CellTable<ParagraphStats> createParagraphStatsCellTable()
          Creates a CellTable of ParagraphStats.
 void enableButtons(boolean bEnable)
          Enables or disables user interface buttons.
 void enableInputFields(boolean bEnable)
          Enables or disables user interface input fields.
 Lecture getFormModel()
          Will return the form model.
static LectureDetailsPopupPanel getInstance()
          Will return the singleton.
 com.google.gwt.user.client.rpc.AsyncCallback<ResponseStatusEnum> getLectureDeleteCallback()
          Callback for delete lecture RPC.
 com.google.gwt.user.client.rpc.AsyncCallback<ResponseStatusEnum> getLectureUpdateCallback()
          Callback for update lecture RPC.
 com.google.gwt.user.client.rpc.AsyncCallback<java.util.List<ParagraphStats>> getTopAnnotatedParaCallback(com.google.gwt.user.cellview.client.CellTable<ParagraphStats> table)
          Will return the AsyncCallback to receive the top annotated paragraphs.
 void onButtonDelete()
          Event callback that gets triggered if user his the delete button.
 void onButtonSave()
          Event callback that gets triggered if user his the save 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(Lecture model)
          Sets the model.
 
Methods inherited from class com.google.gwt.user.client.ui.PopupPanel
addAutoHidePartner, addCloseHandler, addPopupListener, center, getGlassStyleName, getOffsetHeight, getOffsetWidth, getPopupLeft, getPopupTop, getTitle, hide, hide, isAnimationEnabled, isAutoHideEnabled, isAutoHideOnHistoryEventsEnabled, isGlassEnabled, isModal, isPreviewingAllNativeEvents, isShowing, isVisible, onEventPreview, onKeyDownPreview, onKeyPressPreview, onKeyUpPreview, removeAutoHidePartner, removePopupListener, setAnimationEnabled, setAutoHideEnabled, setAutoHideOnHistoryEventsEnabled, setGlassEnabled, setGlassStyleName, setHeight, setModal, setPopupPosition, setPopupPositionAndShow, setPreviewingAllNativeEvents, setTitle, setVisible, setWidget, setWidth, show, showRelativeTo
 
Methods inherited from class com.google.gwt.user.client.ui.SimplePanel
add, getWidget, iterator, remove, setWidget
 
Methods inherited from class com.google.gwt.user.client.ui.Panel
add, clear, remove
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, fireEvent, getLayoutData, getParent, isAttached, onBrowserEvent, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getStyleName, getStylePrimaryName, isVisible, removeStyleDependentName, removeStyleName, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStylePrimaryName, setVisible, sinkBitlessEvent, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 

Field Detail

TABSELECTION_STATS_TOPTENANNOTATED

public static final int TABSELECTION_STATS_TOPTENANNOTATED
Tab selection index for the top annotated paragraphs.

See Also:
Constant Field Values

STATS_TOPANNOTATED_LIMIT

public static final int STATS_TOPANNOTATED_LIMIT
SQL Limit value for top annotated paragraphs of the lecture.

See Also:
Constant Field Values

STATS_TOPANNOTATED_INCLUDERESPONSES

public static final boolean STATS_TOPANNOTATED_INCLUDERESPONSES
Indicates whether to include the responses to an annotation with the top calculation.

See Also:
Constant Field Values

STATS_TOPANNOTATED_PREFETCHCONTENTS

public static final boolean STATS_TOPANNOTATED_PREFETCHCONTENTS
Indicates whether the top annotated paragraph list content's shall be prefetched for faster navigation after selection.

See Also:
Constant Field Values

STATS_TOPANNOTATED_SORTDIRECTION

public static final SQLSortDirectionEnum STATS_TOPANNOTATED_SORTDIRECTION
Initial SQL Sort direction for the top annotated paragraphs fetch.

Constructor Detail

LectureDetailsPopupPanel

public LectureDetailsPopupPanel()
Default constructor.

Method Detail

getTopAnnotatedParaCallback

public com.google.gwt.user.client.rpc.AsyncCallback<java.util.List<ParagraphStats>> getTopAnnotatedParaCallback(com.google.gwt.user.cellview.client.CellTable<ParagraphStats> table)
Will return the AsyncCallback to receive the top annotated paragraphs. This callback makes an entry into table.

Parameters:
table - CellTable
Returns:
AsnyCallback of List of ParagraphStats

createParagraphStatsCellTable

public com.google.gwt.user.cellview.client.CellTable<ParagraphStats> createParagraphStatsCellTable()
Creates a CellTable of ParagraphStats.

Returns:
CellTable of ParagraphStats

getInstance

public static LectureDetailsPopupPanel getInstance()
Will return the singleton.

Returns:
LectureDetailsPopupPanel

onButtonSave

public void onButtonSave()
Event callback that gets triggered if user his the save button.


onButtonDelete

public void onButtonDelete()
Event callback that gets triggered if user his the delete button.


getLectureDeleteCallback

public com.google.gwt.user.client.rpc.AsyncCallback<ResponseStatusEnum> getLectureDeleteCallback()
Callback for delete lecture RPC.

Returns:
AsyncCallback of ResponseStatusEnum

getLectureUpdateCallback

public com.google.gwt.user.client.rpc.AsyncCallback<ResponseStatusEnum> getLectureUpdateCallback()
Callback for update lecture RPC.

Returns:
AsyncCallback of ResponseStatusEnum

setFormModel

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

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

getFormModel

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

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

clearInputFields

public void clearInputFields()
Clears the user interface input fields.


enableInputFields

public void enableInputFields(boolean bEnable)
Enables or disables user interface input fields.

Parameters:
bEnable - boolean

enableButtons

public void enableButtons(boolean bEnable)
Enables or disables user interface buttons.

Parameters:
bEnable - boolean

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

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