com.smartgwt.client.widgets
Class Window

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 com.smartgwt.client.widgets.Window
All Implemented Interfaces:
HasHandlers, EventListener, HasClickHandlers, HasCloseClickHandlers, HasDoubleClickHandlers, HasDragMoveHandlers, HasDragRepositionMoveHandlers, HasDragRepositionStartHandlers, HasDragRepositionStopHandlers, HasDragResizeMoveHandlers, HasDragResizeStartHandlers, HasDragResizeStopHandlers, HasDragStartHandlers, HasDragStopHandlers, HasDropHandlers, HasDropMoveHandlers, HasDropOutHandlers, HasDropOverHandlers, HasFocusChangedHandlers, HasHoverHandlers, HasHoverHiddenHandlers, HasKeyDownHandlers, HasKeyPressHandlers, HasMaximizeClickHandlers, HasMinimizeClickHandlers, HasMouseDownHandlers, HasMouseMoveHandlers, HasMouseOutHandlers, HasMouseOverHandlers, HasMouseStillDownHandlers, HasMouseUpHandlers, HasMouseWheelHandlers, HasResizedHandlers, HasRestoreClickHandlers, HasRightMouseDownHandlers, HasScrolledHandlers, HasShowContextMenuHandlers
Direct Known Subclasses:
ColorPicker, Dialog

public class Window
extends VLayout
implements HasMaximizeClickHandlers, HasMinimizeClickHandlers, HasRestoreClickHandlers, HasCloseClickHandlers

A general purpose Window class for implementing dialogs, portlets, alerts, prompts, wizards and desktop-like windowing interfaces.

Windows can contain arbitrary Smart GWT components, configured via the items property. Windows may be 'modal' or non-modal.

Windows provide a series of highly configurable and skinnable com.smartgwt.client..AutoChild including a header, various header controls, footer, and corner resizer.

The more specialized Dialog subclass of Window has additional functionality targetted at simple prompts and confirmations, such as buttons with default actions, and single-method com.smartgwt.client.util.isc#warn for common application dialogs.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
 
Field Summary
 
Fields inherited from class com.smartgwt.client.widgets.BaseWidget
config, configOnly, id, isElementSet, scClassName
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
Window()
           
Window(JavaScriptObject jsObj)
           
 
Method Summary
 HandlerRegistration addCloseClickHandler(CloseClickHandler handler)
          Add a closeClick handler.
 void addItem(Canvas component)
          Adds a widget to the window.
 void addItem(Widget widget)
          Adds a widget to the window.
 HandlerRegistration addMaximizeClickHandler(MaximizeClickHandler handler)
          Add a onMaximizeClick handler.
 void addMember(Canvas newMember)
          Add a canvas to the layout, optionally at a specific position.
 void addMember(Canvas newMember, int position)
          Add a canvas to the layout, optionally at a specific position.
 HandlerRegistration addMinimizeClickHandler(MinimizeClickHandler handler)
          Add a onMinimizeClick handler.
 HandlerRegistration addRestoreClickHandler(RestoreClickHandler handler)
          Add a onRestoreClick handler.
 void centerInPage()
          Centers the Window in the page.
protected  JavaScriptObject create()
           
 void flash()
          Makes the window header flash if it's visible; if there's no header, or the header is hidden, makes the window body flash instead.
 Boolean getAnimateMinimize()
          Should this window minimize, maximize, and restore as an animation, or as a simple 1-step transition?
 Boolean getAutoCenter()
          If true, this Window widget will automatically be centered on the page when shown.
 Boolean getAutoSize()
          If true, the window is resized automatically to accommodate the contents of the body, if they would otherwise require scrolling.
 String getBodyColor()
          Color of the Window body.
 String getBodyStyle()
          Style of the Window body.
 Boolean getCanDragReposition()
          If true, this Window may be moved around by the user by dragging on the Window header.
 Boolean getCanDragResize()
          Can the window be drag-resized? If true the window may be drag resized from its edges, and if showing, via the resiszer icon in the footer.
 Boolean getCanFocusInHeaderButtons()
          If true, the user can give the header buttons keyboard focus (by clicking on them and including them in the tabOrder)
 String getContentLayout()
          The layout policy that should be used for widgets within the Window body.
 String getContentsType()
          If this window has src specified, this property can be used to indicate whether the source is a standalone HTML page or an HTML fragment.
 int getDefaultMinimizeHeight()
          If minimizeHeight is unset, by the window will shrink to the height of the header when minimized.
 Boolean getDismissOnEscape()
          Should this window be dismissed (same effect as pressing the "Cancel" button) when the user presses the "Escape" key? Behavior will only occur while the window or one of its descendants has focus, and does not cancel the Escape keypress.
 Boolean getDismissOnOutsideClick()
          If true, a click outside the bounds of the Window will have the same effect as pressing its cancel button.
Note: Applies only to modal windows.
 int getFooterHeight()
          The height of the footer, in pixels.
 String getHeaderSrc()
          If showHeaderBackground is true, this property provides the URL of the background image for the header.
 String getHeaderStyle()
          Style for the Window header.
 String getHiliteBodyColor()
          Highlight color for the Window body (shown when the body is flashed).
 String getHiliteHeaderSrc()
          If showHeaderBackground is true, this governs the URL of the image to use in the header's highlighted state when the window is flash()
 String getHiliteHeaderStyle()
          Highlight style for the Window header.
 Boolean getIsModal()
          If true, when shown this Window will intercept and block events to all other existing components on the page.
 Canvas[] getItems()
          The contents of the Window body.
 Boolean getMaximized()
          Is this window maximized.
 AnimationAcceleration getMinimizeAcceleration()
          Default acceleration function for performing an animated minimize / maximize.
 Boolean getMinimized()
          Is this window minimized.
 Integer getMinimizeHeight()
          Height for the window when minimized.
 Integer getMinimizeTime()
          If this window is minimizeable, and animateMinimize is true, what should the duration of the minize / maximize be (in ms)? If unset defaults to canvas.animationTime.
 int getModalMaskOpacity()
          Controls the opacity of the modal mask displayed behind modal windows.
 String getModalMaskStyle()
          Specifies the CSS style for the modal mask.
