Constructs a new window with the given dimension and title to display the specified content. The window elements use the given style as a prefix for the classnames of the respective window elements, namely, the window title and window pane. The respective postfixes are appended to the given stylename as follows:
style - Base style for the window. style+Title - Style for the window title. style+Pane - Style for the window pane.
The default value for style is mxWindow, resulting in the following classnames for the window elements: mxWindow, mxWindowTitle and mxWindowPane.
If replaceNode is given then the window replaces the given DOM node in the document.
String that represents the title of the new window.
DOM node that is used as the window content.
X-coordinate of the window location.
Y-coordinate of the window location.
Width of the window.
Optional height of the window. Default is to match the height of the content at the specified width.
Optional boolean indicating if the window is minimizable. Default is true.
Optional boolean indicating if the window is movable. Default is true.
Optional DOM node that the window should replace.
Optional base classname for the window elements. Default is mxWindow.
URL of the image to be used for the close icon in the titlebar.
Reference to the DOM node that represents the window content.
Defines the correction factor for computing the height of the contentWrapper. Default is 6 for IE 7/8 standards mode and 2 for all other browsers and modes.
Specifies if the window should be destroyed when it is closed. If this
is false then the window is hidden using
Variable: eventListeners
Holds the event names and associated listeners in an array. The array contains the event name followed by the respective listener for each registered listener.
Variable: eventSource
Optional source for events. Default is null.
Variable: eventsEnabled
Specifies if events can be fired. Default is true.
URL of the image to be used for the maximize icon in the titlebar.
URL of the image to be used for the minimize icon in the titlebar.
URL of the image to be used for the normalize icon in the titlebar.
URL of the image to be used for the resize icon.
Reference to the DOM node (TD) that contains the title.
Boolean flag that represents the visible state of the window.
Puts the window on top of all other windows.
Function: addListener
Binds the specified function to the given event name. If no event name is given, then the listener is registered for all events.
The parameters of the listener are the sender and an
Destroys the window and removes all associated resources. Fires a
Function: fireEvent
Dispatches the given event to the listeners which are registered for the event. The sender argument is optional. The current execution scope ("this") is used for the listener invocation (see <mxUtils.bind>).
Example:
(code) fireEvent(new mxEventObject("eventName", key1, val1, .., keyN, valN)) (end)
Parameters:
evt -
Makes sure the window is inside the client area of the window.
Returuns the outermost DOM node that makes up the window.
Function: getEventSource
Returns
Returns an
Returns the current position on the x-axis.
Returns the current position on the y-axis.
Hides the window.
Initializes the DOM tree that represents the window.
Adds the
Installs the event listeners required for maximizing the window.
Installs the event listeners required for minimizing the window.
Installs the event listeners required for moving the window.
Function: isEventsEnabled
Returns
Returns true if the window is resizable.
Returns true if the window is visible.
Function: removeListener
Removes all occurrences of the given listener from
Sets the image associated with the window.
Boolean specifying if the window should be closable.
Function: setEventSource
Sets
Function: setEventsEnabled
Sets
Sets the image associated with the window.
URL of the image to be used.
Sets the upper, left corner of the window.
Sets if the window is maximizable.
Sets if the window is minimizable.
Sets if the window should be resizable. To avoid interference with some
built-in features of IE10 and later, the use of the following code is
recommended if there are resizable
if (mxClient.IS_POINTER)
{
document.body.style.msTouchAction = 'none';
}
Sets if the window contents should be scrollable.
Sets the size of the window.
Sets the window title to the given string. HTML markup inside the title will be escaped.
Shows or hides the window depending on the given flag.
Boolean indicating if the window should be made visible.
Shows the window.
Generated using TypeDoc
Basic window inside a document.
Creating a simple window.
Creating a window that contains an iframe.
To limit the movement of a window, eg. to keep it from being moved beyond the top, left corner the following method can be overridden (recommended):
Or the following event handler can be used:
To keep a window inside the current window:
Event: mxEvent.MOVE_START
Fires before the window is moved. The
event
property contains the corresponding mouse event.Event: mxEvent.MOVE
Fires while the window is being moved. The
event
property contains the corresponding mouse event.Event: mxEvent.MOVE_END
Fires after the window is moved. The
event
property contains the corresponding mouse event.Event: mxEvent.RESIZE_START
Fires before the window is resized. The
event
property contains the corresponding mouse event.Event: mxEvent.RESIZE
Fires while the window is being resized. The
event
property contains the corresponding mouse event.Event: mxEvent.RESIZE_END
Fires after the window is resized. The
event
property contains the corresponding mouse event.Event: mxEvent.MAXIMIZE
Fires after the window is maximized. The
event
property contains the corresponding mouse event.Event: mxEvent.MINIMIZE
Fires after the window is minimized. The
event
property contains the corresponding mouse event.Event: mxEvent.NORMALIZE
Fires after the window is normalized, that is, it returned from maximized or minimized state. The
event
property contains the corresponding mouse event.Event: mxEvent.ACTIVATE
Fires after a window is activated. The
previousWindow
property contains the previous window. The event sender is the active window.Event: mxEvent.SHOW
Fires after the window is shown. This event has no properties.
Event: mxEvent.HIDE
Fires after the window is hidden. This event has no properties.
Event: mxEvent.CLOSE
Fires before the window is closed. The
event
property contains the corresponding mouse event.Event: mxEvent.DESTROY
Fires before the window is destroyed. This event has no properties.