de.hs_rm.cs.lecturenotes.client.module.filecard
Class FilecardViewerEditor

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.ComplexPanel
                  extended by com.google.gwt.user.client.ui.CellPanel
                      extended by com.google.gwt.user.client.ui.VerticalPanel
                          extended by de.hs_rm.cs.lecturenotes.client.core.presentation.ui.editor.AbstractParagraphViewerEditor
                              extended by de.hs_rm.cs.lecturenotes.client.module.filecard.FilecardViewerEditor
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.HasAlignment, com.google.gwt.user.client.ui.HasHorizontalAlignment, com.google.gwt.user.client.ui.HasVerticalAlignment, 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.IndexedPanel, com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget, com.google.gwt.user.client.ui.InsertPanel, com.google.gwt.user.client.ui.InsertPanel.ForIsWidget, com.google.gwt.user.client.ui.IsWidget, IParagraphViewerEditor, java.lang.Iterable<com.google.gwt.user.client.ui.Widget>

public final class FilecardViewerEditor
extends AbstractParagraphViewerEditor

ViewerEditor for entity Filecard.

Version:
$LastChangedRevision: 273 $
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
 
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasHorizontalAlignment
com.google.gwt.user.client.ui.HasHorizontalAlignment.AutoHorizontalAlignmentConstant, com.google.gwt.user.client.ui.HasHorizontalAlignment.HorizontalAlignmentConstant
 
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasVerticalAlignment
com.google.gwt.user.client.ui.HasVerticalAlignment.VerticalAlignmentConstant
 
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.InsertPanel
com.google.gwt.user.client.ui.InsertPanel.ForIsWidget
 
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets
com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
 
Field Summary
static int TAB_SELECTION_FILECARD_ACTIVATED
          Tab Index for activated filecards.
static int TAB_SELECTION_FILECARD_OWNERSHIP
          Tab Index for own filecards.
static int TAB_SELECTION_FILECARD_PENDING
          Tab Index for pending filecards.
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Fields inherited from interface com.google.gwt.user.client.ui.HasHorizontalAlignment
ALIGN_CENTER, ALIGN_DEFAULT, ALIGN_JUSTIFY, ALIGN_LEFT, ALIGN_LOCALE_END, ALIGN_LOCALE_START, ALIGN_RIGHT
 
Fields inherited from interface com.google.gwt.user.client.ui.HasVerticalAlignment
ALIGN_BOTTOM, ALIGN_MIDDLE, ALIGN_TOP
 
Constructor Summary
FilecardViewerEditor(Lecture oLecture, Paragraph oPararaph)
          Constructor.
 