static Window getOrCreateRef(JavaScriptObject jsObj)
           
 Boolean getShowBody()
          If true, draw the body contents when this Window is drawn.
 Boolean getShowCloseButton()
          If true, show a close button in the header, which will dismiss this window by calling addCloseClickHandler(com.smartgwt.client.widgets.events.CloseClickHandler).
 Boolean getShowFooter()
          If true, show a footer for this Window, including resizer, statusBar, etc.
 Boolean getShowHeader()
          If true, show a header for this Window.
 Boolean getShowHeaderBackground()
          Should the window header show a background image? Default value is true for all browsers except for Internet Explorer.
If set to true the image source is derived from headerSrc and hiliteHeaderSrc, otherwise the background will be styled according to headerStyle / hiliteHeaderStyle.
 Boolean getShowHeaderIcon()
          If true, we show an icon on the left in the header.
 Boolean getShowMaximizeButton()
          If true, show a maximize button in the header - clicking it maximizes the Window
 Boolean getShowMinimizeButton()
          If true, show a minimize button in the header--clicking it minimizes the Window.
 Boolean getShowModalMask()
          If true, displays a translucent mask over the rest of the page when a modal window is displayed.
 Boolean getShowResizer()
          If true, show a button in the lower right corner that allows users to resize the Window.
 Boolean getShowStatusBar()
          If true, show a statusBar for this Window, including resizer.
 Boolean getShowTitle()
          Show a title (typically just text) on the header for this window.
 String getSrc()
          A URL to load as content for the Window's body.
 String getStatus()
          Text to show in the status bar of the window (if one is visible)
 String getTitle()
          title for this Window, shown in the header (if drawn)
 void maximize()
          Maximize the window.
 void minimize()
          Minimize the window.
static void preloadImages()
          Preload primary window skin images
 void removeItem(Canvas component)
          Removes a widget from the window.
 void restore()
          Restores the window to its specified height and width after a call to minimize() or maximize().
 void setAnimateMinimize(Boolean animateMinimize)
          Should this window minimize, maximize, and restore as an animation, or as a simple 1-step transition?
 void setAutoCenter(Boolean autoCenter)
          If true, this Window widget will automatically be centered on the page when shown.
 void setAutoSize(Boolean autoSize)
          If true, the window is resized automatically to accommodate the contents of the body, if they would otherwise require scrolling.
 void setBodyColor(String bodyColor)
          Color of the Window body.
 void setBodyDefaults(Map bodyDefaults)
          Default properties for the body of the Window
 void setBodyStyle(String bodyStyle)
          Style of the Window body.
 void setCanDragReposition(Boolean canDragReposition)
          If true, this Window may be moved around by the user by dragging on the Window header.
 void setCanDragResize(Boolean canDragResize)
          Can the window be drag-resized? If true the window may be drag resized from its edges, and if showing, via the resiszer icon in the footer.
 void setCanFocusInHeaderButtons(Boolean canFocusInHeaderButtons)
          If true, the user can give the header buttons keyboard focus (by clicking on them and including them in the tabOrder)
 void setContentLayout(String contentLayout)
          The layout policy that should be used for widgets within the Window body.
 void setContentsType(String contentsType)
          If this window has src specified, this property can be used to indicate whether the source is a standalone HTML page or an HTML fragment.
 void setDefaultMinimizeHeight(int defaultMinimizeHeight)
          If minimizeHeight is unset, by the window will shrink to the height of the header when minimized.
 void setDismissOnEscape(Boolean dismissOnEscape)
          Should this window be dismissed (same effect as pressing the "Cancel" button) when the user presses the "Escape" key? Behavior will only occur while the window or one of its descendants has focus, and does not cancel the Escape keypress.
 void setDismissOnOutsideClick(Boolean dismissOnOutsideClick)
          If true, a click outside the bounds of the Window will have the same effect as pressing its cancel button.
Note: Applies only to modal windows.
 void setFooterHeight(int footerHeight)
          The height of the footer, in pixels.
 void setHeaderControls(Object... headerControls)
          Array of members to show in the Window header.
 void setHeaderIcon(String imgSrc)
          Sets the Window header icon.
 void setHeaderIcon(String imgSrc, int width, int height)
          Sets the Window header icon.
 void setHeaderIconDefaults(Map headerIconDefaults)
          This is an object literal property block specifying the various properties of the headerIcon - the icon that appears at the top left of the window and is by default the Isomorphic logo.
 void setHeaderIconProperties(Map headerIconProperties)
           
 void setHeaderSrc(String headerSrc)
          If showHeaderBackground is true, this property provides the URL of the background image for the header.
 void setHeaderStyle(String headerStyle)
          Style for the Window header.
 void setHiliteBodyColor(String hiliteBodyColor)
          Highlight color for the Window body (shown when the body is flashed).
 void setHiliteHeaderSrc(String hiliteHeaderSrc)
          If showHeaderBackground is true, this governs the URL of the image to use in the header's highlighted state when the window is flash()
 void setHiliteHeaderStyle(String hiliteHeaderStyle)
          Highlight style for the Window header.
 void setIsModal(Boolean isModal)
          If true, when shown this Window will intercept and block events to all other existing components on the page.
 void setKeepInParentRect(Boolean keepInParentRect)
          If Window.canDragReposition or Window.canDragResize is true, should the windows size and position be constrained such that it remains within the viewport of its parent element (or for top level windows, within the viewport of the browser window)?


Note: keepInParentRect affects only user drag interactions, not programmatic moves.

 void setKeepInParentRect(Rectangle rectangle)
          If Window.canDragReposition or Window.canDragRShowcaseDataesize is true, should the windows size and position be constrained such that it remains within the viewport of its parent element (or for top level windows, within the viewport of the browser window)? Can also be set to an array denoting an arbitrary Rectangle beyond which the window cannot be moved.
 void setMaximized(Boolean maximized)
          Is this window maximized.
 void setMinimizeAcceleration(AnimationAcceleration minimizeAcceleration)
          Default acceleration function for performing an animated minimize / maximize.
 void setMinimized(Boolean minimized)
          Is this window minimized.
 void setMinimizeHeight(Integer minimizeHeight)
          Height for the window when minimized.
 void setMinimizeTime(Integer minimizeTime)
          If this window is minimizeable, and animateMinimize is true, what should the duration of the minize / maximize be (in ms)? If unset defaults to canvas.animationTime.
 void setModalMaskOpacity(int modalMaskOpacity)
          Controls the opacity of the modal mask displayed behind modal windows.
 void setModalMaskStyle(String modalMaskStyle)
          Specifies the CSS style for the modal mask.
 void setShowBody(Boolean showBody)
          If true, draw the body contents when this Window is drawn.
 void setShowCloseButton(Boolean showCloseButton)
          If true, show a close button in the header, which will dismiss this window by calling addCloseClickHandler(com.smartgwt.client.widgets.events.CloseClickHandler).
 void setShowFooter(Boolean showFooter)
          If true, show a footer for this Window, including resizer, statusBar, etc.
 void setShowHeader(Boolean showHeader)
          If true, show a header for this Window.
 void setShowHeaderBackground(Boolean showHeaderBackground)
          Should the window header show a background image? Default value is true for all browsers except for Internet Explorer.
