Class: Pool

Pool(oPools, oPoolOptsopt)

new Pool(oPools, oPoolOptsopt)

The Pool object holds information(options) about a pool within the control.

Every option of the exontrol.Surface.PoolOptions type has associated a property of the Pool object. For instance, the option:

cursor {string}, defines the mouse-cursor for individual pool
is associated with the property:
Cursor {string}, defines the mouse-cursor for individual pool
which means that the following statements are equivalent:
oPool.Options = {cursor: "pointer"}
oPool.SetOptions({cursor: "pointer"})
oPool.Cursor = "pointer"
oPool.SetCursor("pointer")
where oPool is an object of Pool type
Parameters:
Name Type Attributes Description
oPools Pools Indicates an object of Pools type that's the owner collection of this pool
oPoolOpts object <optional>
Defines the pool's options as an object of exontrol.Surface.PoolOptions type

Methods

BringForward() → {number}

The BringForward() method moves the pool up one level, so that it is closer to top of the stacking order.
Returns:
Returns the pool's previously position
Type
number

BringToFront() → {number}

The BringToFront() method moves the pool to the top of the stacking order, so that it is in front of other pools.
Returns:
Returns the pool's previously position
Type
number

EndUpdatePool(startUpdatePool)

The EndUpdatePool() method adds programmatically updated properties of the pool to undo/redo queue. You can use the StartBlockUndoRedo / EndBlockUndoRedo methods to group multiple Undo/Redo operations into a single-block. The AllowUndoRedo property specifies whether the control supports undo/redo operations for objects (pools, links, ...). No entry is added to the Undo/Redo queue if no property is changed for the current pool.
Parameters:
Name Type Description
startUpdatePool array Holds the result of a StartUpdatePool() method, as an array of [{o(bject), c(opy)o(bject)O(ptions)}] type, as explained: o(bject) {object}, specifies the object to start recording updating the properties (could be an element or a pool) c(opy)o(bject)O(ptions) {object}, specifies the object's creation-options
Since:
  • 2.0

EnsureVisible()

The EnsureVisible() method scrolls the control's content so the pool fits the control's client area
Since:
  • 2.0

GetClient() → {Array.<number>}

The GetClient() method returns the pool's client area
Returns:
Returns pool's client area
Type
Array.<number>

GetCursor() → {string}

The GetCursor() method defines the mouse cursor for the pool itself.
Returns:
Returns the mouse-cursor for the pool itself.
Type
string

GetEnabled() → {boolean}

The GetEnabled() method returns whether the pool is enabled or disabled
Returns:
Returns true if the pool is enabled, or false if the pool is disabled
Type
boolean

GetExcludeHeaders() → {boolean}

The GetExcludeHeaders() method indicates whether pool's lanes and phases are not shown over the pool's headers
Returns:
Returns true if the pool's lanes and phases are not shown over the pool's headers
Type
boolean

GetHeaders() → {string}

The GetHeaders() method returns the pool's headers in string-representation
Returns:
Returns pool's headers in string-representation (see Headers property for the string-format) The format of headers property is:
"type[flag=value]...[flag=value],...,type[flag=value]...[flag=value]"
where:
  • "type", defines the type of the header, which can be any of the following
    • "left", defines the pool's header anchored to the left-side
    • "top", defines the pool's header anchored to the top-side
    • "right", defines the pool's header anchored to the right-side
    • "bottom", defines the pool's header anchored to the right-side
  • "flag", defines a property of the header such as:
    • [size=value], defines the size of the header, where value is a numeric value
    • [shape=value], defines the shape of the header.
Type
string

GetIndex() → {number}

The GetIndex() method retrieves the pool's index.
Returns:
Returns the pool's index (0-based)
Type
number

GetKey() → {string}

The GetKey() method returns the pool's key.
Returns:
Returns the pool's exHTML key it displays
Type
string

GetLanes() → {string}

The GetLanes() method returns the pool's lanes in string-representation (the lanes goes vertically from top to bottom side of the pool)
Returns:
Returns pool's lanes in string-representation (see Lanes property for the string-format) The format of lanes property is:
"caption[flag=value]...[flag=value],...,caption[flag=value]...[flag=value]"
where:
  • "caption", defines the lane's ex-HTML caption (shown into the pool's header)
  • "flag", defines a property of the lane such as:
    • [size=value], defines the size of the lane (in percent), where value is a numeric value. 0 or negative value hides the lane
    • [shape=value], defines the shape of the lane.
