|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.smartgwt.client.widgets.BaseWidget
com.smartgwt.client.widgets.Canvas
com.smartgwt.client.widgets.layout.Layout
com.smartgwt.client.widgets.layout.VLayout
com.smartgwt.client.widgets.Window
public class Window
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 autoChildren 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 shortcuts 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)
Same as Layout.addMember. |
void |
addMember(Canvas newMember,
int position)
Same as Layout.addMember. |
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 resizer 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 flashed |
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 minimize / 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 Window.closeClick. |
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 Window.minimize or Window.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 resizer 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. |
static void |
setDefaultProperties(Window windowProperties)
Class level method to set the default properties of this class. |
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 |
setFooterControls(Object... footerControls)
Array of members to show in the Window footer. |
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 flashed |
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 minimize / 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 Window.closeClick. |
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 If this method is called after the component has been drawn/initialized: 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) If this method is called after the component has been drawn/initialized: 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) If this method is called after the component has been drawn/initialized: 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.VLayout |
|---|
setDefaultProperties |
| Methods inherited from class com.google.gwt.user.client.ui.Widget |
|---|
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, 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, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent, 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 |
|---|
public Window()
public Window(JavaScriptObject jsObj)
| Method Detail |
|---|
public static Window getOrCreateRef(JavaScriptObject jsObj)
protected JavaScriptObject create()
create in class VLayoutpublic void setAnimateMinimize(Boolean animateMinimize)
Note : This is an advanced setting
animateMinimize - animateMinimize Default value is nullAppearance overview and related methods,
Window Minimize Examplepublic Boolean getAnimateMinimize()
Appearance overview and related methods,
Window Minimize Examplepublic void setAutoCenter(Boolean autoCenter)
autoCenter - autoCenter Default value is autoCenterAppearance overview and related methodspublic Boolean getAutoCenter()
Appearance overview and related methodspublic void setAutoSize(Boolean autoSize)
autoSize
autoSize - true if the window should auto-size to its content. Default value is falseAppearance overview and related methods,
Auto Size Examplepublic Boolean getAutoSize()
Appearance overview and related methods,
Auto Size Examplepublic void setBodyColor(String bodyColor)
bodyColor - bodyColor Default value is "#FFFFFF"flash(),
Appearance overview and related methodspublic String getBodyColor()
flash(),
Appearance overview and related methodspublic void setBodyStyle(String bodyStyle)
bodyStyle - bodyStyle Default value is "windowBody"Appearance overview and related methodspublic String getBodyStyle()
Appearance overview and related methodspublic void setCanDragReposition(Boolean canDragReposition)
setCanDragReposition in class CanvascanDragReposition - canDragReposition Default value is truesetShowHeader(java.lang.Boolean)public Boolean getCanDragReposition()
getCanDragReposition in class CanvasgetShowHeader()public void setCanDragResize(Boolean canDragResize)
setCanDragResize in class CanvascanDragResize - canDragResize Default value is falsesetShowResizer(java.lang.Boolean)public Boolean getCanDragResize()
getCanDragResize in class CanvasgetShowResizer()public void setCanFocusInHeaderButtons(Boolean canFocusInHeaderButtons)
Note : This is an advanced setting
canFocusInHeaderButtons - canFocusInHeaderButtons Default value is falseFocus overview and related methodspublic Boolean getCanFocusInHeaderButtons()
Focus overview and related methodspublic void setContentLayout(String contentLayout)
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
contentLayout - contentLayout Default value is "vertical"Appearance overview and related methodspublic String getContentLayout()
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.
Appearance overview and related methods
public void setContentsType(String contentsType)
throws IllegalStateException
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.
contentsType - contentsType Default value is "page"
IllegalStateException - this property cannot be changed after the component has been createdsetSrc(java.lang.String),
Appearance overview and related methodspublic String getContentsType()
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.
getSrc(),
Appearance overview and related methodspublic void setDefaultMinimizeHeight(int defaultMinimizeHeight)
minimizeHeight is unset, by the window will shrink to
the height of the header when minimized. defaultMinimizeHeight will be used
instead.
Note : This is an advanced setting
defaultMinimizeHeight - defaultMinimizeHeight Default value is 16Appearance overview and related methodspublic int getDefaultMinimizeHeight()
minimizeHeight is unset, by the window will shrink to
the height of the header when minimized. defaultMinimizeHeight will be used
instead.
Appearance overview and related methodspublic void setDismissOnEscape(Boolean dismissOnEscape)
If unset default behavior depends on whether a close / cancel button is visible for this item.
dismissOnEscape - dismissOnEscape Default value is nullshouldDismissOnEscape()public Boolean getDismissOnEscape()
If unset default behavior depends on whether a close / cancel button is visible for this item.
shouldDismissOnEscape()public void setDismissOnOutsideClick(Boolean dismissOnOutsideClick)
dismissOnOutsideClick - dismissOnOutsideClick Default value is falsesetIsModal(java.lang.Boolean)public Boolean getDismissOnOutsideClick()
getIsModal()
public void setFooterHeight(int footerHeight)
throws IllegalStateException
footerHeight - footerHeight Default value is 18
IllegalStateException - this property cannot be changed after the component has been createdAppearance overview and related methodspublic int getFooterHeight()
Appearance overview and related methodspublic void setHeaderSrc(String headerSrc)
showHeaderBackground is true, this
property provides the URL of the background image for the header.
Note : This is an advanced setting
headerSrc - headerSrc Default value is "[SKIN]Window/headerGradient.gif" | nullAppearance overview and related methodspublic String getHeaderSrc()
showHeaderBackground is true, this
property provides the URL of the background image for the header.
Appearance overview and related methodspublic void setHeaderStyle(String headerStyle)
Note : This is an advanced setting
headerStyle - headerStyle Default value is "WindowHeader"Appearance overview and related methodspublic String getHeaderStyle()
Appearance overview and related methodspublic void setHiliteBodyColor(String hiliteBodyColor)
hiliteBodyColor - hiliteBodyColor Default value is "#EEEEEE"flash(),
Appearance overview and related methodspublic String getHiliteBodyColor()
flash(),
Appearance overview and related methodspublic void setHiliteHeaderSrc(String hiliteHeaderSrc)
showHeaderBackground is true, this governs the URL
of the image to use in the header's highlighted state when the window is flashed
Note : This is an advanced setting
hiliteHeaderSrc - hiliteHeaderSrc Default value is "[SKIN]Window/headerGradient_hilite.gif" | nullAppearance overview and related methodspublic String getHiliteHeaderSrc()
showHeaderBackground is true, this governs the URL
of the image to use in the header's highlighted state when the window is flashed
Appearance overview and related methodspublic void setHiliteHeaderStyle(String hiliteHeaderStyle)
flashed
Note : This is an advanced setting
hiliteHeaderStyle - hiliteHeaderStyle Default value is "WindowHeader"Appearance overview and related methodspublic String getHiliteHeaderStyle()
flashed
Appearance overview and related methodspublic void setIsModal(Boolean isModal)
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.
isModal - isModal Default value is falsepublic Boolean getIsModal()
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.
public void setMaximized(Boolean maximized)
Window.maximize or Window.restore.
maximized - maximized Default value is falseAppearance overview and related methodspublic Boolean getMaximized()
Window.maximize or Window.restore.
Appearance overview and related methodspublic void setMinimizeAcceleration(AnimationAcceleration minimizeAcceleration)
this.animateAcceleration will be used by default instead
Note : This is an advanced setting
minimizeAcceleration - minimizeAcceleration Default value is nullAppearance overview and related methodspublic AnimationAcceleration getMinimizeAcceleration()
this.animateAcceleration will be used by default instead
Appearance overview and related methodspublic void setMinimized(Boolean minimized)
Window.minimize or Window.restore.
minimized - minimized Default value is falseAppearance overview and related methodspublic Boolean getMinimized()
Window.minimize or Window.restore.
Appearance overview and related methodspublic void setMinimizeHeight(Integer minimizeHeight)
this.defaultMinimizeHeight
Note : This is an advanced setting
minimizeHeight - minimizeHeight Default value is nullAppearance overview and related methodspublic Integer getMinimizeHeight()
this.defaultMinimizeHeight
Appearance overview and related methodspublic void setMinimizeTime(Integer minimizeTime)
canvas.animationTime.
Note : This is an advanced setting
minimizeTime - minimizeTime Default value is nullAppearance overview and related methods,
Window Minimize Examplepublic Integer getMinimizeTime()
canvas.animationTime.
Appearance overview and related methods,
Window Minimize Example
public void setModalMaskOpacity(int modalMaskOpacity)
throws IllegalStateException
modalMaskOpacity - modalMaskOpacity Default value is 50
IllegalStateException - this property cannot be changed after the component has been createdcom.smartgwt.client.widgets.Window#setModalMask,
Appearance overview and related methodspublic int getModalMaskOpacity()
com.smartgwt.client.widgets.Window#getModalMask,
Appearance overview and related methods
public void setModalMaskStyle(String modalMaskStyle)
throws IllegalStateException
modalMaskStyle - modalMaskStyle Default value is "modalMask"
IllegalStateException - this property cannot be changed after the component has been createdcom.smartgwt.client.widgets.Window#setModalMask,
Appearance overview and related methodspublic String getModalMaskStyle()
com.smartgwt.client.widgets.Window#getModalMask,
Appearance overview and related methodspublic void setShowBody(Boolean showBody)
Note : This is an advanced setting
showBody - showBody Default value is trueAppearance overview and related methodspublic Boolean getShowBody()
Appearance overview and related methodspublic void setShowCloseButton(Boolean showCloseButton)
Window.closeClick.
showCloseButton to show / hide the closeButton
showCloseButton - showCloseButton Default value is trueAppearance overview and related methodspublic Boolean getShowCloseButton()
Window.closeClick.
Appearance overview and related methodspublic void setShowFooter(Boolean showFooter)
showFooter - showFooter Default value is trueAppearance overview and related methods,
Footer Examplepublic Boolean getShowFooter()
Appearance overview and related methods,
Footer Examplepublic void setShowHeader(Boolean showHeader)
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
showHeader - showHeader Default value is trueAppearance overview and related methodspublic Boolean getShowHeader()
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"
Appearance overview and related methods
public void setShowHeaderBackground(Boolean showHeaderBackground)
throws IllegalStateException
headerSrc and hiliteHeaderSrc, otherwise the background
will be styled according to headerStyle / hiliteHeaderStyle.
Note : This is an advanced setting
showHeaderBackground - showHeaderBackground Default value is varies
IllegalStateException - this property cannot be changed after the component has been createdAppearance overview and related methodspublic Boolean getShowHeaderBackground()
headerSrc and hiliteHeaderSrc, otherwise the background
will be styled according to headerStyle / hiliteHeaderStyle.
Appearance overview and related methodspublic void setShowHeaderIcon(Boolean showHeaderIcon)
showHeaderIcon to show / hide the headerIcon
showHeaderIcon - showHeaderIcon Default value is trueAppearance overview and related methodspublic Boolean getShowHeaderIcon()
Appearance overview and related methodspublic void setShowMaximizeButton(Boolean showMaximizeButton)
showMaximizeButton to show / hide the maximizeButton
showMaximizeButton - showMaximizeButton Default value is falseAppearance overview and related methodspublic Boolean getShowMaximizeButton()
Appearance overview and related methodspublic void setShowMinimizeButton(Boolean showMinimizeButton)
showMinimizeButton to show / hide the minimizeButton
showMinimizeButton - showMinimizeButton Default value is trueAppearance overview and related methodspublic Boolean getShowMinimizeButton()
Appearance overview and related methods
public void setShowModalMask(Boolean showModalMask)
throws IllegalStateException
showModalMask - showModalMask Default value is null
IllegalStateException - this property cannot be changed after the component has been createdcom.smartgwt.client.widgets.Window#setModalMask,
Appearance overview and related methodspublic Boolean getShowModalMask()
com.smartgwt.client.widgets.Window#getModalMask,
Appearance overview and related methodspublic void setShowResizer(Boolean showResizer)
showFooter) and canDragResize is true.
showResizer - showResizer Default value is trueAppearance overview and related methodspublic Boolean getShowResizer()
showFooter) and canDragResize is true.
Appearance overview and related methodspublic void setShowStatusBar(Boolean showStatusBar)
showStatusBar - showStatusBar Default value is trueAppearance overview and related methodspublic Boolean getShowStatusBar()
Appearance overview and related methodspublic void setShowTitle(Boolean showTitle)
showTitle - showTitle Default value is trueAppearance overview and related methodspublic Boolean getShowTitle()
Appearance overview and related methodspublic void setSrc(String src)
Note that setting window.src is essentially a shortcut for setting items to a single HTMLflow with a specified contentsURL.
If this method is called after the component has been drawn/initialized:
Sets the URL of the contents to display in the body of the window, redrawing if necessary.
src - URL of new contents to be displayed in the window body. Default value is nullsetContentsType(java.lang.String),
Appearance overview and related methodspublic String getSrc()
Note that setting window.src is essentially a shortcut for setting items to a single HTMLflow with a specified contentsURL.
getContentsType(),
Appearance overview and related methodspublic void setStatus(String status)
status - new text for the status bar. Default value is nullAppearance overview and related methodspublic String getStatus()
Appearance overview and related methodspublic void setTitle(String title)
setTitle in class Canvastitle - new title. Default value is "Untitled Window"Appearance overview and related methodspublic String getTitle()
getTitle in class CanvasAppearance overview and related methodspublic void addMember(Canvas newMember)
Layout.addMember. Note that in order to add items
to body, you use Window.addItem rather than addMember. Adding a member to a Window adds the member as a sibling to the
header, body and other built-in Window subcomponents.
addMember in class LayoutnewMember - the canvas object to be added to the layout
public void addMember(Canvas newMember,
int position)
Layout.addMember. Note that in order to add items
to body, you use Window.addItem rather than addMember. Adding a member to a Window adds the member as a sibling to the
header, body and other built-in Window subcomponents.
addMember in class LayoutnewMember - the canvas object to be added to the layoutposition - the position in the layout to place newMember (starts with 0); if omitted, it will be
added at the last positioncom.smartgwt.client.widgets.Window#addMemberspublic void centerInPage()
public HandlerRegistration addCloseClickHandler(CloseClickHandler 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.
addCloseClickHandler in interface HasCloseClickHandlershandler - the closeClick handler
HandlerRegistration used to remove this handlerpublic void flash()
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.
public void maximize()
this.showMaximizeButton is true.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).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.
public void minimize()
this.showMinimizeButton is true.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.
public void restore()
Window.minimize or Window.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.animateMinimize is
true.
public Boolean shouldDismissOnEscape()
dismissOnEscape is set, just
return it. Otherwise return true if this window is showing a "close" control in the header (see headerControls).
public static void setDefaultProperties(Window windowProperties)
Note: This method is intended for setting default attributes only and will effect all instances of the underlying class (including those automatically generated in JavaScript). This method should not be used to apply standard EventHandlers or override methods for a class - use a custom subclass instead.
windowProperties - properties that should be used as new defaults when instances of this class are createdpublic void addItem(Widget widget)
widget - the widget to be addedpublic void addItem(Canvas component)
component - the widget to be addedpublic void removeItem(Canvas component)
component - the widget to be removedpublic void setKeepInParentRect(Boolean keepInParentRect)
setKeepInParentRect in class CanvaskeepInParentRect - true to keepInParentRectpublic void setBodyDefaults(Map bodyDefaults)
Note : This is an advanced setting
bodyDefaults - bodyDefaultspublic void setHeaderIconDefaults(Map headerIconDefaults)
16 and specifies the width of the headerIcon. 14 and specifies the height of the headerIcon. "[SKIN]/Window/minimize.gif" and specifies the image for the headerIcon.
Note : This is an advanced setting
headerIconDefaults - headerIconDefaultspublic void setHeaderIconProperties(Map headerIconProperties)
public void setHeaderIcon(String imgSrc)
imgSrc - the icon image source
public void setHeaderIcon(String imgSrc,
int width,
int height)
imgSrc - the icon image sourcewidth - the icon width. default 16height - the icon height. default 14public void setHeaderControls(Object... headerControls)
HeaderControls listing the standard header controls in their default order:
headerControls - an array containing either HeaderControl enums values or Canvas instancesHeaderControlspublic void setFooterControls(Object... footerControls)
FooterControls listing the standard footer controls in their default order:
footerControls - an array containing either FooterControl enums values or Canvas instancesFooterControlspublic void setKeepInParentRect(Rectangle rectangle)
setKeepInParentRect in class Canvasrectangle - the rectangle boundspublic Canvas[] getItems()
public HandlerRegistration addMaximizeClickHandler(MaximizeClickHandler handler)
Notification method fired when the user clicks the 'maximize' button.
addMaximizeClickHandler in interface HasMaximizeClickHandlershandler - the onMaximizeClick handler
HandlerRegistration used to remove this handlerpublic HandlerRegistration addMinimizeClickHandler(MinimizeClickHandler handler)
Notification method fired when the user clicks the 'minimize' button.
addMinimizeClickHandler in interface HasMinimizeClickHandlershandler - the onMinimizeClick handler
HandlerRegistration used to remove this handlerpublic HandlerRegistration addRestoreClickHandler(RestoreClickHandler handler)
Notification method fired when the user clicks the 'restore' button.
addRestoreClickHandler in interface HasRestoreClickHandlershandler - the onRestoreClick handler
HandlerRegistration used to remove this handlerpublic static void preloadImages()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||