Method Summary
 IEditPanelActionListener getActionListener(int currentTableRow, Paragraph para, java.lang.String newPosition, com.google.gwt.user.client.ui.HTML htmlParaView, com.google.gwt.user.client.ui.VerticalPanel panel, com.google.gwt.user.client.ui.FlexTable table, int tabSelection)
          Will return the action listener that handles the further actions after the user did a certain action in the panel, like deleting or saving.
 com.google.gwt.user.client.rpc.AsyncCallback<java.util.List<Filecard>> getActivatedFilecardCallback(int currentTableRow, Paragraph para, java.lang.String newPosition, com.google.gwt.user.client.ui.HTML htmlParaView, com.google.gwt.user.client.ui.VerticalPanel panel, com.google.gwt.user.client.ui.FlexTable table)
          Will return the AsyncCallback to receive activated filecards.
 com.google.gwt.user.client.rpc.AsyncCallback<ResponseStatusEnum> getCreateFilecardCallback(com.google.gwt.user.client.ui.TabPanel tabPanel)
          Will return the AsyncCallback to create a Filecard.
 Filecard getDefaultEmptyFilecard(Paragraph paragraph)
          Will return the default empty Exercise used for a new Exercise.
 com.google.gwt.user.client.rpc.AsyncCallback<java.util.List<Filecard>> getFilecardsPerParaPrintCallback(Paragraph paragraph)
          Will return the AsyncCallback for receiving the filecards per Paragraph.
 com.google.gwt.user.client.rpc.AsyncCallback<java.util.List<Filecard>> getGenericFilecardCallback(int currentTableRow, Paragraph para, java.lang.String newPosition, com.google.gwt.user.client.ui.HTML htmlParaView, com.google.gwt.user.client.ui.VerticalPanel panel, com.google.gwt.user.client.ui.FlexTable table, int tabSelection)
          Will return the common generic AsyncCallback to receive filecards.
 com.google.gwt.user.client.rpc.AsyncCallback<java.util.List<Filecard>> getOwnershipFilecardCallback(int currentTableRow, Paragraph para, java.lang.String newPosition, com.google.gwt.user.client.ui.HTML htmlParaView, com.google.gwt.user.client.ui.VerticalPanel panel, com.google.gwt.user.client.ui.FlexTable table)
          Will return the AsyncCallback to receive own filecards.
 com.google.gwt.user.client.ui.Widget getParagraphEditPanel(Paragraph para, java.lang.String position, com.google.gwt.user.client.ui.VerticalPanel parentPanel, com.google.gwt.user.client.ui.Widget paragraphMenu, com.google.gwt.user.client.ui.HTML htmlParaView)
          Will return the edit panel that is displayed for Paragraph para's contents in edit mode.
 com.google.gwt.user.client.ui.Widget getParagraphMenuPanel(Paragraph para)
          Will return a top menu panel that is displayed above the paragraph's contents.
 com.google.gwt.user.client.rpc.AsyncCallback<java.util.List<Filecard>> getPendingFilecardCallback(int currentTableRow, Paragraph para, java.lang.String newPosition, com.google.gwt.user.client.ui.HTML htmlParaView, com.google.gwt.user.client.ui.VerticalPanel panel, com.google.gwt.user.client.ui.FlexTable table)
          Will return the AsyncCallback to receive pending filecards.
 void onSelectionTabActivated(int currentTableRow, Paragraph para, java.lang.String newPosition, com.google.gwt.user.client.ui.HTML htmlParaView, com.google.gwt.user.client.ui.VerticalPanel panel, com.google.gwt.user.client.ui.FlexTable table)
          Event callback thats is called if the user changes the selection in the tab to activated filecards.
 void onSelectionTabOwnership(int currentTableRow, Paragraph para, java.lang.String newPosition, com.google.gwt.user.client.ui.HTML htmlParaView, com.google.gwt.user.client.ui.VerticalPanel panel, com.google.gwt.user.client.ui.FlexTable table)
          Event callback thats is called if the user changes the selection in the tab to own filecards.
 void onSelectionTabPending(int currentTableRow, Paragraph para, java.lang.String newPosition, com.google.gwt.user.client.ui.HTML htmlParaView, com.google.gwt.user.client.ui.VerticalPanel panel, com.google.gwt.user.client.ui.FlexTable table)
          Event callback thats is called if the user changes the selection in the tab to pending filecards.
 void showParagraph(int currentTableRow, Paragraph para, java.lang.String newPosition, com.google.gwt.user.client.ui.HTML htmlParaView, com.google.gwt.user.client.ui.VerticalPanel panel)
          Called to show the paragraph's contents.
 
Methods inherited from class de.hs_rm.cs.lecturenotes.client.core.presentation.ui.editor.AbstractParagraphViewerEditor
getFlexTable, getLecture, getParagraph, getScrollPanel, setLecture, setParagraph
 
Methods inherited from class com.google.gwt.user.client.ui.VerticalPanel
add, getHorizontalAlignment, getVerticalAlignment, insert, insert, remove, setHorizontalAlignment, setVerticalAlignment
 
Methods inherited from class com.google.gwt.user.client.ui.CellPanel
getSpacing, setBorderWidth, setCellHeight, setCellHeight, setCellHorizontalAlignment, setCellHorizontalAlignment, setCellVerticalAlignment, setCellVerticalAlignment, setCellWidth, setCellWidth, setSpacing
 
Methods inherited from class com.google.gwt.user.client.ui.ComplexPanel
getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, iterator, remove
 
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, 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
 
Methods inherited from interface com.google.gwt.user.client.ui.InsertPanel.ForIsWidget
add
 
Methods inherited from interface com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget
getWidgetIndex
 
Methods inherited from interface com.google.gwt.user.client.ui.IndexedPanel
getWidget, getWidgetCount, getWidgetIndex, remove
 

Field Detail

TAB_SELECTION_FILECARD_ACTIVATED

public static final int TAB_SELECTION_FILECARD_ACTIVATED
Tab Index for activated filecards.

See Also:
Constant Field Values

