|
|||||||||
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 SmartGWT components, configured via the items
property. Windows may be isModal
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 |
---|
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled |
Field Summary |
---|
Fields inherited from class com.smartgwt.client.widgets.BaseWidget |
---|
config, configOnly, id, isElementSet |
Fields inherited from class com.google.gwt.user.client.ui.UIObject |
---|
DEBUG_ID_PREFIX |
Constructor Summary | |
---|---|
Window()
|
|
Window(com.google.gwt.core.client.JavaScriptObject jsObj)
|
Method Summary | |
---|---|
HandlerRegistration |
addCloseClickHandler(CloseClickHandler handler)
Add a closeClick handler. |
void |
addItem(Canvas component)
Adds a widget to the window. |
void |
addItem(com.google.gwt.user.client.ui.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 com.google.gwt.core.client.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. |
java.lang.Boolean |
getAnimateMinimize()
Should this window minimize, maximize, and restore as an animation, or as a simple 1-step transition? |
java.lang.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). |
java.lang.Boolean |
getAutoSize()
If true, the window is resize automatically to accommodate the contents of the body, if they would otherwise require scrolling. |
java.lang.String |
getBodyColor()
Color of the Window body. |
java.lang.String |
getBodyStyle()
Style of the Window body. |
java.lang.Boolean |
getCanDragReposition()
if true, this Window may be moved around by the user by dragging on the Window header. |
java.lang.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. |
java.lang.Boolean |
getCanFocusInHeaderButtons()
If true, the user can give the header buttons keyboard focus (by clicking on them and including them in the tabOrder) |
java.lang.String |
getContentLayout()
The layout policy that should be used for widgets within the Window body. |
java.lang.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.
If there is no header, the defaultMinimizeHeight will be used instead. |
java.lang.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. |
java.lang.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. |
java.lang.String |
getHeaderSrc()
If showHeaderBackground is true , this property provides
the URL of the background image for the header. |
java.lang.String |
getHeaderStyle()
Style for the Window header. |
java.lang.String |
getHiliteBodyColor()
Highlight color for the Window body (shown when the body is flashed). |
java.lang.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() |
java.lang.String |
getHiliteHeaderStyle()
Highlight style for the Window header. |
java.lang.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. |
java.lang.Boolean |
getMaximized()
Is this window maximized. |
AnimationAcceleration |
getMinimizeAcceleration()
Default acceleration function for performing an animated minimize / maximize. |
java.lang.Boolean |
getMinimized()
Is this window minimized. |
java.lang.Integer |
getMinimizeHeight()
Height for the window when minimized. If unset the window will shrink to the height of the header, if present, otherwise defaultMinimizeHeight |
java.lang.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. |
java.lang.String |
getModalMaskStyle()
Specifies the CSS style for the modal mask. |
static Window |
getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)
|
java.lang.Boolean |
getShowBody()
If true, draw the body contents when this Window is drawn. |
java.lang.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) . |
java.lang.Boolean |
getShowFooter()
If true, show a footer for this Window, including resizer, statusBar, etc. This setting is commonly overridden for skinning purposes. |
java.lang.Boolean |
getShowHeader()
If true, show a header for this Window. |
java.lang.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 . |
java.lang.Boolean |
getShowHeaderIcon()
If true, we show an icon on the left in the header. |
java.lang.Boolean |
getShowMaximizeButton()
If true, show a maximize button in the header - clicking it maximizes the Window |
java.lang.Boolean |
getShowMinimizeButton()
If true, show a minimize button in the header--clicking it minimizes the Window. |
java.lang.Boolean |
getShowModalMask()
If true, displays a translucent mask over the rest of the page when a modal window is displayed. |
java.lang.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. |
java.lang.Boolean |
getShowStatusBar()
If true, show a statusBar for this Window, including resizer. |
java.lang.Boolean |
getShowTitle()
Show a title (typically just text) on the header for this window. |
java.lang.String |
getSrc()
A URL to load as content for the Window's body. |
java.lang.String |
getTitle()
title for this Window, shown in the header (if drawn) |
void |
maximize()
Maximize the window. |
void |
minimize()
Minimize the window. |
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(java.lang.Boolean animateMinimize)
Should this window minimize, maximize, and restore as an animation, or as a simple 1-step transition? |
void |
setAutoCenter(java.lang.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). |
void |
setAutoSize(java.lang.Boolean autoSize)
If true, the window is resize automatically to accommodate the contents of the body, if they would otherwise require scrolling. |
void |
setBodyColor(java.lang.String bodyColor)
Color of the Window body. |
void |
setBodyDefaults(java.util.Map bodyDefaults)
Default properties for the body of the Window |
void |
setBodyStyle(java.lang.String bodyStyle)
Style of the Window body. |
void |
setCanDragReposition(java.lang.Boolean canDragReposition)
if true, this Window may be moved around by the user by dragging on the Window header. |
void |
setCanDragResize(java.lang.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(java.lang.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(java.lang.String contentLayout)
The layout policy that should be used for widgets within the Window body. |
void |
setContentsType(java.lang.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.
If there is no header, the defaultMinimizeHeight will be used instead. |
void |
setDismissOnEscape(java.lang.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(java.lang.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(java.lang.Object... headerControls)
Array of members to show in the Window header. |
void |
setHeaderIcon(java.lang.String imgSrc)
Sets the Window header icon. |
void |
setHeaderIcon(java.lang.String imgSrc,
int width,
int height)
Sets the Window header icon. |
void |
setHeaderIconDefaults(java.util.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(java.util.Map headerIconProperties)
|
void |
setHeaderSrc(java.lang.String headerSrc)
If showHeaderBackground is true , this property provides
the URL of the background image for the header. |
void |
setHeaderStyle(java.lang.String headerStyle)
Style for the Window header. |
void |
setHiliteBodyColor(java.lang.String hiliteBodyColor)
Highlight color for the Window body (shown when the body is flashed). |
void |
setHiliteHeaderSrc(java.lang.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(java.lang.String hiliteHeaderStyle)
Highlight style for the Window header. |
void |
setIsModal(java.lang.Boolean isModal)
If true, when shown this Window will intercept and block events to all other existing components on the page. |
void |
setKeepInParentRect(java.lang.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(java.lang.Boolean maximized)
Is this window maximized. |
void |
setMinimizeAcceleration(AnimationAcceleration minimizeAcceleration)
Default acceleration function for performing an animated minimize / maximize. |
void |
setMinimized(java.lang.Boolean minimized)
Is this window minimized. |
void |
setMinimizeHeight(java.lang.Integer minimizeHeight)
Height for the window when minimized. If unset the window will shrink to the height of the header, if present, otherwise defaultMinimizeHeight |
void |
setMinimizeTime(java.lang.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(java.lang.String modalMaskStyle)
Specifies the CSS style for the modal mask. |
void |
setShowBody(java.lang.Boolean showBody)
If true, draw the body contents when this Window is drawn. |
void |
setShowCloseButton(java.lang.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(java.lang.Boolean showFooter)
If true, show a footer for this Window, including resizer, statusBar, etc. This setting is commonly overridden for skinning purposes. |
void |
setShowHeader(java.lang.Boolean showHeader)
If true, show a header for this Window. |
void |
setShowHeaderBackground(java.lang.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(java.lang.Boolean showHeaderIcon)
If true, we show an icon on the left in the header. |
void |
setShowMaximizeButton(java.lang.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(java.lang.Boolean showMinimizeButton)
If true, show a minimize button in the header--clicking it minimizes the Window. |
void |
setShowModalMask(java.lang.Boolean showModalMask)
If true, displays a translucent mask over the rest of the page when a modal window is displayed. |
void |
setShowResizer(java.lang.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. |
void |
setShowStatusBar(java.lang.Boolean showStatusBar)
If true, show a statusBar for this Window, including resizer. |
void |
setShowTitle(java.lang.Boolean showTitle)
Show a title (typically just text) on the header for this window. |
void |
setSrc(java.lang.String src)
A URL to load as content for the Window's body. |
void |
setStatus(java.lang.String statusString)
Sets the text in the status bar of the window, redrawing if necessary. |
void |
setTitle(java.lang.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. |
java.lang.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.google.gwt.user.client.ui.Widget |
---|
doAttachChildren, doDetachChildren, getParent, isAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent |
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, sinkEvents, 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 |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Constructor Detail |
---|
public Window()
public Window(com.google.gwt.core.client.JavaScriptObject jsObj)
Method Detail |
---|
public static Window getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)
protected com.google.gwt.core.client.JavaScriptObject create()
create
in class VLayout
public void setCanDragReposition(java.lang.Boolean canDragReposition)
setCanDragReposition
in class Canvas
canDragReposition
- canDragReposition Default value is truepublic java.lang.Boolean getCanDragReposition()
getCanDragReposition
in class Canvas
public void setCanDragResize(java.lang.Boolean canDragResize)
setCanDragResize
in class Canvas
canDragResize
- canDragResize Default value is falsepublic java.lang.Boolean getCanDragResize()
getCanDragResize
in class Canvas
public void setIsModal(java.lang.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 java.lang.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 setShowModalMask(java.lang.Boolean showModalMask) throws java.lang.IllegalStateException
showModalMask
- showModalMask Default value is null
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Boolean getShowModalMask()
public void setModalMaskOpacity(int modalMaskOpacity) throws java.lang.IllegalStateException
modalMaskOpacity
- modalMaskOpacity Default value is 50
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic int getModalMaskOpacity()
public void setModalMaskStyle(java.lang.String modalMaskStyle) throws java.lang.IllegalStateException
modalMaskStyle
- modalMaskStyle Default value is "modalMask"
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getModalMaskStyle()
public void setAutoCenter(java.lang.Boolean autoCenter)
autoCenter
- autoCenter Default value is autoCenterpublic java.lang.Boolean getAutoCenter()
public void setDismissOnOutsideClick(java.lang.Boolean dismissOnOutsideClick)
dismissOnOutsideClick
- dismissOnOutsideClick Default value is falsepublic java.lang.Boolean getDismissOnOutsideClick()
public void setDismissOnEscape(java.lang.Boolean dismissOnEscape)
If unset default behavior depends on whether a close / cancel button is visible for this item.
dismissOnEscape
- dismissOnEscape Default value is nullpublic java.lang.Boolean getDismissOnEscape()
If unset default behavior depends on whether a close / cancel button is visible for this item.
public void setShowBody(java.lang.Boolean showBody)
Note : This is an advanced setting
showBody
- showBody Default value is truepublic java.lang.Boolean getShowBody()
public void setBodyStyle(java.lang.String bodyStyle)
bodyStyle
- bodyStyle Default value is "windowBody"public java.lang.String getBodyStyle()
public void setBodyColor(java.lang.String bodyColor)
bodyColor
- bodyColor Default value is "#FFFFFF"public java.lang.String getBodyColor()
public void setHiliteBodyColor(java.lang.String hiliteBodyColor)
hiliteBodyColor
- hiliteBodyColor Default value is "#EEEEEE"public java.lang.String getHiliteBodyColor()
public void setSrc(java.lang.String src)
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.
src
- URL of new contents to be displayed in the window body. Default value is nullpublic java.lang.String getSrc()
Note that setting window.src is essentially a shortcut for setting items
to a single HTMLflow with a specified contentsURL
.
public void setContentsType(java.lang.String contentsType) throws java.lang.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"
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.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.
public void setContentLayout(java.lang.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"public java.lang.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.
public void setAutoSize(java.lang.Boolean autoSize)
autoSize
autoSize
- true if the window should auto-size to its content. Default value is falsepublic java.lang.Boolean getAutoSize()
public void setShowHeader(java.lang.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 showEdges
. 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 truepublic java.lang.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 showEdges
. 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"
public void setShowHeaderBackground(java.lang.Boolean showHeaderBackground) throws java.lang.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
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Boolean getShowHeaderBackground()
headerSrc
and
hiliteHeaderSrc
, otherwise the background will be styled according to
headerStyle
/ hiliteHeaderStyle
.
public void setHeaderStyle(java.lang.String headerStyle)
Note : This is an advanced setting
headerStyle
- headerStyle Default value is "WindowHeader"public java.lang.String getHeaderStyle()
public void setHeaderSrc(java.lang.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" | nullpublic java.lang.String getHeaderSrc()
showHeaderBackground
is true
, this property provides
the URL of the background image for the header.
public void setHiliteHeaderStyle(java.lang.String hiliteHeaderStyle)
flash()
Note : This is an advanced setting
hiliteHeaderStyle
- hiliteHeaderStyle Default value is "WindowHeader"public java.lang.String getHiliteHeaderStyle()
flash()
public void setHiliteHeaderSrc(java.lang.String hiliteHeaderSrc)
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
hiliteHeaderSrc
- hiliteHeaderSrc Default value is "[SKIN]Window/headerGradient_hilite.gif" | nullpublic java.lang.String getHiliteHeaderSrc()
showHeaderBackground
is true, this governs the URL of the image to
use in the header's highlighted state when the window is flash()
public void setShowTitle(java.lang.Boolean showTitle)
showTitle
- showTitle Default value is truepublic java.lang.Boolean getShowTitle()
public void setTitle(java.lang.String title)
setTitle
in class Canvas
title
- new title. Default value is "Untitled Window"public java.lang.String getTitle()
getTitle
in class Canvas
public void setShowHeaderIcon(java.lang.Boolean showHeaderIcon)
showHeaderIcon
to show / hide the headerIcon
showHeaderIcon
- showHeaderIcon Default value is truepublic java.lang.Boolean getShowHeaderIcon()
public void setCanFocusInHeaderButtons(java.lang.Boolean canFocusInHeaderButtons)
Note : This is an advanced setting
canFocusInHeaderButtons
- canFocusInHeaderButtons Default value is falsepublic java.lang.Boolean getCanFocusInHeaderButtons()
public void setShowCloseButton(java.lang.Boolean showCloseButton)
addCloseClickHandler(com.smartgwt.client.widgets.events.CloseClickHandler)
.
Dynamically update showCloseButton
to show / hide the closeButton
showCloseButton
- showCloseButton Default value is truepublic java.lang.Boolean getShowCloseButton()
addCloseClickHandler(com.smartgwt.client.widgets.events.CloseClickHandler)
.
public void setShowMinimizeButton(java.lang.Boolean showMinimizeButton)
showMinimizeButton
to show / hide the minimizeButton
showMinimizeButton
- showMinimizeButton Default value is truepublic java.lang.Boolean getShowMinimizeButton()
public void setMinimized(java.lang.Boolean minimized)
minimize()
or restore()
.
minimized
- minimized Default value is falsepublic java.lang.Boolean getMinimized()
minimize()
or restore()
.
public 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 16public int getDefaultMinimizeHeight()
minimizeHeight
is unset, by the window will shrink to the height of the
header when minimized.
defaultMinimizeHeight
will be used instead.
public void setMinimizeHeight(java.lang.Integer minimizeHeight)
defaultMinimizeHeight
Note : This is an advanced setting
minimizeHeight
- minimizeHeight Default value is nullpublic java.lang.Integer getMinimizeHeight()
defaultMinimizeHeight
public void setAnimateMinimize(java.lang.Boolean animateMinimize)
Note : This is an advanced setting
animateMinimize
- animateMinimize Default value is nullpublic java.lang.Boolean getAnimateMinimize()
public void setMinimizeTime(java.lang.Integer minimizeTime)
canvas.animationTime
.
Note : This is an advanced setting
minimizeTime
- minimizeTime Default value is nullpublic java.lang.Integer getMinimizeTime()
canvas.animationTime
.
public void setMinimizeAcceleration(AnimationAcceleration minimizeAcceleration)
this.animateAcceleration
will be used by default instead
Note : This is an advanced setting
minimizeAcceleration
- minimizeAcceleration Default value is nullpublic AnimationAcceleration getMinimizeAcceleration()
this.animateAcceleration
will be used by default instead
public void setMaximized(java.lang.Boolean maximized)
maximize()
or restore()
.
maximized
- maximized Default value is falsepublic java.lang.Boolean getMaximized()
maximize()
or restore()
.
public void setShowMaximizeButton(java.lang.Boolean showMaximizeButton)
showMaximizeButton
to show / hide the maximizeButton
showMaximizeButton
- showMaximizeButton Default value is falsepublic java.lang.Boolean getShowMaximizeButton()
public void setShowFooter(java.lang.Boolean showFooter)
showFooter
- showFooter Default value is truepublic java.lang.Boolean getShowFooter()
public void setFooterHeight(int footerHeight) throws java.lang.IllegalStateException
footerHeight
- footerHeight Default value is 18
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic int getFooterHeight()
public void setShowStatusBar(java.lang.Boolean showStatusBar)
showStatusBar
- showStatusBar Default value is truepublic java.lang.Boolean getShowStatusBar()
public void setShowResizer(java.lang.Boolean showResizer)
showFooter
) and canDragResize
is true.
showResizer
- showResizer Default value is truepublic java.lang.Boolean getShowResizer()
showFooter
) and canDragResize
is true.
public void setStatus(java.lang.String statusString)
statusString
- new text for the status barpublic void addMember(Canvas newMember)
addMember
in class Layout
newMember
- the canvas object to be added to the layoutpublic void addMember(Canvas newMember, int position)
addMember
in class Layout
newMember
- 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 positionpublic java.lang.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 void centerInPage()
public 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 minimize()
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()
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.animateMinimize
is true.
public void maximize()
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 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 HasCloseClickHandlers
handler
- the closeClick handler
HandlerRegistration
used to remove this handlerpublic void addItem(com.google.gwt.user.client.ui.Widget widget)
item
- the widget to be addedpublic void addItem(Canvas component)
item
- the widget to be addedpublic void removeItem(Canvas component)
item
- the widget to be removedpublic void setKeepInParentRect(java.lang.Boolean keepInParentRect)
setKeepInParentRect
in class Canvas
keepInParentRect
- true to keepInParentRectpublic void setBodyDefaults(java.util.Map bodyDefaults)
Note : This is an advanced setting
bodyDefaults
- bodyDefaultspublic void setHeaderIconDefaults(java.util.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(java.util.Map headerIconProperties)
public void setHeaderIcon(java.lang.String imgSrc)
imgSrc
- the icon image sourcepublic void setHeaderIcon(java.lang.String imgSrc, int width, int height)
imgSrc
- the icon image sourcewidth
- the icon width. default 16height
- the icon height. default 14public void setHeaderControls(java.lang.Object... headerControls)
HeaderControls
listing the standard header controls in their default order:
headerControls
- an array containing either HeaderControl enums values or Canvas instancesHeaderControls
public void setKeepInParentRect(Rectangle rectangle)
setKeepInParentRect
in class Canvas
rectangle
- the rectangle boundspublic Canvas[] getItems()
public HandlerRegistration addMaximizeClickHandler(MaximizeClickHandler handler)
Notification method fired when the user clicks the 'maximize' button.
addMaximizeClickHandler
in interface HasMaximizeClickHandlers
handler
- 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 HasMinimizeClickHandlers
handler
- 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 HasRestoreClickHandlers
handler
- the onRestoreClick handler
HandlerRegistration
used to remove this handler
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |