edu.mayo.bsi.ngsportal.client
Class RunEditPanel

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.smartgwt.client.widgets.BaseWidget
              extended by com.smartgwt.client.widgets.Canvas
                  extended by com.smartgwt.client.widgets.layout.Layout
                      extended by com.smartgwt.client.widgets.layout.VLayout
                          extended by edu.mayo.bsi.ngsportal.client.RunEditPanel
All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.EventHandler, 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.IsWidget, com.smartgwt.client.widgets.events.HasClickHandlers, com.smartgwt.client.widgets.events.HasDoubleClickHandlers, com.smartgwt.client.widgets.events.HasDragMoveHandlers, com.smartgwt.client.widgets.events.HasDragRepositionMoveHandlers, com.smartgwt.client.widgets.events.HasDragRepositionStartHandlers, com.smartgwt.client.widgets.events.HasDragRepositionStopHandlers, com.smartgwt.client.widgets.events.HasDragResizeMoveHandlers, com.smartgwt.client.widgets.events.HasDragResizeStartHandlers, com.smartgwt.client.widgets.events.HasDragResizeStopHandlers, com.smartgwt.client.widgets.events.HasDragStartHandlers, com.smartgwt.client.widgets.events.HasDragStopHandlers, com.smartgwt.client.widgets.events.HasDropHandlers, com.smartgwt.client.widgets.events.HasDropMoveHandlers, com.smartgwt.client.widgets.events.HasDropOutHandlers, com.smartgwt.client.widgets.events.HasDropOverHandlers, com.smartgwt.client.widgets.events.HasFocusChangedHandlers, com.smartgwt.client.widgets.events.HasHoverHandlers, com.smartgwt.client.widgets.events.HasHoverHiddenHandlers, com.smartgwt.client.widgets.events.HasKeyDownHandlers, com.smartgwt.client.widgets.events.HasKeyPressHandlers, com.smartgwt.client.widgets.events.HasMouseDownHandlers, com.smartgwt.client.widgets.events.HasMouseMoveHandlers, com.smartgwt.client.widgets.events.HasMouseOutHandlers, com.smartgwt.client.widgets.events.HasMouseOverHandlers, com.smartgwt.client.widgets.events.HasMouseStillDownHandlers, com.smartgwt.client.widgets.events.HasMouseUpHandlers, com.smartgwt.client.widgets.events.HasMouseWheelHandlers, com.smartgwt.client.widgets.events.HasMovedHandlers, com.smartgwt.client.widgets.events.HasParentMovedHandlers, com.smartgwt.client.widgets.events.HasResizedHandlers, com.smartgwt.client.widgets.events.HasRightMouseDownHandlers, com.smartgwt.client.widgets.events.HasScrolledHandlers, com.smartgwt.client.widgets.events.HasShowContextMenuHandlers, com.smartgwt.client.widgets.events.HasVisibilityChangedHandlers, com.smartgwt.client.widgets.form.fields.events.ClickHandler, com.smartgwt.client.widgets.grid.events.RecordClickHandler, StringCommand

public class RunEditPanel
extends com.smartgwt.client.widgets.layout.VLayout
implements com.smartgwt.client.widgets.form.fields.events.ClickHandler, com.smartgwt.client.widgets.grid.events.RecordClickHandler, StringCommand

@author Gregory Dougherty


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
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
RunEditPanel(NGSPortal portal, LinkedHashMap<String,String> appTypes, LinkedHashMap<String,String> readTypes, List<SampleInfo> sampleInfo)
          Default Constructor
 
