Child pages
  • JSWindow

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Cache
indextrue
refresh100d
showRefreshtrue
iddoc
titleRefresh page
showDatetrue
retryEnable

servoy sReturnTypes2100%height: 30px;2Supported ClientssWordListSmartClientsWordListWebClientsWordListNGClient

servoy sSummary12%30%58%height: 30px;3Constants SummaryValue used for x, y, width, height of initial bounds when you want the window to auto-determine bounds when shown for the first time.Window type constant that identifies a non-modal dialog type.Value that can be used for bounds in order to specify that a dialog/window should completely fill the screen.c Window type constant that identifies a modal dialog type.Window type constant that identifies a window type.

servoy sSummary12%30%58%height: 30px;3Property SummaryGet the current controller from the window/dialog.Gets/Sets the opacity property.Gets/Sets whether or not this window can be resized by the user (default true).Tells whether or not the bounds of this window should be stored/persisted (default false).Gets/Sets the title text.Gets/Sets the transparency property.Gets/Sets the undecorated property.

servoy sSummary12%30%58%height: 30px;3Methods SummaryvoidFrees the resources allocated by this window.Returns the height.Returns the window name.Returns the parent JSWindow, if available.Returns the window type.Returns the width.Returns the x coordinate.Returns the y coordinate.Hides the window.Returns true if the window is visible, false otherwise.voidDeletes the window's currently stored bounds.voidSets the dialog CSS class, can not be used to alter it when already showing, this should be set before the dialog is used.voidSets the initial window bounds.voidSet the window location.voidSet the window size.voidShows the given form(form name, form object or JSForm) in this window.voidSets whether or not this window should have a text tool bar.voidShows this window behind other windows, if possible.voidBring this window in front of other windows, if possible.

constantservoy sDetail2100%height:30px2Constants DetailsDEFAULTname

DEFAULT

dessIndent
Value used for x, y, width, height of initial bounds when you want the window to auto-determine bounds when shown for the first time.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRowDIALOGname

DIALOG

dessIndent
Window type constant that identifies a non-modal dialog type.
Non-modal dialogs will allow the user to interact with parent windows, but are less independent then windows with WINDOW type.
Dialogs will stay on top of parent windows and are less accessible through the OS window manager. In web-client dialogs will not
open in a separate browser window.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
FULL_SCREENname

FULL_SCREEN

dessIndent
Value that can be used for bounds in order to specify that a dialog/window should completely fill the screen.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
MODAL_DIALOGname

MODAL_DIALOG

dessIndent
c
Window type constant that identifies a modal dialog type. Modal dialogs will not allow the user to interact with the parent window(s) until closed.
Dialogs will stay on top of parent windows and are less accessible through the OS window manager. In web-client dialogs will not
open in a separate browser window. NOTE: no code is executed in Smart Client after a modal dialog is shown (the show operation blocks) until this dialog closes.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
WINDOWname

WINDOW

dessIndent
Window type constant that identifies a window type. WINDOW type is the most independent type of window. It will be more accessible through the OS window
manager, it can appear both in front of and under other windows and it doesn't block user interaction for other windows. In web-client windows will
open in a separate browser window.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow

propertyservoy sDetail2100%height:30px2Property Detailscontrollername

controller

dessIndent
Get the current controller from the window/dialog.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRowopacityname

opacity

dessIndent
Gets/Sets the opacity property. By default will have value 1 (completely opaque), and can be assigned to values between 0 and 1.
If set then window will also be undecorated. This should be set before the dialog/window is shown, otherwise it has no effect.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
resizablename

resizable

dessIndent
Gets/Sets whether or not this window can be resized by the user (default true).
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
storeBoundsname

storeBounds

dessIndent
Tells whether or not the bounds of this window should be stored/persisted (default false).
If true, the window's bounds will be stored when the window is closed. Stored bounds will be used when the window is shown again instead of initialBounds.
For non resizable windows, only location is stored/persisted.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
titlename

title

dessIndent
Gets/Sets the title text.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
transparentname

transparent

dessIndent
Gets/Sets the transparency property.
NOTE: For smart clients, the window must be undecorated or the
servoy.smartclient.allowLAFWindowDecoration property set to true
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
undecoratedname

undecorated

dessIndent
Gets/Sets the undecorated property.
If set then this window will not have any decoration and can't be moved/resized or closed. This should be set before dialog/window is shown, otherwise has no effect.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow

functionservoy sDetail2100%height:30px2Methods Detailsdestroyname

destroy()

dessIndent
Frees the resources allocated by this window. If window is visible, it will close it first.
The window will no longer be available with application.getWindow('windowName') and will no longer be usable.

The main application window cannot be destroyed.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRowgetHeightname

getHeight()

dessIndent
Returns the height.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getNamename

getName()

dessIndent
Returns the window name. It will be null in case of main application frame.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getParentname

getParent()

dessIndent
Returns the parent JSWindow, if available.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getTypename

getType()

dessIndent
Returns the window type.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getWidthname

getWidth()

dessIndent
Returns the width.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getXname

getX()

dessIndent
Returns the x coordinate.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getYname

getY()

dessIndent
Returns the y coordinate.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
hidename

hide()

dessIndent
Hides the window. It can be shown again using window.show(), controller.show() or controller.showRecords().
The main application window cannot be hidden.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
isVisiblename

isVisible()

dessIndent
Returns true if the window is visible, false otherwise.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
resetBoundsname

resetBounds()

dessIndent
Deletes the window's currently stored bounds. It will only affect the next show of the window.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
setCSSClassname

setCSSClass(cssClassName)

dessIndent
Sets the dialog CSS class, can not be used to alter it when already showing, this should be set before the dialog is used.
See sample code for examples of CSS classes for display customizations
prs

Parameters

sIndentcssClassNameCSS class name
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
setInitialBoundsname

setInitialBounds(x, y, width, height)

dessIndent
Sets the initial window bounds.
The initial bounds are only used the first time this window is shown (what first show means depends on storeBounds property).
prs

Parameters

sIndentxthe initial x coordinate of the window. Can be JSWindow.DEFAULT, JSWindow.FULL_SCREEN.ythe initial y coordinate of the window. Can be JSWindow.DEFAULT, JSWindow.FULL_SCREEN.widththe initial width of the window. Can be JSWindow.DEFAULT, JSWindow.FULL_SCREEN.heightthe initial height of the window. Can be JSWindow.DEFAULT, JSWindow.FULL_SCREEN.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
setLocationname

setLocation(x, y)

dessIndent
Set the window location.
If the coordinates are not valid they might be corrected. (for example out of screen locations)
prs

Parameters

sIndentxx coordinate.yy coordinate.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
setSizename

setSize(width, height)

dessIndent
Set the window size.
prs

Parameters

sIndentwidththe width.heightthe height.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
showname

show(form)

dessIndent
Shows the given form(form name, form object or JSForm) in this window.
prs

Parameters

sIndentformthe form that will be shown inside this window. It can be a form name or a form object (actual form or JSForm).
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
showTextToolbarname

showTextToolbar(showTextToolbar)

dessIndent
Sets whether or not this window should have a text tool bar. Has no effect on web client or smart client main application frame.
prs

Parameters

sIndentshowTextToolbartrue if you want a text tool bar to be added to this window, false otherwise.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
toBackname

toBack()

dessIndent
Shows this window behind other windows, if possible.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
toFrontname

toFront()

dessIndent
Bring this window in front of other windows, if possible.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow