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

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.filecard.FilecardEditPanelComposite
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<Filecard>

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

Edit Panel for Filecard.

Version:
$LastChangedRevision: 242 $
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 int TABSELECTION_ANSWER
          Tab selection index: Answer.
static int TABSELECTION_QUESTION
          Tab selection index: Question.
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
FilecardEditPanelComposite(Paragraph oParagraph, Lecture oLecture)
          Constructor.
 
Method Summary
 void activateFilecard()
          Requests to activates the Filecard if the checkbox has changed.
 IEditPanelActionListener getActionListener()
          Will return the registered IEditPanelActionListener.
 com.google.gwt.user.client.rpc.AsyncCallback<ResponseStatusEnum> getActivateFilecardCallback()
          Will return the GWT-RPC callback for activating a Filecard.
 com.google.gwt.user.client.rpc.AsyncCallback<ResponseStatusEnum> getDeleteFilecardCallback()
          Will return the GWT-RPC callback for deleting a Filecard.
 com.google.gwt.user.client.ui.VerticalPanel getEditModeMenuPanel()
          Will return the panel for the edit mode.
 Filecard getFormModel()
          Will return the form model.
 Lecture getLecture()
          Will return the Lecture model part.
 Paragraph getParagraph()
          Will return the Paragraph model part.
 com.google.gwt.user.client.rpc.AsyncCallback<java.lang.String> getRenderAnswerCallback()
          Will return the GWT-RPC callback for rendering the answer of a Filecard.
 com.google.gwt.user.client.rpc.AsyncCallback<java.lang.String> getRenderQuestionCallback()
          Will return the GWT-RPC callback for rendering the question of a Filecard.
 com.google.gwt.user.client.rpc.AsyncCallback<ResponseStatusEnum> getSaveFilecardCallback()
          Will return the GWT-RPC callback for saving a Filecard.
 boolean isEditMode()
          Will return the boolean value whether component is in edit mode or not.
 void onButtonDelete()
          Event callback triggered if user hits button "delete".
 void onButtonEdit()
          Event callback triggered if user hits button "edit".
 void onButtonSaveChanges()
          Event callback triggered if user hits button "save".
 void onButtonUseMediaFileLink()
          Event callback if the user hits the useMediaFileLink button.
 void onCheckboxActivated(boolean activated)
          Event callback triggered if the "activated checkbox" value was changed.
 void onLoad()
           
 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 setActionListener(IEditPanelActionListener listener)
          Will register the IEditPanelActionListener.
 void setEditMode(boolean bEditMode)
          Sets the component's edit mode.
 void setFilecardPrintDimensions()
          Sets the dimensions of important container widgets for the Filecard to the print dimension.
 void setFormModel(Filecard 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

TABSELECTION_QUESTION

public static final int TABSELECTION_QUESTION
Tab selection index: Question.

See Also:
Constant Field Values

TABSELECTION_ANSWER

public static final int TABSELECTION_ANSWER
Tab selection index: Answer.

See Also:
Constant Field Values
Constructor Detail

FilecardEditPanelComposite

public FilecardEditPanelComposite(Paragraph oParagraph,
                                  Lecture oLecture)
Constructor.

Parameters:
oParagraph - Paragraph
oLecture - Lecture
Method Detail

onLoad

public void onLoad()
Overrides:
onLoad in class com.google.gwt.user.client.ui.Widget

setFilecardPrintDimensions

public void setFilecardPrintDimensions()
Sets the dimensions of important container widgets for the Filecard to the print dimension.


onCheckboxActivated

public void onCheckboxActivated(boolean activated)
Event callback triggered if the "activated checkbox" value was changed.

Parameters:
activated - boolean

onButtonUseMediaFileLink

public void onButtonUseMediaFileLink()
Event callback if the user hits the useMediaFileLink button.


onButtonEdit

public void onButtonEdit()
Event callback triggered if user hits button "edit".


onButtonDelete

public void onButtonDelete()
Event callback triggered if user hits button "delete".


onButtonSaveChanges

public void onButtonSaveChanges()
Event callback triggered if user hits button "save".


getActionListener

public IEditPanelActionListener getActionListener()
Will return the registered IEditPanelActionListener.

Returns:
IEditPanelActionListener

isEditMode

public boolean isEditMode()
Will return the boolean value whether component is in edit mode or not.

Returns:
boolean

setEditMode

public void setEditMode(boolean bEditMode)
Sets the component's edit mode.

Parameters:
bEditMode - boolean

setActionListener

public void setActionListener(IEditPanelActionListener listener)
Will register the IEditPanelActionListener.

Parameters:
listener - IEditPanelActionListener

getParagraph

public Paragraph getParagraph()
Will return the Paragraph model part.

Returns:
Paragraph.

getLecture

public Lecture getLecture()
Will return the Lecture model part.

Returns:
Lecture.

setFormModel

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

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

getFormModel

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

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

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

getEditModeMenuPanel

public com.google.gwt.user.client.ui.VerticalPanel getEditModeMenuPanel()
Will return the panel for the edit mode.

Returns:
VerticalPanel

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

activateFilecard

public void activateFilecard()
Requests to activates the Filecard if the checkbox has changed.


getActivateFilecardCallback

public com.google.gwt.user.client.rpc.AsyncCallback<ResponseStatusEnum> getActivateFilecardCallback()
Will return the GWT-RPC callback for activating a Filecard.

Returns:
AsyncCallback of ResponseStatusEnum

getSaveFilecardCallback

public com.google.gwt.user.client.rpc.AsyncCallback<ResponseStatusEnum> getSaveFilecardCallback()
Will return the GWT-RPC callback for saving a Filecard.

Returns:
AsyncCallback of ResponseStatusEnum

getDeleteFilecardCallback

public com.google.gwt.user.client.rpc.AsyncCallback<ResponseStatusEnum> getDeleteFilecardCallback()
Will return the GWT-RPC callback for deleting a Filecard.

Returns:
AsyncCallback of ResponseStatusEnum

getRenderQuestionCallback

public com.google.gwt.user.client.rpc.AsyncCallback<java.lang.String> getRenderQuestionCallback()
Will return the GWT-RPC callback for rendering the question of a Filecard.

Returns:
AsyncCallback of String

getRenderAnswerCallback

public com.google.gwt.user.client.rpc.AsyncCallback<java.lang.String> getRenderAnswerCallback()
Will return the GWT-RPC callback for rendering the answer of a Filecard.

Returns:
AsyncCallback of String