Type
string

GetOptions() → {object}

The GetOptions() method returns the pool's options at once
Returns:
Returns an object of exontrol.Surface.PoolOptions type
Type
object

GetPhases() → {string}

The GetPhases() method returns the pool's phases in string-representation (the phases goes horizontally from left to right side of the pool)
Returns:
Returns pool's phases in string-representation (see Phases property for the string-format) The format of phases property is:
"caption[flag=value]...[flag=value],...,caption[flag=value]...[flag=value]"
where:
  • "caption", defines the phase's ex-HTML caption (shown into the pool's header)
  • "flag", defines a property of the phase such as:
    • [size=value], defines the size of the phase (in percent), where value is a numeric value. 0 or negative value hides the phase
    • [shape=value], defines the shape of the phase.
Type
string

GetPosition() → {number}

The GetPosition() method retrieves the pool's position.
Returns:
Returns the pool's position
Type
number

GetShape() → {any}

The GetShape() method defines the shape for the pool itself.
Returns:
Returns the shape for the pool itself.
Type
any

GetVisible() → {boolean}

The GetVisible() method returns whether the pool is visible or hidden
Returns:
Returns true if the pool is visible, or false if the pool is not visible
Type
boolean

Lane(lane) → {PoolSplitter}

The Lane() method gets the lane of the pool giving its identifier
Parameters:
Name Type Description
lane any The lane parameter could be any of the following:
  • lane {number}, indicates a numeric value that defines the index of the lane
  • lane {string}, specifies the caption of the lane
  • lane {PoolSplitter}, specifies an object of {PoolSplitter} type
Since:
  • 1.8
Returns:
Returns null (if no pool, lane with giving identifiers)
Type
PoolSplitter

Phase(phase) → {PoolSplitter}

The Phase() method gets the phase of the pool giving its identifier
Parameters:
Name Type Description
phase any The phase parameter could be any of the following:
  • phase {number}, indicates a numeric value that defines the index of the phase
  • phase {string}, specifies the caption of the phase
  • phase {PoolSplitter}, specifies an object of {PoolSplitter} type
Since:
  • 1.8
Returns:
Returns null (if no pool, phase with giving identifiers)
Type
PoolSplitter

Remove()

The Remove() method removes the pool itself from its collection

SendBackward() → {number}

The SendBackward() method moves the pool down one level, so that it is closer to the bottom of the stacking order.
Returns:
Returns the pool's previously position
Type
number

SendToBack() → {number}

The SendToBack() method moves the pool to the bottom of the stacking order, so that it is behind the other pools.
Returns:
Returns the pool's previously position
Type
number

SetClient(value)

The SetClient() method changes the pool's client area
Parameters:
Name Type Description
value any Specifies the new pool's client area, as one of the following:
  • {number[]}, specifies the pool's client area as an array of [x,y,width,height] type
  • {null}, specifies the union all visible-elements (collapsed child-elements or hidden elements are ignored) (@since 2.0)
  • {Elements[]}, specifies the union of the giving visible-elements (collapsed child-elements or hidden elements are ignored). For instance, oPool.SetClient(oControl.Elements) changes the pool's client-rectangle to cover all visible-elements, while oPool.SetClient(oControl.Selection) changes the pool's client-rectangle to cover the selection (@since 2.0)
  • {String[]}, specifies the union of the giving keys of the visible-elements (collapsed child-elements or hidden elements are ignored). For instance, oPool.SetClient(["A","B"]) changes the pool's client-rectangle to cover the elements with the key "A" and "B" (@since 2.0)
  • {Element}, indicates the element's client-rectangle (@since 2.0)
The SetClient() methodd sets the pool's outside client-area (includes the size for all headers) for all types except {number[]}

SetCursor(value)

The SetCursor() method changes the mouse cursor for the pool itself.
Parameters:
Name Type Description
value any A string expression that defines the mouse cursor for the pool itself.

SetEnabled(value)

The SetEnabled() method enables or disables the pool
Parameters:
Name Type Description
value boolean Indicates a boolean expression that specifies whether the pool is enabled or disabled

SetExcludeHeaders(value)

The SetExcludeHeaders() method includes or excludes the pool's headers into the pool's lanes and phases
Parameters:
Name Type Description
value boolean Indicates whether the pool's lanes and phases are shown over the pool's headers

SetHeaders(value)

The SetHeaders() method changes the pool's headers
Parameters:
Name Type Description
value string Specifies the new pool's headers (see Headers property for the string-format) The format of headers property is:
"type[flag=value]...[flag=value],...,type[flag=value]...[flag=value]"
where:
  • "type", defines the type of the header, which can be any of the following
    • "left", defines the pool's header anchored to the left-side
    • "top", defines the pool's header anchored to the top-side
    • "right", defines the pool's header anchored to the right-side
    • "bottom", defines the pool's header anchored to the right-side
  • "flag", defines a property of the header such as:
    • [size=value], defines the size of the header, where value is a numeric value
    • [shape=value], defines the shape of the header.

SetKey(value)

The SetKey() method assigns a new key to the pool
Parameters:
Name Type Description
value string Specifies a new key to be assigned to the pool

SetLanes(value)

The SetLanes() method defines the pool's lanes (the lanes goes vertically from top to bottom side of the pool)
Parameters:
Name Type Description
value string Specifies lanes of the pool giving a string-representation (see Lanes property for the string-format) The format of lanes property is:
"caption[flag=value]...[flag=value],...,caption[flag=value]...[flag=value]"
where:
  • "caption", defines the lane's ex-HTML caption (shown into the pool's header)
  • "flag", defines a property of the lane such as:
    • [size=value], defines the size of the lane (in percent), where value is a numeric value. 0 or negative value hides the lane
    • [shape=value], defines the shape of the lane.

SetOptions(oOpts)

The SetOptions() method changes the pool's options (visibility, caption, ...) at once
Parameters:
Name Type Description
oOpts object Specifies an object of exontrol.Surface.PoolOptions type that holds information about the pool, such as caption, image and so on. If the oOpts parameter is not-of object type it indicates the pool's caption instead

SetPhases(value)

The SetPhases() method defines the pool's phases (the phases goes horizontally from left to right side of the pool)
Parameters:
Name Type Description
value string Specifies phases of the pool giving a string-representation (see Phases property for the string-format) The format of phases property is:
"caption[flag=value]...[flag=value],...,caption[flag=value]...[flag=value]"
where:
  • "caption", defines the phase's ex-HTML caption (shown into the pool's header)
  • "flag", defines a property of the phase such as:
    • [size=value], defines the size of the phase (in percent), where value is a numeric value. 0 or negative value hides the phase
    • [shape=value], defines the shape of the phase.

SetPosition(value)

The SetPosition() method changes the pool's position.
Parameters:
Name Type Description
value number Specifies the pool's new position

SetShape(value)

The SetShape() method changes the shape for the pool itself.
Parameters:
Name Type Description
value any The value could be any of the following:
  • {null}, no custom-shape is applied
  • {string}, defines a CSS color to fill the object with (applied only for known colors), else it indicates the name of the custom-shape to apply on the object
  • {exontrol.Def.Shape}, indicates a reference to a shape of exontrol.Def.Shape type
  • {object}, holds a reference to an object of {normal,hover,click,disabled} type, where normal, hover, click and disabled are objects of exontrol.Def.Shape type.

SetVisible(value)

The SetVisible() method shows or hides the pool
Parameters:
Name Type Description
value boolean Indicates a boolean expression that specifies whether the pool is visible or hidden

StartUpdatePool() → {array}

The StartUpdatePool() method starts changing properties of the pool, so EndUpdatePool method adds programmatically updated properties to undo/redo queue. You can use the StartBlockUndoRedo / EndBlockUndoRedo methods to group multiple Undo/Redo operations into a single-block. The AllowUndoRedo property specifies whether the control supports undo/redo operations for objects (pools, links, ...). No entry is added to the Undo/Redo queue if no property is changed for the current pool.
Since:
  • 2.0
Returns:
Returns undefined (no undo/redo is allowed) or an array of [{o(bject), c(opy)o(bject)O(ptions)} type (to be passed to EndUpdatePool method), as explained: o(bject) {object}, specifies the object to start recording updating the properties (could be an element or a pool) c(opy)o(bject)O(ptions) {object}, specifies the object's creation-options
Type
array

UpdatePool(callback, thisArg)

The UpdatePool() method records the changes of pool's properties into control's Undo/Redo queue. The UpdatePool() method calls StartUpdatePool / EndUpdatePool methods.
Parameters:
Name Type Description
callback callback Specifies a function of callback() type
thisArg any Indicates the value of "this" keyword during the callback, or the object itself if missing