If set to true the image source is derived from headerSrc and hiliteHeaderSrc, otherwise the background will be styled according to headerStyle / hiliteHeaderStyle.
 void setShowHeaderIcon(Boolean showHeaderIcon)
          If true, we show an icon on the left in the header.
 void setShowMaximizeButton(Boolean showMaximizeButton)
          If true, show a maximize button in the header - clicking it maximizes the Window Dynamically update showMaximizeButton to show / hide the maximizeButton
 void setShowMinimizeButton(Boolean showMinimizeButton)
          If true, show a minimize button in the header--clicking it minimizes the Window.
 void setShowModalMask(Boolean showModalMask)
          If true, displays a translucent mask over the rest of the page when a modal window is displayed.
 void setShowResizer(Boolean showResizer)
          If true, show a button in the lower right corner that allows users to resize the Window.
 void setShowStatusBar(Boolean showStatusBar)
          If true, show a statusBar for this Window, including resizer.
 void setShowTitle(Boolean showTitle)
          Show a title (typically just text) on the header for this window.
 void setSrc(String src)
          A URL to load as content for the Window's body.
 void setStatus(String status)
          Text to show in the status bar of the window (if one is visible) Sets the text in the status bar of the window, redrawing if necessary.
 void setTitle(String title)
          title for this Window, shown in the header (if drawn) Sets the title text that appears in the window header; the header will be redrawn if necessary.
 Boolean shouldDismissOnEscape()
          Should this window be dismissed (same effect as pressing the "Cancel" button) when the user presses the "Escape" key?
Default behavior: if dismissOnEscape is set, just return it.
 
Methods inherited from class com.smartgwt.client.widgets.layout.Layout
addMember, addMember, addMemberPostCreate, addMemberPostCreate, addMemberPreCreate, addMemberPreCreate, getAnimateMembers, getAnimateMemberTime, getCanDropComponents, getDefaultResizeBars, getDropComponent, getDropLineThickness, getDropPosition, getEnforcePolicy, getHPolicy, getLayoutBottomMargin, getLayoutLeftMargin, getLayoutMargin, getLayoutRightMargin, getLayoutTopMargin, getLeaveScrollbarGap, 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, onInit, reflow, reflow, reflowNow, removeMember, removeMembers, reorderMember, reorderMembers, setAlign, setAlign, setAnimateMembers, setAnimateMemberTime, setCanDropComponents, setDefaultLayoutAlign, setDefaultLayoutAlign, setDefaultResizeBars, setDropLineProperties, setDropLineThickness, setEnforcePolicy, setHPolicy, setLayoutBottomMargin, setLayoutLeftMargin, setLayoutMargin, setLayoutRightMargin, setLayoutTopMargin, setLeaveScrollbarGap, 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, addPeer, addPeer, addResizedHandler, addRightMouseDownHandler, addScrolledHandler, addShowContextMenuHandler, addStyleName, 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, convertToCanvasArray, disable, enable, focus, getAbsoluteLeft, getAbsoluteTop, getAccessKey, getAnimateAcceleration, getAnimateFadeTime, getAnimateHideAcceleration, getAnimateHideTime, getAnimateMoveAcceleration, getAnimateMoveTime, getAnimateRectAcceleration, getAnimateRectTime, getAnimateResizeAcceleration, getAnimateResizeTime, getAnimateScrollAcceleration, getAnimateScrollTime, getAnimateShowAcceleration, getAnimateShowTime, getAnimateTime, getAppImgDir, getAutoShowParent, getBackgroundImage, getBackgroundPosition, getBackgroundRepeat, getBorder, getBottom, getById, getCanAcceptDrop, getCanDrag, getCanDragScroll, getCanDrop, getCanDropBefore, getCanFocus, getCanHover, getCanSelectText, 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, getEdgeOffset, getEdgeOpacity, getEdgeShowCenter, getEdgeSize, getExtraSpace, getFullDataPath, getGroupTitle, getHeight, getHeightAsString, getHoverAlign, getHoverDelay, getHoverHeight, getHoverHTML, getHoverMoveWithMouse, getHoverOpacity, getHoverStyle, getHoverVAlign, getHoverWidth, getHoverWrap, getHSnapOrigin, getHSnapOrigin, getHSnapPosition, getHSnapPosition, getHtmlPosition, getImgURL, getImgURL, getInnerContentHeight, getInnerContentWidth, getInnerHeight, getInnerWidth, getIsGroup, getLeft, getLeftAsString, getMargin, getMatchElement, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getMouseStillDownDelay, getMouseStillDownInitialDelay, getNextZIndex, getNoDoubleClicks, getOffsetHeight, getOffsetWidth, getOffsetX, getOffsetY, getOpacity, getPadding, getPageBottom, getPageLeft, getPageRect, getPageRight, getPageTop, getParentElement, getPercentBox, getPosition, getPrefix, getPrompt, getRect, getRedrawOnResize, getResizeBarTarget, getRight, getScrollbarSize, getScrollBottom, getScrollHeight, getScrollLeft, getScrollRight, getScrollTop, getScrollWidth, getShadowDepth, getShadowImage, getShadowOffset, getShadowSoftness, getShowCustomScrollbars, getShowDragShadow, getShowEdges, getShowHover, getShowResizeBar, getShowShadow, getSkinImgDir, getSnapAxis, getSnapEdge, getSnapHDirection, getSnapHGap, getSnapOffsetLeft, getSnapOffsetTop, getSnapOnDrop, getSnapResizeToGrid, getSnapTo, getSnapToGrid, getSnapVDirection, getSnapVGap, getStyleName, getTabIndex, getTooltip, getTop, getTopAsString, 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, parentResized, redraw, redraw, removeChild, removeChild, resizeBy, resizeTo, resizeTo, scrollBy, scrollByPercent, scrollTo, scrollTo, scrollToBottom, scrollToLeft, scrollToPercent, scrollToRight, scrollToTop, sendToBack, setAccessKey, setAnimateAcceleration, setAnimateFadeTime, setAnimateHideAcceleration, setAnimateHideTime, setAnimateMoveAcceleration, setAnimateMoveTime, setAnimateRectAcceleration, setAnimateRectTime, setAnimateResizeAcceleration, setAnimateResizeTime, setAnimateScrollAcceleration, setAnimateScrollTime, setAnimateShowAcceleration, setAnimateShowTime, setAnimateTime, setAppImgDir, setAutoHeight, setAutoShowParent, setAutoWidth, setBackgroundColor, setBackgroundImage, setBackgroundPosition, setBackgroundRepeat, setBorder, setBottom, setCanAcceptDrop, setCanDrag, setCanDragScroll, setCanDrop, setCanDropBefore, setCanFocus, setCanHover, setCanSelectText, setChildren, setChildrenSnapResizeToGrid, setChildrenSnapToGrid, setContents, setContextMenu, setCursor, setDataPath, setDefaultHeight, setDefaultWidth, setDisabled, setDisabledCursor, setDoubleClickDelay, setDragAppearance, setDragIntersectStyle, setDragOpacity, setDragRepositionCursor, setDragScrollDelay, setDragStartDistance, setDragTarget, setDragType, setDropTypes, setDynamicContents, setEdgeBackgroundColor, setEdgeCenterBackgroundColor, setEdgeImage, setEdgeMarginSize, setEdgeOffset, setEdgeOpacity, setEdgeShowCenter, setEdgeSize, setExtraSpace, setGroupTitle, setHeight, setHeight, setHeight100, setHoverAlign, setHoverDelay, setHoverHeight, setHoverMoveWithMouse, setHoverOpacity, setHoverStyle, setHoverVAlign, setHoverWidth, setHoverWrap, setHtmlPosition, setImage, setImage, setIsGroup, setLayoutAlign, setLayoutAlign, setLeft, setLeft, setMargin, setMatchElement, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setMouseStillDownDelay, setMouseStillDownInitialDelay, setNoDoubleClicks, setOpacity, setPadding, setPageLeft, setPageTop, setParentElement, setPercentBox, setPosition, setPrefix, setPrompt, setRect, setRect, setRedrawOnResize, setResizeBarTarget, setResizeFrom, setRight, setScrollbarSize, setShadowDepth, setShadowImage, setShadowOffset, setShadowSoftness, setShowCustomScrollbars, setShowDragShadow, setShowEdges, setShowHover, setShowResizeBar, setShowShadow, setSkinImgDir, setSmoothFade, setSnapAxis, setSnapEdge, setSnapHDirection, setSnapHGap, setSnapOffsetLeft, setSnapOffsetTop, setSnapOnDrop, setSnapResizeToGrid, setSnapTo, setSnapToGrid, setSnapVDirection, setSnapVGap, setStyleName, setTabIndex, setTooltip, setTop, setTop, setValuesManager, setVisibility, setVisible, setWidth, setWidth, setWidth100, setZIndex, shouldDragScroll, show, showClickMask, showNextTo, showNextTo, showPrintPreview, updateHover, updateHover, updateShadow, visibleAtPoint, visibleAtPoint, willAcceptDrop
 
Methods inherited from class com.smartgwt.client.widgets.BaseWidget
addDrawHandler, destroy, doAddHandler, doInit, doOnRender, draw, equals, error, errorIfNotCreated, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsString, getAttributeAsStringArray, getConfig, getDOM, getElement, getElement, getHandlerCount, getID, getInnerHTML, getJsObj, getOrCreateJsObj, getRef, hashCode, isConfigOnly, isCreated, onDestroy, onDraw, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setConfig, setConfigOnly, setDragTracker, setElement, setHtmlElement, setID, setNullProperty, setPosition, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, toString
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addDomHandler, addHandler, delegateEvent, doAttachChildren, doDetachChildren, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getStyleElement, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setPixelSize, setSize, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 

Constructor Detail

Window

public Window()

Window

public Window(JavaScriptObject jsObj)
Method Detail

getOrCreateRef

public static Window getOrCreateRef(JavaScriptObject jsObj)

create

protected JavaScriptObject create()
Overrides:
create in class VLayout

setCanDragReposition

public void setCanDragReposition(Boolean canDragReposition)
If true, this Window may be moved around by the user by dragging on the Window header. Note that if the header is not showing, the Window can't be drag-repositioned regardless of this setting.

Overrides:
setCanDragReposition in class Canvas
Parameters:
canDragReposition - canDragReposition Default value is true

getCanDragReposition

public Boolean getCanDragReposition()
If true, this Window may be moved around by the user by dragging on the Window header. Note that if the header is not showing, the Window can't be drag-repositioned regardless of this setting.

Overrides:
getCanDragReposition in class Canvas
Returns:
Boolean

setCanDragResize

public void setCanDragResize(Boolean canDragResize)
Can the window be drag-resized? If true the window may be drag resized from its edges, and if showing, via the resiszer icon in the footer.

Overrides:
setCanDragResize in class Canvas
Parameters:
canDragResize - canDragResize Default value is false

getCanDragResize

public Boolean getCanDragResize()
Can the window be drag-resized? If true the window may be drag resized from its edges, and if showing, via the resiszer icon in the footer.

Overrides:
getCanDragResize in class Canvas
Returns:
Boolean

setIsModal

public void setIsModal(Boolean isModal)
If true, when shown this Window will intercept and block events to all other existing components on the page.

Use showModalMask to darken all other elements on the screen when a modal dialog is showing.

Chained modal windows - that is, modal windows that launch other modal windows - are allowed. You can accomplish this by simply creating a second modal Window while a modal Window is showing.

Note only top-level Windows (Windows without parents) can be modal.

Parameters:
isModal - isModal Default value is false

getIsModal

public Boolean getIsModal()
If true, when shown this Window will intercept and block events to all other existing components on the page.

Use showModalMask to darken all other elements on the screen when a modal dialog is showing.

Chained modal windows - that is, modal windows that launch other modal windows - are allowed. You can accomplish this by simply creating a second modal Window while a modal Window is showing.

Note only top-level Windows (Windows without parents) can be modal.

Returns:
Boolean

setShowModalMask

public void setShowModalMask(Boolean showModalMask)
                      throws IllegalStateException
If true, displays a translucent mask over the rest of the page when a modal window is displayed.

