About resize modes
The Dashboard facility supports three window resize modes:
Layout: When a window in this mode is resized, the display is resized to fit the available space. The objects in the display are laid out according to their
anchor and
dock properties (see below). The window is not forced to maintain its aspect ratio. Objects that are not docked or anchored move relative to their offset from the top left corner of the display. For example, if the object is centered on the display, the object moves 50% of the resize amount. If the object is centered at 3/4 of the display, it moves 75% of the resize amount.
Scale: This is the default for the Dashboard Builder and Dashboard Viewer, as well as for all web-deployed dashboards. When a window in this mode is resized, the display and all of the objects in it are scaled to fit the available space. The window is forced to maintain its aspect ratio.
Crop: This is the default for display server deployments. When a window in this mode is resized, the display stays the same size. If the window is bigger than the display, empty space appears around the display. If the window is smaller than the display, scrollbars appear. The window is not forced to maintain its aspect ratio.
All three resize modes support zooming the display (right-click and select Zoom In, Zoom Out, or Zoom Rect). In both Layout and Scale modes, if the window is resized while the display is zoomed, the resize further zooms the display.
In the Dashboard Builder, the window resize modes are only applied to drill down windows. The main window of the Dashboard Builder is always in crop mode.
You can set the window resize mode for each dashboard in the Background Properties dialog. If set to Default, the application level resize mode (see below) is used. Otherwise, the specified resize mode is used for that display. It is recommended that you set the resize mode on a per-dashboard basis, by using the Background Properties dialog.
The application level window resize mode can be set in the General tab of the Application Options dialog or on the command line with the option -apama.resizeModemode, where mode is layout, scale, or crop.
If Default is selected, the default window resize mode is used. The default is Crop for display server (thin client) deployments, and Scale for local (Dashboard Viewer) deployments, as well as for Dashboard Builder.
If the window resize mode is changed in the Application Options dialog in the Dashboard Builder, the new value is only applied to new windows that are opened. Windows that are already open do not change modes.
Two new properties have been added to the Object group of all objects in order to support Layout mode:
dock: Select
None (default),
Top,
Left,
Bottom,
Right, or
Fill.
When the dock property on an object is set to one of the sides (Top, Bottom, Left, or Right), it is moved to the specified side of the display and stretched to fill that side of the display. If the size of the display changes, the docked objects stretch to fill the available space. For example, if the dock property is set to Top, the object is moved to the top of the display and the width of the object changes to fill the width of the display. If the display is then made wider, either by changing the Background Properties on the display or by resizing the window in Layout mode, the width of the object changes to match the new width of the display.
Multiple objects can be docked to the same side of the display. In this case, the first object is docked against the side of the display, the next object is docked against the edge of the first object, and so on.
When a display has multiple side-docked objects, the object order controls how the dock layout is applied. The layout is applied to the object list from back to front. For example, if the first object in a display is docked to the top, and the second object is docked to the left, the first object fills the entire width of the display, and the second object fills the left side of the display from the bottom of the first object to the bottom of the display.
When the dock property on an object is set to Fill, it fills the available space left in the display after all of the side-docked objects have been positioned. When multiple objects in a display have the dock property set to Fill, those objects are laid out in a grid in the available space. By default, the grid has one row and as many columns as objects. You can change the grid rows and columns in the Background Properties dialog. If both are set to 0, the default is used. If both the rows and columns are specified, the row value is used and the number of columns is calculated based on the number of objects. If the row value is 0 and the column value is specified, the number of rows is calculated based on the number of objects. The objects are laid out left to right, top to bottom according to the order of the objects in the display. The objects with the dock property set to Fill are always laid out after all of the other docked objects.
Once an object is docked, there are some limitations on how you can modify that object in the Dashboard Builder. You cannot move a docked object by dragging or changing objX and objY in the property sheet. Side-docked objects can only be resized toward the center of the display (for example, if the object is docked to the top of the display, it can only be resized to be taller). Fill-docked objects cannot be resized at all. You cannot resize any docked objects using the objWidth or objHeight properties in the property sheet. You must drag on the valid resize handle to resize it. It is not moved by Align or Distribute. Objects can be aligned against a docked object, but the docked object is not moved to align against another object. Docked objects are ignored by Distribute.
Note that when an object is docked, the properties objX, objY, objWidth, and objHeight may change. For example, suppose that you instantiate a General object from the palette, and the properties of the object are as follows: objX:250, objY:250, objWidth:64, and objHeight:48. When you set the dock property to Top, the properties are modified as follows: objX:368, objY:520, objWidth:736, and objHeight:48 (no change). If you then change the dock property to Left, the objWidth isn't changed, but the objHeight changes so that the object fills the entire height and width of the display. When you change the dock setting to None, these properties stay the same.
Only objects that support the objWidth and objHeight properties have the dock property.
anchor: Select zero or more of
Top,
Left,
Bottom, and
Right.
The anchor property is only applied when the display is resized either by changing the Background Properties on the display or by resizing the window in Layout mode. The anchor property anchors the specified side of the object to the same side of the display. When the display resizes, the number of pixels between the specified side of the object and that side of the display remains constant. If an object is anchored on opposite sides (that is, both Top and Bottom or both Left and Right), the object is stretched to fill the available space.
Only objects that support the objWidth and objHeight properties support anchoring on opposite sides. If an object has the dock property set, the anchor property is ignored.
The composite object supports both dock and opposing anchor sides, but does not behave like other objects if the property resizeMode is set to Size to Display. In this case, the composite size is controlled by the size of the display that it contains, so any changes to the width or height of the object result in the composite moving, not resizing. The composite object should not be docked if resizeMode is set to Layout.