Method Summary
 void addEditListener(edu.mayo.bsi.ngsportal.client.RunEditPanel.RunEditListener listener)
          Adds a client that needs to be notified of run edits.
 void addSample(String species, String captureKit, String rlimsProject, String diseaseType, String rlimsID, String parentID, com.smartgwt.client.data.Record newRecord, com.google.gwt.user.client.Command followUp)
          Routine called when the user has added a new sample via the AddSample dialog box
 void cancelNewSample()
          Routine called when the user has Canceled the AddSample dialog box
 void discardChanges()
          Discard any changes made to the run or samples
 void execute(String choice, com.google.gwt.user.client.Command followUp)
          A procedure that takes a string (generally the user's choice from a ComboBox in a dialog box) and a Command (generally something the user will execute after it deals with the String
 boolean isChanged()
           
 void onClick(com.smartgwt.client.widgets.form.fields.events.ClickEvent event)
           
 void onRecordClick(com.smartgwt.client.widgets.grid.events.RecordClickEvent event)
           
 void saveChanges(com.google.gwt.user.client.Command followUp)
          Save the current changes back to the server, then execute the follow up command
 void setAppTypes(LinkedHashMap<String,String> appTypes)
           
 void setReadTypes(LinkedHashMap<String,String> readTypes)
           
 void setRunInformation(RunData theRun, String pi)
          Set the tab to display the latest run data
 void setSampleNames(List<SampleInfo> sampleInfo)
          Update the list of available Sample Names
 void setSamples(List<SampleInfo> results)
          Update the samples ListGrid with the SampleInfo for the current run
 void updateSampleName(String newName, SampleInfo theSample, com.smartgwt.client.data.Record newRecord, com.google.gwt.user.client.Command followUp)
          Routine called when the user has decided to change the sample name via the ChangeSample dialog box
 
Methods inherited from class com.smartgwt.client.widgets.layout.VLayout
getOrCreateRef, setDefaultProperties
 
Methods inherited from class com.smartgwt.client.widgets.layout.Layout
addMember, addMember, addMember, addMember, getAnimateMembers, getAnimateMemberTime, getCanDropComponents, getDefaultResizeBars, getDropLineThickness, getDropPosition, getEnforcePolicy, getHPolicy, getLayoutBottomMargin, getLayoutLeftMargin, getLayoutMargin, getLayoutRightMargin, getLayoutTopMargin, getLeaveScrollbarGap, getLocateMembersBy, getLocateMembersType, getManagePercentBreadth, getMember, getMember, getMemberDefaultBreadth, getMemberNumber, getMemberNumber, getMemberOffset, getMemberOverlap, getMembers, getMembersMargin, getMinMemberSize, getOverflow, getPaddingAsLayoutMargin, getResizeBarClass, getResizeBarSize, getReverseOrder, getShowDragPlaceHolder, getStackZIndex, getVertical, getVPolicy, hasMember, hideDropLine, hideMember, hideMember, membersChanged, reflow, reflow, reflowNow, removeMember, removeMembers, reorderMember, reorderMembers, setAlign, setAlign, setAnimateMembers, setAnimateMemberTime, setCanDropComponents, setDefaultLayoutAlign, setDefaultLayoutAlign, setDefaultProperties, setDefaultResizeBars, setDropLineProperties, setDropLineThickness, setEnforcePolicy, setHPolicy, setLayoutBottomMargin, setLayoutLeftMargin, setLayoutMargin, setLayoutRightMargin, setLayoutTopMargin, setLeaveScrollbarGap, setLocateMembersBy, setLocateMembersType, setManagePercentBreadth, setMemberOverlap, setMembers, setMembersMargin, setMinMemberSize, setOverflow, setPaddingAsLayoutMargin, setPlaceHolderDefaults, setPlaceHolderProperties, setResizeBarClass, setResizeBarSize, setReverseOrder, setShowDragPlaceHolder, setStackZIndex, setVertical, setVisibleMember, setVPolicy, showMember, showMember
 
Methods inherited from class com.smartgwt.client.widgets.Canvas
addChild, addChild, addChild, addClickHandler, addDoubleClickHandler, addDragMoveHandler, addDragRepositionMoveHandler, addDragRepositionStartHandler, addDragRepositionStopHandler, addDragResizeMoveHandler, addDragResizeStartHandler, addDragResizeStopHandler, addDragStartHandler, addDragStopHandler, addDropHandler, addDropMoveHandler, addDropOutHandler, addDropOverHandler, addFocusChangedHandler, addHoverHandler, addHoverHiddenHandler, addKeyDownHandler, addKeyPressHandler, addMouseDownHandler, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseStillDownHandler, addMouseUpHandler, addMouseWheelHandler, addMovedHandler, addParentMovedHandler, addPeer, addPeer, addResizedHandler, addRightMouseDownHandler, addScrolledHandler, addShowContextMenuHandler, addStyleName, addVisibilityChangedHandler, adjustForContent, animateFade, animateFade, animateFade, animateHide, animateHide, animateHide, animateMove, animateMove, animateMove, animateMove, animateRect, animateRect, animateRect, animateResize, animateResize, animateResize, animateScroll, animateScroll, animateScroll, animateShow, animateShow, animateShow, blur, bringToFront, clear, clickMaskUp, clickMaskUp, contains, contains, containsEvent, containsFocus, containsPoint, containsPoint, disable, enable, focus, getAbsoluteLeft, getAbsoluteTop, getAccessKey, getAnimateAcceleration, getAnimateFadeTime, getAnimateHideAcceleration, getAnimateHideTime, getAnimateMoveAcceleration, getAnimateMoveTime, getAnimateRectAcceleration, getAnimateRectTime, getAnimateResizeAcceleration, getAnimateResizeTime, getAnimateScrollAcceleration, getAnimateScrollTime, getAnimateShowAcceleration, getAnimateShowEffect, getAnimateShowTime, getAnimateTime, getAppImgDir, getAriaRole, getAutoShowParent, getBackgroundColor, getBackgroundImage, getBackgroundPosition, getBackgroundRepeat, getBorder, getBottom, getById, getCanAcceptDrop, getCanDrag, getCanDragReposition, getCanDragResize, getCanDragScroll, getCanDrop, getCanDropBefore, getCanFocus, getCanHover, getCanSelectText, getCanvasItem, getChildren, getChildrenSnapResizeToGrid, getChildrenSnapToGrid, getContents, getContextMenu, getCursor, getDataPath, getDefaultHeight, getDefaultWidth, getDestroyed, getDestroying, getDisabled, getDisabledCursor, getDoubleClickDelay, getDragAppearance, getDragIntersectStyle, getDragOpacity, getDragRepositionCursor, getDragScrollDelay, getDragStartDistance, getDragTarget, getDragType, getDynamicContents, getEdgeBackgroundColor, getEdgeCenterBackgroundColor, getEdgeImage, getEdgeMarginSize, getEdgeOffset, getEdgeOpacity, getEdgeShowCenter, getEdgeSize, getExtraSpace, getFacetId, getFullDataPath, getGroupTitle, getHeight, getHeightAsString, getHoverAlign, getHoverAutoDestroy, getHoverComponent, getHoverDelay, getHoverHeight, getHoverHTML, getHoverMoveWithMouse, getHoverOpacity, getHoverStyle, getHoverVAlign, getHoverWidth, getHoverWrap, getHSnapOrigin, getHSnapOrigin, getHSnapPosition, getHSnapPosition, getHtmlPosition, getImgURL, getImgURL, getInnerContentHeight, getInnerContentWidth, getInnerHeight, getInnerWidth, getIsGroup, getLeft, getLeftAsString, getLocateChildrenBy, getLocateChildrenType, getLocatePeersBy, getLocatePeersType, getMargin, getMatchElement, getMaxHeight, getMaxWidth, getMenuConstructor, getMinHeight, getMinWidth, getMouseStillDownDelay, getMouseStillDownInitialDelay, getNextZIndex, getNoDoubleClicks, getOffsetHeight, getOffsetWidth, getOffsetX, getOffsetY, getOpacity, getPadding, getPageBottom, getPageLeft, getPageRect, getPageRight, getPageTop, getParentElement, getPercentBox, getPosition, getPrefix, getPrintHTML, getPrintHTML, getPrompt, getRect, getRedrawOnResize, getResizeBarTarget, getRight, getScrollbarSize, getScrollBottom, getScrollHeight, getScrollLeft, getScrollRight, getScrollTop, getScrollWidth, getShadowDepth, getShadowImage, getShadowOffset, getShadowSoftness, getShouldPrint, getShowCustomScrollbars, getShowDragShadow, getShowEdges, getShowHover, getShowHoverComponents, getShowResizeBar, getShowShadow, getSkinImgDir, getSnapAxis, getSnapEdge, getSnapHDirection, getSnapHGap, getSnapOffsetLeft, getSnapOffsetTop, getSnapOnDrop, getSnapResizeToGrid, getSnapTo, getSnapToGrid, getSnapVDirection, getSnapVGap, getStyleName, getTabIndex, getTitle, getTooltip, getTop, getTopAsString, getUseOpacityFilter, getValuesManager, getViewportHeight, getViewportWidth, getVisibility, getVisibleHeight, getVisibleWidth, getVSnapOrigin, getVSnapOrigin, getVSnapPosition, getVSnapPosition, getWidth, getWidthAsString, getZIndex, handleHover, hide, hideClickMask, hideClickMask, hideContextMenu, imgHTML, imgHTML, imgHTML, intersects, isDirty, isDisabled, isDrawn, isVisible, keyUp, layoutChildren, linkHTML, linkHTML, markForDestroy, markForRedraw, markForRedraw, moveAbove, moveBelow, moveBy, moveTo, printComponents, redraw, redraw, removeChild, removeChild, resizeBy, resizeTo, resizeTo, scrollBy, scrollByPercent, scrollTo, scrollTo, scrollToBottom, scrollToLeft, scrollToPercent, scrollToRight, scrollToTop, sendToBack, setAccessKey, setAllowExternalFilters, setAnimateAcceleration, setAnimateFadeTime, setAnimateHideAcceleration, setAnimateHideTime, setAnimateMoveAcceleration, setAnimateMoveTime, setAnimateRectAcceleration, setAnimateRectTime, setAnimateResizeAcceleration, setAnimateResizeTime, setAnimateScrollAcceleration, setAnimateScrollTime, setAnimateShowAcceleration, setAnimateShowEffect, setAnimateShowTime, setAnimateTime, setAppImgDir, setAriaRole, setAutoHeight, setAutoShowParent, setAutoWidth, setBackgroundColor, setBackgroundImage, setBackgroundPosition, setBackgroundRepeat, setBorder, setBottom, setCanAcceptDrop, setCanDrag, setCanDragReposition, setCanDragResize, setCanDragScroll, setCanDrop, setCanDropBefore, setCanFocus, setCanHover, setCanSelectText, setCanvasItem, setChildren, setChildrenSnapResizeToGrid, setChildrenSnapToGrid, setContents, setContextMenu, setCursor, setDataPath, setDefaultHeight, setDefaultProperties, setDefaultWidth, setDisabled, setDisabledCursor, setDoubleClickDelay, setDragAppearance, setDragIntersectStyle, setDragOpacity, setDragRepositionCursor, setDragScrollDelay, setDragStartDistance, setDragTarget, setDragType, setDropTypes, setDynamicContents, setEdgeBackgroundColor, setEdgeCenterBackgroundColor, setEdgeImage, setEdgeMarginSize, setEdgeOffset, setEdgeOpacity, setEdgeShowCenter, setEdgeSize, setExtraSpace, setFacetId, setGroupTitle, setHeight, setHeight, setHeight100, setHoverAlign, setHoverAutoDestroy, setHoverDelay, setHoverHeight, setHoverMoveWithMouse, setHoverOpacity, setHoverStyle, setHoverVAlign, setHoverWidth, setHoverWrap, setHtmlPosition, setImage, setImage, setIsGroup, setKeepInParentRect, setKeepInParentRect, setLayoutAlign, setLayoutAlign, setLeft, setLeft, setLocateChildrenBy, setLocateChildrenType, setLocatePeersBy, setLocatePeersType, setMargin, setMatchElement, setMaxHeight, setMaxWidth, setMenuConstructor, setMinHeight, setMinWidth, setMouseStillDownDelay, setMouseStillDownInitialDelay, setNeverUseFilters, setNoDoubleClicks, setOpacity, setPadding, setPageLeft, setPageTop, setParentElement, setPercentBox, setPosition, setPrefix, setPrompt, setRect, setRect, setRedrawOnResize, setResizeBarTarget, setResizeFrom, setRight, setScrollbarSize, setShadowDepth, setShadowImage, setShadowOffset, setShadowSoftness, setShouldPrint, setShowCustomScrollbars, setShowDragShadow, setShowEdges, setShowHover, setShowHoverComponents, setShowResizeBar, setShowShadow, setSkinImgDir, setSmoothFade, setSnapAxis, setSnapEdge, setSnapHDirection, setSnapHGap, setSnapOffsetLeft, setSnapOffsetTop, setSnapOnDrop, setSnapResizeToGrid, setSnapTo, setSnapToGrid, setSnapVDirection, setSnapVGap, setStyleName, setTabIndex, setTitle, setTooltip, setTop, setTop, setUseOpacityFilter, setValuesManager, setVisibility, setVisible, setWidth, setWidth, setWidth100, setZIndex, shouldDragScroll, show, showClickMask, showNextTo, showNextTo, showPrintPreview, showPrintPreview, showPrintPreview, showPrintPreview, updateHover, updateHover, updateShadow, visibleAtPoint, willAcceptDrop
 
Methods inherited from class com.smartgwt.client.widgets.BaseWidget
addDrawHandler, destroy, doOnRender, draw, equals, fireEvent, getConfig, getDOM, getElement, getElement, getHandlerCount, getID, getInnerHTML, getJsObj, getOrCreateJsObj, getRef, getScClassName, hashCode, isConfigOnly, isCreated, setConfig, setConfigOnly, setHtmlElement, setID, setNullProperty, setPosition, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setScClassName, toString
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, getLayoutData, getParent, isAttached, onBrowserEvent, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, ensureDebugId, ensureDebugId, getStylePrimaryName, isVisible, removeStyleDependentName, removeStyleName, setPixelSize, setSize, setStyleDependentName, setStyleName, setStylePrimaryName, setVisible, sinkBitlessEvent, unsinkEvents
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 

Constructor Detail

RunEditPanel

public RunEditPanel(NGSPortal portal,
                    LinkedHashMap<String,String> appTypes,
                    LinkedHashMap<String,String> readTypes,
                    List<SampleInfo> sampleInfo)
Default Constructor

Parameters:
portal - The portal this Panel uses to get data to and from the server
appTypes - The list of Application Type Descriptions. Can be null or empty
readTypes - The list of Read Type Descriptions. Can be null or empty
sampleInfo - The list of possible Sample names and their info. Can be null or empty
Method Detail

setRunInformation

public final void setRunInformation(RunData theRun,
                                    String pi)
Set the tab to display the latest run data

Parameters:
theRun - The Run whose data to display / edit
pi - Name of the PI we're getting information about

setSamples

public final void setSamples(List<SampleInfo> results)
Update the samples ListGrid with the SampleInfo for the current run

Parameters:
results - The sample data to use

isChanged

public final boolean isChanged()
Returns:
True if any of the data has changed, else false

setAppTypes

public final void setAppTypes(LinkedHashMap<String,String> appTypes)
Parameters:
appTypes - the appTypes to set

setReadTypes

public final void setReadTypes(LinkedHashMap<String,String> readTypes)
Parameters:
readTypes - the readTypes to set

setSampleNames

public void setSampleNames(List<SampleInfo> sampleInfo)
Update the list of available Sample Names

Parameters:
sampleInfo - New list of possible names and other info

onRecordClick

public void onRecordClick(com.smartgwt.client.widgets.grid.events.RecordClickEvent event)
Specified by:
onRecordClick in interface com.smartgwt.client.widgets.grid.events.RecordClickHandler

onClick

public void onClick(com.smartgwt.client.widgets.form.fields.events.ClickEvent event)
Specified by:
onClick in interface com.smartgwt.client.widgets.form.fields.events.ClickHandler

saveChanges

public void saveChanges(com.google.gwt.user.client.Command followUp)
Save the current changes back to the server, then execute the follow up command

Parameters:
followUp - Command to execute if changes are successfully saved

execute

public void execute(String choice,
                    com.google.gwt.user.client.Command followUp)
Description copied from interface: StringCommand
A procedure that takes a string (generally the user's choice from a ComboBox in a dialog box) and a Command (generally something the user will execute after it deals with the String

Specified by:
execute in interface StringCommand
Parameters:
choice - A String, null to say no selection, otherwise the user's choice from a ComboBox
followUp - Command to execute if the user made a choice

addSample

public void addSample(String species,
                      String captureKit,
                      String rlimsProject,
                      String diseaseType,
                      String rlimsID,
                      String parentID,
                      com.smartgwt.client.data.Record newRecord,
                      com.google.gwt.user.client.Command followUp)
Routine called when the user has added a new sample via the AddSample dialog box

Parameters:
species - Species of the new sample
captureKit - The Capture Kit used to obtain the sequencing results
rlimsProject - The RLIMS Project where the sample was sequences
diseaseType - Disease Type of the new sample
rlimsID - RLIMS Family ID of the new sample
parentID - RLIMS Parent ID of the new sample
newRecord - The ListGrid Record that contains the new Sample
followUp - Command to execute if successfully save all changes

updateSampleName

public void updateSampleName(String newName,
                             SampleInfo theSample,
                             com.smartgwt.client.data.Record newRecord,
                             com.google.gwt.user.client.Command followUp)
Routine called when the user has decided to change the sample name via the ChangeSample dialog box

Parameters:
newName - New name of the sample
theSample - The sample that's being renamed
newRecord - The ListGrid Record that contains the Sample
followUp - Command to execute if successfully save all changes

cancelNewSample

public void cancelNewSample()
Routine called when the user has Canceled the AddSample dialog box


discardChanges

public void discardChanges()
Discard any changes made to the run or samples


addEditListener

public void addEditListener(edu.mayo.bsi.ngsportal.client.RunEditPanel.RunEditListener listener)
Adds a client that needs to be notified of run edits. This event will occur when the user saves the edit.

Parameters:
listener -