Parameters:
showModalMask - showModalMask Default value is null
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getShowModalMask

public Boolean getShowModalMask()
If true, displays a translucent mask over the rest of the page when a modal window is displayed.

Returns:
Boolean

setModalMaskOpacity

public void setModalMaskOpacity(int modalMaskOpacity)
                         throws IllegalStateException
Controls the opacity of the modal mask displayed behind modal windows.

Parameters:
modalMaskOpacity - modalMaskOpacity Default value is 50
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getModalMaskOpacity

public int getModalMaskOpacity()
Controls the opacity of the modal mask displayed behind modal windows.

Returns:
int

setModalMaskStyle

public void setModalMaskStyle(String modalMaskStyle)
                       throws IllegalStateException
Specifies the CSS style for the modal mask.

Parameters:
modalMaskStyle - modalMaskStyle Default value is "modalMask"
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getModalMaskStyle

public String getModalMaskStyle()
Specifies the CSS style for the modal mask.

Returns:
String

setAutoCenter

public void setAutoCenter(Boolean autoCenter)
If true, this Window widget will automatically be centered on the page when shown. If false, it will show up in the last position it was placed (either programatically, or by user interaction).

Parameters:
autoCenter - autoCenter Default value is autoCenter

getAutoCenter

public Boolean getAutoCenter()
If true, this Window widget will automatically be centered on the page when shown. If false, it will show up in the last position it was placed (either programatically, or by user interaction).

Returns:
Boolean

setDismissOnOutsideClick

public void setDismissOnOutsideClick(Boolean dismissOnOutsideClick)
If true, a click outside the bounds of the Window will have the same effect as pressing its cancel button.
Note: Applies only to modal windows.

Parameters:
dismissOnOutsideClick - dismissOnOutsideClick Default value is false

getDismissOnOutsideClick

public Boolean getDismissOnOutsideClick()
If true, a click outside the bounds of the Window will have the same effect as pressing its cancel button.
Note: Applies only to modal windows.

Returns:
Boolean

setDismissOnEscape

public void setDismissOnEscape(Boolean dismissOnEscape)
Should this window be dismissed (same effect as pressing the "Cancel" button) when the user presses the "Escape" key? Behavior will only occur while the window or one of its descendants has focus, and does not cancel the Escape keypress.

If unset default behavior depends on whether a close / cancel button is visible for this item.

Parameters:
dismissOnEscape - dismissOnEscape Default value is null

getDismissOnEscape

public Boolean getDismissOnEscape()
Should this window be dismissed (same effect as pressing the "Cancel" button) when the user presses the "Escape" key? Behavior will only occur while the window or one of its descendants has focus, and does not cancel the Escape keypress.

If unset default behavior depends on whether a close / cancel button is visible for this item.

Returns:
Boolean

setShowBody

public void setShowBody(Boolean showBody)
If true, draw the body contents when this Window is drawn.

Note : This is an advanced setting

Parameters:
showBody - showBody Default value is true

getShowBody

public Boolean getShowBody()
If true, draw the body contents when this Window is drawn.

Returns:
Boolean

setBodyStyle

public void setBodyStyle(String bodyStyle)
Style of the Window body.

Parameters:
bodyStyle - bodyStyle Default value is "windowBody"

getBodyStyle

public String getBodyStyle()
Style of the Window body.

Returns:
String

setBodyColor

public void setBodyColor(String bodyColor)
Color of the Window body. Overrides the background color specified in the style.

Parameters:
bodyColor - bodyColor Default value is "#FFFFFF"

getBodyColor

public String getBodyColor()
Color of the Window body. Overrides the background color specified in the style.

Returns:
String

setHiliteBodyColor

public void setHiliteBodyColor(String hiliteBodyColor)
Highlight color for the Window body (shown when the body is flashed).

Parameters:
hiliteBodyColor - hiliteBodyColor Default value is "#EEEEEE"

getHiliteBodyColor

public String getHiliteBodyColor()
Highlight color for the Window body (shown when the body is flashed).

Returns:
String

setSrc

public void setSrc(String src)
A URL to load as content for the Window's body. If specified, this attribute will take precedence over the items attribute.

Note that setting window.src is essentially a shortcut for setting items to a single HTMLflow with a specified 'contentsURL'. Sets the URL of the contents to display in the body of the window, redrawing if necessary.

Parameters:
src - URL of new contents to be displayed in the window body. Default value is null

getSrc

public String getSrc()
A URL to load as content for the Window's body. If specified, this attribute will take precedence over the items attribute.

Note that setting window.src is essentially a shortcut for setting items to a single HTMLflow with a specified 'contentsURL'.

Returns:
String

setContentsType

public void setContentsType(String contentsType)
                     throws IllegalStateException
If this window has src specified, this property can be used to indicate whether the source is a standalone HTML page or an HTML fragment.

This is similar to the contentsType property - be sure to read the HTMLFlow documentation to understand circumstances where contentsType:"page" is unsafe and not recommended.

Parameters:
contentsType - contentsType Default value is "page"
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getContentsType

public String getContentsType()
If this window has src specified, this property can be used to indicate whether the source is a standalone HTML page or an HTML fragment.

This is similar to the contentsType property - be sure to read the HTMLFlow documentation to understand circumstances where contentsType:"page" is unsafe and not recommended.

Returns:
String

setContentLayout

public void setContentLayout(String contentLayout)
The layout policy that should be used for widgets within the Window body.

Valid values are "vertical", "horizontal", "none". If the body is a Layout, this controls how the items are stacked in the body by setting vertical. See bodyConstructor for details.

Note : This is an advanced setting

Parameters:
contentLayout - contentLayout Default value is "vertical"

getContentLayout

public String getContentLayout()
The layout policy that should be used for widgets within the Window body.

Valid values are "vertical", "horizontal", "none". If the body is a Layout, this controls how the items are stacked in the body by setting vertical. See bodyConstructor for details.

Returns:
String

setAutoSize

public void setAutoSize(Boolean autoSize)
If true, the window is resized automatically to accommodate the contents of the body, if they would otherwise require scrolling. Setter for autoSize

Parameters:
autoSize - true if the window should auto-size to its content. Default value is false

getAutoSize

public Boolean getAutoSize()
If true, the window is resized automatically to accommodate the contents of the body, if they would otherwise require scrolling.

Returns:
Boolean

setShowHeader

public void setShowHeader(Boolean showHeader)
If true, show a header for this Window.

