Optional
style: stringURL of the image to be used for the close icon in the titlebar.
Reference to the DOM node that represents the window content.
Specifies if the window should be destroyed when it is closed. If this
is false then the window is hidden using
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.
Specifies if events can be fired. Default is true.
Optional source for events. Default is null.
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.
Rectangle that specifies the minimum width and height of the window. Default is (50, 40).
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.
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 EventObject.
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 Utils#bind).
Example:
fireEvent(new mxEventObject("eventName", key1, val1, .., keyN, valN))
EventObject that represents the event.
Optional sender to be passed to the listener. Default value is
the return value of
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 (Client.IS_POINTER)
{
document.body.style.msTouchAction = 'none';
}
Basic window inside a document.
Creating a simple window.
Example
Creating a window that contains an iframe.
Example
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.
MaxWindow