Search

User Manual

GETTING STARTED


MODULES AND PLATFORM


APPENDIX


TUTORIALS & HELPFUL TRICKS


GLOSSARY


STRATEGIC PARTNER LINKS

Sepasoft - MES Modules
Cirrus Link - MQTT Modules

RESOURCES

Inductive University
Ignition Demo Project
Knowledge Base Articles
Forum
IA Support
SDK Documentation
SDK Examples

ALL MANUAL VERSIONS

Ignition 8
Ignition 7.9
Ignition 7.8

Deprecated Pages

Skip to end of metadata
Go to start of metadata
General



IULocgo


Window Properties

Description

Window

Windows are the top-level unit of design for Vision projects. A window is identified by its path, which is the name of all its parent folders plus its name, with forward slashes (/) in between. For example, the path to a window in the top level called MainWindow would simply be its name, whereas the path to a window named UserOptions under a folder called OptionsWindows would be: OptionsWindows/UserOptions.

A window may display a Titlebar and/or a Border. The titlebar allows the user to drag the window around in the client, and houses the window's close and maximize/restore buttons. The border of a window can be used to resize the window in the client when it is floating or docked. Whether on not the titlebar and border are displayed depends on the values of the window's titlebar and border display policy properties, and its current state. Commonly, a window will display both a titlebar and border when it is configured as a popup. It is often desirable to remove titlebars and borders on main windows so they join seamlessly with docked windows.

Note that the user manual describes different Window Types, technically there is only a single window object in the Vision module: different "types" of windows are simply instances of the window object configured in different ways. See Window Types for more information about changing types.

Root Container

Inside a window is always the Root Container. The Root Container is where you will place all of your components in the window. This is exactly the same as a normal container component except that it cannot be deleted. When in the designer, "resizing" the window from the main Vision workspace is really changing the size of the Root Container.

Window Opening Event Order

Window objects have several event handlers that trigger when the window opens. However, each event handler occurs at a separate time. Because of this, it is important to understand the order that these events occur:

Opening a window - When opening a window for the first time in a designer, the following event handlers are called in order:

  1. visionWindowOpened - Important to note the description on this event: it occurs before any bindings on the window are evaluated.
  2. internalFrameOpened- Again, the description notes that if the window has been cached, this will not fire on sequential opens.
  3. internalFrameActivated - The last event, but also repeatable while the window is opened, since this event will trigger again if the window loses and then regains focus without being closed in between.

Closing a window - When closing a window, the following event handlers are called in order:

  1. internalFrameClosing - This event would be ideal to "clean up" in the window, since the window is still technically open at this point.
  2. visionWindowClosed - Triggers when the window is closed. Functionally, this is similar to internalFrameClosed, but happens slightly earlier.
  3. internalFrameDeactivated - This triggers when the window is closed, or when the window loses focus, so you may want to avoid this event if your script should only trigger when the window is closed.
  4. internalFrameClosed - Similar to visionWindowClosed. Triggers when the Java windowing system has finished closing the window.
Properties
NameDescriptionProperty TypeScriptingCategory
Border Display Policy

Determines if the window's border is shown in various window states.

IntegerProperty
0Always
1Never
2When Not Maximized
int.borderDisplayPolicyBehavior
Cache Policy

By default this property is set to Auto, which keeps a window in a memory cache for a while after it is closed, so that if it is opened again it will be quick. The window isn't "active" while it is closed: all of its bindings and scripts are shut down.

Setting this property to Never causes a fresh copy of the window to be deserialized every time it is opened. This is a performance hit, but it also is a convenient way to "clear out" the values of the window from the last time it was opened, which can be helpful in data-entry screens.

Setting the property to Always will trade memory for higher performance, causing the window to always remain cached after the first time it is opened. This means the window will open very fast, but your Client will need lots of memory if you do this to a large amount of windows.

IntegerProperty
0Auto
1Never
2Always
int.cachePolicyBehavior
CloseableDetermines whether or not to draw the close (X) button in the upper right corner.boolean.closableBehavior
Dock IndexDetermines the order of docked windows if multiple windows are open on the same edge. Lower numbers are on the outside (closest to the edge the window is docked to), and higher numbers are closer to the center.int.dockIndexLayout
Dock Position

Determines the position this window is docked to, or if it is floating.

IntegerProperty
0Floating
3West
4South
2East
1North
int.dockPositionLayout
LayerSets the layer that this window is in. Default layer is 0, which is the bottom layer. Windows in higher layers will always be shown on top of windows in layers beneath them. A common strategy for using the layer property is to set Main Windows and Docked windows to 0, Popups to 1 and very important popups to 2.int.layerLayout
LocationThe starting location that this window will open up at. Only applicable to floating windows that are not set to start maximized. This value will be overridden when an open window script specifies where to open.Point.startingLocationLayout
MaximizableDetermines whether or not to draw the maximize button in the upper right corner.boolean.maximizableBehavior
Maximum SizeThe maximum size that this window will allow itself to be resized to.Dimension.maximumSizeLayout
Minimum SizeThe minimum size that this window will allow itself to be resized to.Dimension.minimumSizeLayout
ResizableDetermines whether or not to let the user resize the window.boolean.resizableBehavior
SizeThe dimensions of the window. This can be manipulated by selecting the window and dragging the resize handles along the windows right and bottom edges.Dimension.sizeLayout
Start MaximizedWhen set to true, the window will become maximized when it is opened.boolean.startMaximziedBehavior
TitleThe title to be displayed in this window's titlebar. The title is also used in the Client's Windows menu.String.titleAppearance
Titlebar Display Policy

Determines if window's titlebar is shown in various window states.

IntegerProperty
0Always
1Never
2When Not Maximized
int.titlebarDisplayPolicyAppearance
Titlebar FontThe font of the window title in the titlebar.Font.titlebarFontAppearance
Titlebar HeightThe height of the window's titlebar.int.titlebarHeightAppearance
Scripting
Scripting Functions
 .getRootContainer
  •  Description

Returns a reference to the Root Container in the window.

  • Parameters

none 

  •  Return

Object - a reference to the Root Container, which is functionally just a Vision - Container.

  • Scope

Client

 .getComponentForPath
  •  Description

Returns a reference to a component. The path paremeter allows you to specify the full path to the component as a string.

  • Parameters

String path - The path to the component, using a period as a delimiter, such as "Root Container.Group.Label".

  •  Return

Object - to the component specified, or None if there is a typo in the path.

  • Scope

Client

Extension Functions

This component does not have any extension functions.

Event Handlers
 internalFrame

An "internalFrame" refers to the underlying object Java windowing system that windows in the Vision module use.

 internalFrameActivated

Fires whenever the window is shown or focused. If you want a script to fire every time a window is opened, use this event.

.source

The window that fired this event. Use source.rootContainer to get the root container. 

 internalFrameClosed

Fires when a window is closed.

.source

The window that fired this event. Use source.rootContainer to get the root container.      

 internalFrameClosing

Fires right before a window is closed.

.source

The window that fired this event. Use source.rootContainer to get the root container.      

 internalFrameDeactivated

Fires when a window loses focus.

.source

The window that fired this event. Use source.rootContainer to get the root container.      

 internalFrameOpened

Fires the first time a window is opened. Note that when windows are closed, they may be cached. If a window in a client is cached, subsequent attempts to open the window will not trigger this event. If you disable caching (by setting the Cache Policy property to Never) then this event will trigger every time the window is opened. Alternatively, you could use internalFrameActivated instead to consistently trigger a script when a window is opened.

.source

The window that fired this event. Use source.rootContainer to get the root container.      

 propertyChange
 propertyChange

Fires whenever a bindable property of the source component changes. This works for standard and custom (dynamic) properties.

.sourceThe component that fired this event.
.newValueThe new value that this property changed to.
.oldValueThe value that this property was before it changed. Note that not all components include an accurate oldValue in their events.
.propertyName

The name of the property that changed.

Remember to always filter out these events for the property that you are looking for! Components often have many properties that change.

 visionWindow
 visionWindowOpened

This event is fired each time the window is opened and before any bindings are evaluated.

.source

The window that fired this event. Use source.rootContainer to get the root container.      

 visionWindowClosed

This event is fired each time the window is closed.

.source

The window that fired this event. Use source.rootContainer to get the root container.      

Examples

For examples of windows, please see the Vision Windows section.


  • No labels