Note that in certain Smartclient skins showHeaderBackground may be set to false and the header's appearance implemented as part of the window's 'edge media'. In this case suppressing the header can be achieved by overriding the edge media as well as setting this property to false. For example, to create a headerless window with a similar appearance to a Menu in the TreeFrog skin, the following attributes could be used:

      showHeader:false,
     
 edgeImage:"[SKIN]/Menu/m.png",
      edgeSize:10, edgeTop:17, edgeBottom:17,
     
 edgeCenterBackgroundColor:"#F7F7F7"
 

Note : This is an advanced setting

Parameters:
showHeader - showHeader Default value is true

getShowHeader

public Boolean getShowHeader()
If true, show a header for this Window.

Note that in certain Smartclient skins showHeaderBackground may be set to false and the header's appearance implemented as part of the window's 'edge media'. In this case suppressing the header can be achieved by overriding the edge media as well as setting this property to false. For example, to create a headerless window with a similar appearance to a Menu in the TreeFrog skin, the following attributes could be used:

      showHeader:false,
     
 edgeImage:"[SKIN]/Menu/m.png",
      edgeSize:10, edgeTop:17, edgeBottom:17,
     
 edgeCenterBackgroundColor:"#F7F7F7"
 

Returns:
Boolean

setShowHeaderBackground

public void setShowHeaderBackground(Boolean showHeaderBackground)
                             throws IllegalStateException
Should the window header show a background image? Default value is true for all browsers except for Internet Explorer.
If set to true the image source is derived from headerSrc and hiliteHeaderSrc, otherwise the background will be styled according to headerStyle / hiliteHeaderStyle.

Note : This is an advanced setting

Parameters:
showHeaderBackground - showHeaderBackground Default value is varies
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getShowHeaderBackground

public Boolean getShowHeaderBackground()
Should the window header show a background image? Default value is true for all browsers except for Internet Explorer.
If set to true the image source is derived from headerSrc and hiliteHeaderSrc, otherwise the background will be styled according to headerStyle / hiliteHeaderStyle.

Returns:
Boolean

setHeaderStyle

public void setHeaderStyle(String headerStyle)
Style for the Window header.

Note : This is an advanced setting

Parameters:
headerStyle - headerStyle Default value is "WindowHeader"

getHeaderStyle

public String getHeaderStyle()
Style for the Window header.

Returns:
String

setHeaderSrc

public void setHeaderSrc(String headerSrc)
If showHeaderBackground is true, this property provides the URL of the background image for the header.

Note : This is an advanced setting

Parameters:
headerSrc - headerSrc Default value is "[SKIN]Window/headerGradient.gif" | null

getHeaderSrc

public String getHeaderSrc()
If showHeaderBackground is true, this property provides the URL of the background image for the header.

Returns:
String

setHiliteHeaderStyle

public void setHiliteHeaderStyle(String hiliteHeaderStyle)
Highlight style for the Window header. Displayed when a window is flash()

Note : This is an advanced setting

Parameters:
hiliteHeaderStyle - hiliteHeaderStyle Default value is "WindowHeader"

getHiliteHeaderStyle

public String getHiliteHeaderStyle()
Highlight style for the Window header. Displayed when a window is flash()

Returns:
String

setHiliteHeaderSrc

public void setHiliteHeaderSrc(String hiliteHeaderSrc)
If showHeaderBackground is true, this governs the URL of the image to use in the header's highlighted state when the window is flash()

Note : This is an advanced setting

Parameters:
hiliteHeaderSrc - hiliteHeaderSrc Default value is "[SKIN]Window/headerGradient_hilite.gif" | null

getHiliteHeaderSrc

public String getHiliteHeaderSrc()
If showHeaderBackground is true, this governs the URL of the image to use in the header's highlighted state when the window is flash()

Returns:
String

setShowTitle

public void setShowTitle(Boolean showTitle)
Show a title (typically just text) on the header for this window.

Parameters:
showTitle - showTitle Default value is true

getShowTitle

public Boolean getShowTitle()
Show a title (typically just text) on the header for this window.

Returns:
Boolean

setTitle

public void setTitle(String title)
title for this Window, shown in the header (if drawn) Sets the title text that appears in the window header; the header will be redrawn if necessary.

Overrides:
setTitle in class Canvas
Parameters:
title - new title. Default value is "Untitled Window"

getTitle

public String getTitle()
title for this Window, shown in the header (if drawn)

Overrides:
getTitle in class Canvas
Returns:
String

setShowHeaderIcon

public void setShowHeaderIcon(Boolean showHeaderIcon)
If true, we show an icon on the left in the header. Dynamically update showHeaderIcon to show / hide the headerIcon

Parameters:
showHeaderIcon - showHeaderIcon Default value is true

getShowHeaderIcon

public Boolean getShowHeaderIcon()
If true, we show an icon on the left in the header.

Returns:
Boolean

setCanFocusInHeaderButtons

public void setCanFocusInHeaderButtons(Boolean canFocusInHeaderButtons)
If true, the user can give the header buttons keyboard focus (by clicking on them and including them in the tabOrder)

Note : This is an advanced setting

Parameters:
canFocusInHeaderButtons - canFocusInHeaderButtons Default value is false

getCanFocusInHeaderButtons

public Boolean getCanFocusInHeaderButtons()
If true, the user can give the header buttons keyboard focus (by clicking on them and including them in the tabOrder)

Returns:
Boolean

setShowCloseButton

public void setShowCloseButton(Boolean showCloseButton)
If true, show a close button in the header, which will dismiss this window by calling addCloseClickHandler(com.smartgwt.client.widgets.events.CloseClickHandler). Dynamically update showCloseButton to show / hide the closeButton

Parameters:
showCloseButton - showCloseButton Default value is true

getShowCloseButton

public Boolean getShowCloseButton()
If true, show a close button in the header, which will dismiss this window by calling addCloseClickHandler(com.smartgwt.client.widgets.events.CloseClickHandler).

Returns:
Boolean

setShowMinimizeButton

public void setShowMinimizeButton(Boolean showMinimizeButton)
If true, show a minimize button in the header--clicking it minimizes the Window. Dynamically update showMinimizeButton to show / hide the minimizeButton

Parameters:
showMinimizeButton - showMinimizeButton Default value is true

getShowMinimizeButton

public Boolean getShowMinimizeButton()
If true, show a minimize button in the header--clicking it minimizes the Window.

Returns:
Boolean

setMinimized

public void setMinimized(Boolean minimized)
Is this window minimized. If true at init time, the window will be drawn minimized. To set this property at runtime use minimize() or restore().

Parameters:
minimized - minimized Default value is false

getMinimized

public Boolean getMinimized()
Is this window minimized. If true at init time, the window will be drawn minimized. To set this property at runtime use minimize() or restore().

Returns:
Boolean

setDefaultMinimizeHeight

public void setDefaultMinimizeHeight(int defaultMinimizeHeight)
If minimizeHeight is unset, by the window will shrink to the height of the header when minimized.
If there is no header, the defaultMinimizeHeight will be used instead.

Note : This is an advanced setting

Parameters:
defaultMinimizeHeight - defaultMinimizeHeight Default value is 16

getDefaultMinimizeHeight

public int getDefaultMinimizeHeight()
If minimizeHeight is unset, by the window will shrink to the height of the header when minimized.
If there is no header, the defaultMinimizeHeight will be used instead.

Returns:
int

setMinimizeHeight

public void setMinimizeHeight(Integer minimizeHeight)
Height for the window when minimized. If unset the window will shrink to the height of the header, if present, otherwise 'this.defaultMinimizeHeight'

Note : This is an advanced setting

Parameters:
minimizeHeight - minimizeHeight Default value is null

getMinimizeHeight

public Integer getMinimizeHeight()
Height for the window when minimized. If unset the window will shrink to the height of the header, if present, otherwise 'this.defaultMinimizeHeight'

Returns:
Integer

setAnimateMinimize

public void setAnimateMinimize(Boolean animateMinimize)
Should this window minimize, maximize, and restore as an animation, or as a simple 1-step transition?

Note : This is an advanced setting

Parameters:
animateMinimize - animateMinimize Default value is null

getAnimateMinimize

public Boolean getAnimateMinimize()
Should this window minimize, maximize, and restore as an animation, or as a simple 1-step transition?

Returns:
Boolean

setMinimizeTime

public void setMinimizeTime(Integer minimizeTime)
If this window is minimizeable, and animateMinimize is true, what should the duration of the minize / maximize be (in ms)? If unset defaults to canvas.animationTime.

Note : This is an advanced setting

Parameters:
minimizeTime - minimizeTime Default value is null

getMinimizeTime

public Integer getMinimizeTime()
If this window is minimizeable, and animateMinimize is true, what should the duration of the minize / maximize be (in ms)? If unset defaults to canvas.animationTime.

Returns:
Integer

setMinimizeAcceleration

public void setMinimizeAcceleration(AnimationAcceleration minimizeAcceleration)
Default acceleration function for performing an animated minimize / maximize. If unset, this.animateAcceleration will be used by default instead

Note : This is an advanced setting

Parameters:
minimizeAcceleration - minimizeAcceleration Default value is null

getMinimizeAcceleration

public AnimationAcceleration getMinimizeAcceleration()
Default acceleration function for performing an animated minimize / maximize. If unset, this.animateAcceleration will be used by default instead

Returns:
AnimationAcceleration

setMaximized

public void setMaximized(Boolean maximized)
Is this window maximized. If true at init time, the window will be drawn maximized. To set this property at runtime use maximize() or restore().

Parameters:
maximized - maximized Default value is false

getMaximized

public Boolean getMaximized()
Is this window maximized. If true at init time, the window will be drawn maximized. To set this property at runtime use maximize() or restore().

Returns:
Boolean

setShowMaximizeButton

public void setShowMaximizeButton(Boolean showMaximizeButton)
If true, show a maximize button in the header - clicking it maximizes the Window Dynamically update showMaximizeButton to show / hide the maximizeButton

Parameters:
showMaximizeButton - showMaximizeButton Default value is false

getShowMaximizeButton

public Boolean getShowMaximizeButton()
If true, show a maximize button in the header - clicking it maximizes the Window

Returns:
Boolean

setShowFooter

public void setShowFooter(Boolean showFooter)
If true, show a footer for this Window, including resizer, statusBar, etc. This setting is commonly overridden for skinning purposes.

Parameters:
showFooter - showFooter Default value is true

getShowFooter

public Boolean getShowFooter()
If true, show a footer for this Window, including resizer, statusBar, etc. This setting is commonly overridden for skinning purposes.

Returns:
Boolean

setFooterHeight

public void setFooterHeight(int footerHeight)
                     throws IllegalStateException
The height of the footer, in pixels.

Parameters:
footerHeight - footerHeight Default value is 18
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getFooterHeight

public int getFooterHeight()
The height of the footer, in pixels.

Returns:
int

setShowStatusBar

public void setShowStatusBar(Boolean showStatusBar)
If true, show a statusBar for this Window, including resizer.

Parameters:
showStatusBar - showStatusBar Default value is true

getShowStatusBar

public Boolean getShowStatusBar()
If true, show a statusBar for this Window, including resizer.

Returns:
Boolean

setShowResizer

public void setShowResizer(Boolean showResizer)
If true, show a button in the lower right corner that allows users to resize the Window. Note that the resizer will only be displayed if the footer is showing for the window (showFooter) and canDragResize is true.

Parameters:
showResizer - showResizer Default value is true

getShowResizer

public Boolean getShowResizer()
If true, show a button in the lower right corner that allows users to resize the Window. Note that the resizer will only be displayed if the footer is showing for the window (showFooter) and canDragResize is true.

Returns:
Boolean

setStatus

public void setStatus(String status)
Text to show in the status bar of the window (if one is visible) Sets the text in the status bar of the window, redrawing if necessary.

Parameters:
status - new text for the status bar. Default value is null

getStatus

public String getStatus()
Text to show in the status bar of the window (if one is visible)

Returns:
String

addMember

public void addMember(Canvas newMember)
Add a canvas to the layout, optionally at a specific position.

Overrides:
addMember in class Layout
Parameters:
newMember - the canvas object to be added to the layout

addMember

public void addMember(Canvas newMember,
                      int position)
Add a canvas to the layout, optionally at a specific position.

Overrides:
addMember in class Layout
Parameters:
newMember - the canvas object to be added to the layout
position - the position in the layout to place newMember (starts with 0); if omitted, it will be added at the last position

shouldDismissOnEscape

public Boolean shouldDismissOnEscape()
Should this window be dismissed (same effect as pressing the "Cancel" button) when the user presses the "Escape" key?
Default behavior: if dismissOnEscape is set, just return it. Otherwise return true if this window is showing a "close" control in the header (see headerControls).