TAB_SELECTION_FILECARD_PENDING

public static final int TAB_SELECTION_FILECARD_PENDING
Tab Index for pending filecards.

See Also:
Constant Field Values

TAB_SELECTION_FILECARD_OWNERSHIP

public static final int TAB_SELECTION_FILECARD_OWNERSHIP
Tab Index for own filecards.

See Also:
Constant Field Values
Constructor Detail

FilecardViewerEditor

public FilecardViewerEditor(Lecture oLecture,
                            Paragraph oPararaph)
Constructor.

Parameters:
oLecture - Lecture
oPararaph - Paragraph
Method Detail

getParagraphMenuPanel

public com.google.gwt.user.client.ui.Widget getParagraphMenuPanel(Paragraph para)
Description copied from interface: IParagraphViewerEditor
Will return a top menu panel that is displayed above the paragraph's contents.

Parameters:
para - Paragraph
Returns:
Widget

getParagraphEditPanel

public com.google.gwt.user.client.ui.Widget getParagraphEditPanel(Paragraph para,
                                                                  java.lang.String position,
                                                                  com.google.gwt.user.client.ui.VerticalPanel parentPanel,
                                                                  com.google.gwt.user.client.ui.Widget paragraphMenu,
                                                                  com.google.gwt.user.client.ui.HTML htmlParaView)
Description copied from interface: IParagraphViewerEditor
Will return the edit panel that is displayed for Paragraph para's contents in edit mode.

Parameters:
para - Paragraph
position - String
parentPanel - VerticalPanel
paragraphMenu - Widget
htmlParaView - HTML
Returns:
Widget

showParagraph

public void showParagraph(int currentTableRow,
                          Paragraph para,
                          java.lang.String newPosition,
                          com.google.gwt.user.client.ui.HTML htmlParaView,
                          com.google.gwt.user.client.ui.VerticalPanel panel)
Description copied from interface: IParagraphViewerEditor
Called to show the paragraph's contents.

Parameters:
currentTableRow - int Position of the panel within the FlexTable
para - Paragraph
newPosition - String UI display position
htmlParaView - HTML the view widget of the contents
panel - VerticalPanel

getFilecardsPerParaPrintCallback

public com.google.gwt.user.client.rpc.AsyncCallback<java.util.List<Filecard>> getFilecardsPerParaPrintCallback(Paragraph paragraph)
Will return the AsyncCallback for receiving the filecards per Paragraph.

Parameters:
paragraph - Paragraph
Returns:
AsyncCallback

getCreateFilecardCallback

public com.google.gwt.user.client.rpc.AsyncCallback<ResponseStatusEnum> getCreateFilecardCallback(com.google.gwt.user.client.ui.TabPanel tabPanel)
Will return the AsyncCallback to create a Filecard.

Parameters:
tabPanel - TabPanel
Returns:
AsyncCallback

getDefaultEmptyFilecard

public Filecard getDefaultEmptyFilecard(Paragraph paragraph)
Will return the default empty Exercise used for a new Exercise.

Parameters:
paragraph - Paragraph
Returns:
Exercise

onSelectionTabActivated

public void onSelectionTabActivated(int currentTableRow,
                                    Paragraph para,
                                    java.lang.String newPosition,
                                    com.google.gwt.user.client.ui.HTML htmlParaView,
                                    com.google.gwt.user.client.ui.VerticalPanel panel,
                                    com.google.gwt.user.client.ui.FlexTable table)
Event callback thats is called if the user changes the selection in the tab to activated filecards.

Parameters:
currentTableRow - int Position in table
para - Paragraph
newPosition - String
htmlParaView - HTML
panel - VerticalPanel
table - FlexTable

onSelectionTabPending

public void onSelectionTabPending(int currentTableRow,
                                  Paragraph para,
                                  java.lang.String newPosition,
                                  com.google.gwt.user.client.ui.HTML htmlParaView,
                                  com.google.gwt.user.client.ui.VerticalPanel panel,
                                  com.google.gwt.user.client.ui.FlexTable table)
Event callback thats is called if the user changes the selection in the tab to pending filecards.

Parameters:
currentTableRow - int Position in table
para - Paragraph
newPosition - String
htmlParaView - HTML
panel - VerticalPanel
table - FlexTable

onSelectionTabOwnership

public void onSelectionTabOwnership(int currentTableRow,
                                    Paragraph para,
                                    java.lang.String newPosition,
                                    com.google.gwt.user.client.ui.HTML htmlParaView,
                                    com.google.gwt.user.client.ui.VerticalPanel panel,
                                    com.google.gwt.user.client.ui.FlexTable table)
Event callback thats is called if the user changes the selection in the tab to own filecards.

Parameters:
currentTableRow - int Position in table
para - Paragraph
newPosition - String
htmlParaView - HTML
panel - VerticalPanel
table - FlexTable

getGenericFilecardCallback

public com.google.gwt.user.client.rpc.AsyncCallback<java.util.List<Filecard>> getGenericFilecardCallback(int currentTableRow,
                                                                                                         Paragraph para,
                                                                                                         java.lang.String newPosition,
                                                                                                         com.google.gwt.user.client.ui.HTML htmlParaView,
                                                                                                         com.google.gwt.user.client.ui.VerticalPanel panel,
                                                                                                         com.google.gwt.user.client.ui.FlexTable table,
                                                                                                         int tabSelection)
Will return the common generic AsyncCallback to receive filecards. Where int tabSelection provides the information which tab (activated, pending, own) was selected.

Parameters:
currentTableRow - int Position in table
para - Paragraph
newPosition - String
htmlParaView - HTML
panel - VerticalPanel
table - FlexTable
tabSelection - int
Returns:
AsyncCallback

getActivatedFilecardCallback

public com.google.gwt.user.client.rpc.AsyncCallback<java.util.List<Filecard>> getActivatedFilecardCallback(int currentTableRow,
                                                                                                           Paragraph para,
                                                                                                           java.lang.String newPosition,
                                                                                                           com.google.gwt.user.client.ui.HTML htmlParaView,
                                                                                                           com.google.gwt.user.client.ui.VerticalPanel panel,
                                                                                                           com.google.gwt.user.client.ui.FlexTable table)
Will return the AsyncCallback to receive activated filecards.

Parameters:
currentTableRow - int Position in table
para - Paragraph
newPosition - String
htmlParaView - HTML
panel - VerticalPanel
table - FlexTable
Returns:
AsyncCallback

getPendingFilecardCallback

public com.google.gwt.user.client.rpc.AsyncCallback<java.util.List<Filecard>> getPendingFilecardCallback(int currentTableRow,
                                                                                                         Paragraph para,
                                                                                                         java.lang.String newPosition,
                                                                                                         com.google.gwt.user.client.ui.HTML htmlParaView,
                                                                                                         com.google.gwt.user.client.ui.VerticalPanel panel,
                                                                                                         com.google.gwt.user.client.ui.FlexTable table)
Will return the AsyncCallback to receive pending filecards.

Parameters:
currentTableRow - int Position in table
para - Paragraph
newPosition - String
htmlParaView - HTML
panel - VerticalPanel
table - FlexTable
Returns:
AsyncCallback

getOwnershipFilecardCallback

public com.google.gwt.user.client.rpc.AsyncCallback<java.util.List<Filecard>> getOwnershipFilecardCallback(int currentTableRow,
                                                                                                           Paragraph para,
                                                                                                           java.lang.String newPosition,
                                                                                                           com.google.gwt.user.client.ui.HTML htmlParaView,
                                                                                                           com.google.gwt.user.client.ui.VerticalPanel panel,
                                                                                                           com.google.gwt.user.client.ui.FlexTable table)
Will return the AsyncCallback to receive own filecards.

Parameters:
currentTableRow - int Position in table
para - Paragraph
newPosition - String
htmlParaView - HTML
panel - VerticalPanel
table - FlexTable
Returns:
AsyncCallback

getActionListener

public IEditPanelActionListener getActionListener(int currentTableRow,
                                                  Paragraph para,
                                                  java.lang.String newPosition,
                                                  com.google.gwt.user.client.ui.HTML htmlParaView,
                                                  com.google.gwt.user.client.ui.VerticalPanel panel,
                                                  com.google.gwt.user.client.ui.FlexTable table,
                                                  int tabSelection)
Will return the action listener that handles the further actions after the user did a certain action in the panel, like deleting or saving.

Parameters:
currentTableRow - int
para - Paragraph
newPosition - String
htmlParaView - HTML
panel - VerticalPanel
table - FlexTable
tabSelection - int
Returns:
IEditPanelActionListener