PhaseOptions class (Swimlane)

PhaseOptions()

new PhaseOptions()

The PhaseOptions class encapsulates all configurable options for a phase. A phase is a vertical section within a pool that can be used to group elements. The OnCreatePhase(oPhaseOpts) method lets you customize a phase's options when it is created via drag-and-drop. Its oPhaseOpts parameter is an instance of PhaseOptions, which allows you to set the phase's caption and shape after creation. The pool, size, index, and phases fields of PhaseOptions are read-only. The caption, size (in pixels), and shape (which can be a CSS color, a predefined shape, or an object defining shapes for different states) can be set to customize the phase's appearance.
Since:
  • 5.2

Members

(static, readonly) pool :Pool

The pool field indicates the owner pool of the phase. Each pool can contain one or more phases. The lanes field lists all phases that belong to the pool, while the index field specifies the position of this phase within the pool's phases collection. You can use the pool field to access the parent pool of the phase and retrieve its properties, such as the client rectangle, headers, and other pool-specific settings. The pool field is read-only and cannot be modified directly.
Type:
Example
oPhaseOpts.pool.Key {any}, gets the key of the pool that owns the phase

(static) caption :string

The caption field specifies the ex-HTML caption of the phase. It can be set after the phase is created via drag-and-drop. This field accepts plain text, ex-HTML tags for formatting (for example, <b> for bold), and even image references using <img> tags. The caption appears in the pool's header area corresponding to the phase. For instance, setting caption to "Phase 1" will display Phase 1 as the phase's header text. The caption field is a string and can be customized to provide meaningful labels for each phase within the pool.
Type:
  • string
Example
"New Phase" {string}, sets the caption of the phase to "New Phase"
caption

(static) index :number

The index field indicates the phase's position within its parent pool as a zero-based number. It specifies the phase's order in the pool's phases collection, with the first phase having an index of 0. For example, in a pool containing three phases, the phases will have indices 0, 1, and 2, respectively. The index field is read-only and cannot be changed directly. It is primarily used to identify the phase's position within the pool and to access the phase via the pool's phases collection.
Type:
  • number
Example
oPhaseOpts.index {number}, gets the index of the phase within the pool
index

(static) phases :object

The phases field represents the collection of phases within a pool and is read-only. A pool can contain one or more phases, each represented as an object with its own set of options, such as caption, size, and shape. The phases field allows you to access all phases that belong to the pool, including the phase currently being created. You can use it to retrieve information about existing phases and manage their properties collectively. Each phase in the phases collection has an index field that indicates its position within the pool, starting from 0 for the first phase.
Type:
  • object
Example
oPhaseOpts.phases.content {string}, gets the string-representation of the pool's phases (including the current phase)
phases

(static) shape :any

The shape field specifies the shape to be applied on the phase being created by drag and drop.

The shape can be any of the following:

  • {null}, no custom-shape is applied
  • the shape's name within the exontrol.Shapes.Swimlane or exontrol.Shapes namespace
  • a CSS color
  • a JSON string-representation of an object of exontrol.Def.Shape type
  • an object of {normal,hover,click,disabled} type. The normal, hover, click and disabled are objects of exontrol.Def.Shape type

If no shape is specified, the Shapes property defines the visual appearance of the pool's parts:

  • "phase", defines the visual-appearance of all phases for all pools
  • "phaseAlt", defines the visual-appearance of alternate phases for all pools
Type:
  • any
Example
"red" {string}, sets the shape of the phase to red color
"FrameSel" {string}, sets the shape of the phase to "FrameSel"
shape

(static) size :number

The size field indicates the size (in pixels) of the phase or null if the [size] flag is missing. The size field is read-only. The size of a phase determines how much horizontal space its header occupies within the pool. If the size is set to a positive number, it specifies the fixed height of the phase in pixels. If the size is null, it means that the phase's size is determined by the remaining space in the pool after accounting for other phases and headers. A size of 0 or a negative value will hide the phase.
Type:
  • number
Example
0 {number}, hides the phase
24 {number}, sets the phase's header height to 24 pixels
size