Returns:
true if the window should be dismissed when the user hits escape

centerInPage

public void centerInPage()
Centers the Window in the page. This is called automatically in window.show() if Window.autoCenter is true. Note - if the Window is a child of another widget, we center in the parent widget rather than centering in the page.


flash

public void flash()
Makes the window header flash if it's visible; if there's no header, or the header is hidden, makes the window body flash instead.

This method is executed when users click outside the bounds of a modal window so they'll notice that they have to do something with the window.


minimize

public void minimize()
Minimize the window. Fired when the user clicks the minimize button if 'this.showMinimizeButton' is true.
Default implementation shrinks the window to just the height of the header bar, hiding the body. If 'animateMinimize' is true, the resize will be animated. A restore button will be displayed in place of the minimize button when the window is minimized.


restore

public void restore()
Restores the window to its specified height and width after a call to minimize() or maximize(). Called from a click on the restore button shown in place of the minimize or maximize button when the window is minimized or maximized.
Resizing will occur as an animation if animateMinimize is true.


maximize

public void maximize()
Maximize the window. Fired when the user clicks the maximize button if 'this.showMaximizeButton' is true.
Default implementation moves the window to 0, 0 and resizes the window to "100%" on both axes, so it will fill the browser window (or the parentElement of the Window instance, if appropriate).
If 'animateMinimize' is true, the maximize will be animated. A restore button will be displayed in place of the maximize button when the window is maximized.


addCloseClickHandler

public HandlerRegistration addCloseClickHandler(CloseClickHandler handler)
Add a closeClick handler.

Handles a click on the close button of this window. The default implementation hides the window and returns false to cancel bubbling. Override this method if you want other actions to be taken.

Specified by:
addCloseClickHandler in interface HasCloseClickHandlers
Parameters:
handler - the closeClick handler
Returns:
HandlerRegistration used to remove this handler

addItem

public void addItem(Widget widget)
Adds a widget to the window.

Parameters:
item - the widget to be added

addItem

public void addItem(Canvas component)
Adds a widget to the window.

Parameters:
item - the widget to be added

removeItem

public void removeItem(Canvas component)
Removes a widget from the window.

Parameters:
item - the widget to be removed

setKeepInParentRect

public void setKeepInParentRect(Boolean keepInParentRect)
If Window.canDragReposition or Window.canDragResize is true, should the windows size and position be constrained such that it remains within the viewport of its parent element (or for top level windows, within the viewport of the browser window)?


Note: keepInParentRect affects only user drag interactions, not programmatic moves.

Overrides:
setKeepInParentRect in class Canvas
Parameters:
keepInParentRect - true to keepInParentRect

setBodyDefaults

public void setBodyDefaults(Map bodyDefaults)
Default properties for the body of the Window

Note : This is an advanced setting

Parameters:
bodyDefaults - bodyDefaults

setHeaderIconDefaults

public void setHeaderIconDefaults(Map headerIconDefaults)
This is an object literal property block specifying the various properties of the headerIcon - the icon that appears at the top left of the window and is by default the Isomorphic logo. Overrideable defaults are as follows:

setHeaderIconProperties

public void setHeaderIconProperties(Map headerIconProperties)

setHeaderIcon

public void setHeaderIcon(String imgSrc)
Sets the Window header icon.

Parameters:
imgSrc - the icon image source

setHeaderIcon

public void setHeaderIcon(String imgSrc,
                          int width,
                          int height)
Sets the Window header icon.

Parameters:
imgSrc - the icon image source
width - the icon width. default 16
height - the icon height. default 14

setHeaderControls

public void setHeaderControls(Object... headerControls)
Array of members to show in the Window header. The default value of headerControls is an Array of HeaderControls listing the standard header controls in their default order:
headerControls : [HeaderControls.HEADER_ICON, HeaderControls.HEADER_LABEL, HeaderControls.MINIMIZE_BUTTON, HeaderControls.MAXIMIZE_BUTTON, HeaderControls.CLOSE_BUTTON]

You can set headerControls to change the order of standard controls in the header. You can also omit standard controls this way, although it more efficient to use the related "show" property if available (eg Window.showMinimizeButton).
By embedding a Canvas directly in this list you can add arbitrary additional controls to the header, for example, an additional button (eg return to dock) or a DynamicForm with various kinds of input controls. Tip: custom controls need to set layoutAlign:"center" to appear vertically centered.

Parameters:
headerControls - an array containing either HeaderControl enums values or Canvas instances
See Also:
HeaderControls

setKeepInParentRect

public void setKeepInParentRect(Rectangle rectangle)
If Window.canDragReposition or Window.canDragRShowcaseDataesize is true, should the windows size and position be constrained such that it remains within the viewport of its parent element (or for top level windows, within the viewport of the browser window)? Can also be set to an array denoting an arbitrary Rectangle beyond which the window cannot be moved.
Note: keepInParentRect affects only user drag interactions, not programmatic moves.

Overrides:
setKeepInParentRect in class Canvas
Parameters:
rectangle - the rectangle bounds

getItems

public Canvas[] getItems()
The contents of the Window body. Can be specified three different ways:

Returns:
items

addMaximizeClickHandler

public HandlerRegistration addMaximizeClickHandler(MaximizeClickHandler handler)
Add a onMaximizeClick handler.

Notification method fired when the user clicks the 'maximize' button.

Specified by:
addMaximizeClickHandler in interface HasMaximizeClickHandlers
Parameters:
handler - the onMaximizeClick handler
Returns:
HandlerRegistration used to remove this handler

addMinimizeClickHandler

public HandlerRegistration addMinimizeClickHandler(MinimizeClickHandler handler)
Add a onMinimizeClick handler.

Notification method fired when the user clicks the 'minimize' button.

Specified by:
addMinimizeClickHandler in interface HasMinimizeClickHandlers
Parameters:
handler - the onMinimizeClick handler
Returns:
HandlerRegistration used to remove this handler

addRestoreClickHandler

public HandlerRegistration addRestoreClickHandler(RestoreClickHandler handler)
Add a onRestoreClick handler.

Notification method fired when the user clicks the 'restore' button.

Specified by:
addRestoreClickHandler in interface HasRestoreClickHandlers
Parameters:
handler - the onRestoreClick handler
Returns:
HandlerRegistration used to remove this handler

preloadImages

public static void preloadImages()
Preload primary window skin images