Pools class (Swimlane)

Pools(oSurfaceView)

new Pools(oSurfaceView)

The Pools object holds a collection of Pool type (pool of the control)
Parameters:
Name Type Description
oSurfaceView SV Indicates an object of exontrol.Surface.SV type
Pools

Methods

Add(oPoolOptsopt) → {object}

The Add() method creates and adds a new pool into the control
Parameters:
Name Type Attributes Description
oPoolOpts object <optional>
Specifies the options to create the new pool as an object of exontrol.Surface.PoolOptions type
Returns:
Returns the newly created pool, as an object of Pool type
Type
object
Add

Clear()

The Clear() method removes all pools of the control and inits the control's scroll-bars
Clear

GetCount() → {number}

The GetCount() method returns the number of pools within the collection
Returns:
Returns the number of pools within the collection
Type
number
GetCount

Item(id) → {Pool}

The Item() method gets the pool giving its index, identifier/key or reference
Parameters:
Name Type Description
id any The id parameter could be any of the following:
  • id {number}, indicates a numeric value that defines the index of the pool to request
  • id {string}, specifies a string expression that defines the identifier/key/plain-caption of the pool to request
  • id {Pool}, specifies the object reference to the pool to request for
Returns:
Returns null if the pool is not found, or an object of Pool type, if the pools collection contains the giving id.
Type
Pool
Item

Load(value)

The Load() method loads control's pools from a string representation.
Parameters:
Name Type Description
value string Indicates a string to load pools from. The format of the pools'string representation is (everything between () refers to children, and everything between [] refers to flags):
"pool1[flag=value]...[flag=value](sub-pool1[flag=value]...[flag=value],...,sub-pooln[flag=value]...[flag=value]),...,pooln[flag=value]...[flag=value](sub-pool1[flag=value]...[flag=value],...,sub-pooln[flag=value]...[flag=value])"
The pool1, sub-pool1 ... pooln defines the caption for each pool. The string representation supports the following flags:
  • [key] {string}, specifies the pool's key (Key/GetKey()/SetKey(value) methods of exontrol.Swimlane.Pool). For instance, [key=pool], specifies that the pool's key is "pool"
  • [vis]/[hid] {number}, shows or hides the pool (Visible/GetVisible()/SetVisible(value) methods of exontrol.Swimlane.Pool). For instance, [hid] or [vis=0], hides the pool, while [vis=1] shows the pool
  • [dis] {number}, enables or disables the pool (Enabled/GetEnabled()/SetEnabled(value) methods of exontrol.Swimlane.Pool). For instance, [dis] or [dis=0], disables the pool, while [dis=1] enables the pool
  • [pos] {number}, changes the pool's position (0-based) (Position/GetPosition()/SetPosition(value) methods of exontrol.Swimlane.Pool). For instance, [pos=0] indicates that the pool should be displayed first
  • [client] {string}, specifies the pool's client-rectangle as a string of "x,y,width,height" type (without quotes) (Client/GetClient()/SetClient(value) methods of exontrol.Swimlane.Pool). For instance, [client=0,0,128,128] specifies the pool's client are to [0,0,128,128]
  • [shape] {string}, defines the shape for individual pool (Shape/GetShape()/SetShape(value) methods of exontrol.Swimlane.Pool). For instance, [shape=Button] specifies that the pool is shown as a "button".
  • [cursor] {string}, defines the mouse-cursor for individual pool (Cursor/GetCursor()/SetCursor(value) methods of exontrol.Swimlane.Pool). For instance, [cursor=wait] indicates that the "wait" mouse-cursor is displayed while the cursor hovers the pool
  • [headers] {string}, defines the headers of the pool (Headers/GetHeaders()/SetHeaders(value) methods of exontrol.Swimlane.Pool). The format of the headers is:
    [headers=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 the property of the header such as:
      • [size=value], defines the size of the header, where value is a numeric value. If 0 or negative, the header is not shown
      • [shape=value], defines the shape of the header.
    For instance: [headers=left,top[size=24][shape=Button]], shows the pool's left-header with size 0, and top-header of the pool with specified size and shape.
  • [exclhead]/[inclhead] {number}, indicates whether the pool's lanes and phases excludes or includes the pool's headers (ExcludeHeaders/GetExcludeHeaders()/SetExcludeHeaders(value) methods of exontrol.Swimlane.Pool). For instance, [inclhead] or [exclhead=0], indicates that the pool's lanes and phases includes the pool's headers, while [exclhead=1] excludes the pool's headers from lanes and phases.
  • [lanes] {string}, defines the lanes of the pool (the lanes goes vertically from top to bottom side of the pool) (Lanes/GetLanes()/SetLanes(value) methods of exontrol.Swimlane.Pool). 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.
    For instance: [lanes=Lane 1[size=20],Lane 2,Lane 3,Lane 4[shape=FrameSel]], displays four-lanes where Lane 1 takes 20% from the pool, while the rest of lanes shares equaly the available space on the pool. The Lane 4 displays the FrameSel shape.
  • [phases] {string}, defines the phases of the pool (the phases goes horizontally from left to right side of the pool) (Phases/GetPhases()/SetPhases(value) methods of exontrol.Swimphase.Pool). 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.
    For instance: [phases=Phase 1[size=20],Phase 2,Phase 3,Phase 4[shape=FrameSel]], displays four-phases where Phase 1 takes 20% from the pool, while the rest of phases shares equaly the available space on the pool. The Phase 4 displays the FrameSel shape.
Load

OnCreate(oCreateOpts) → {boolean}

The OnCreate() method customizes the options for the newly created pool by drag.
Parameters:
Name Type Description
oCreateOpts object Specifies the options to create the new pool as an object of exontrol.Surface.PoolOptions type. The oCreateOpts contains "client" field, that defines the pool's client area as an array of [x,y,width,height] type.
Returns:
Returns false to create the pool, or true to prevent creating a new pool
Type
boolean
OnCreate

OnCreateLane(oCreateOpts) → {boolean}

The OnCreateLane() method customizes the options for the newly created lane by drag.
Parameters:
Name Type Description
oCreateOpts object Indicates an object that specifies options for the pool's lane such as caption and shape
Properties
Name Type Description
pool Pool indicates the owner pool
caption string defines the caption of the lane
size number indicates the size of the lane or null if the [size] flag is missing
shape string specifies the shape to be applied on the lane
index number specifies the index of the lane
lanes object defines the pool's lanes
Returns:
Returns false to create the lane, or true to prevent creating a new lane
Type
boolean
OnCreateLane

OnCreatePhase(oCreateOpts) → {boolean}

The OnCreatePhase() method customizes the options for the newly created phase by drag.
Parameters:
Name Type Description
oCreateOpts object Indicates an object that specifies options for the pool's phase such as caption and shape
Properties
Name Type Description
pool Pool indicates the owner pool
caption string defines the caption of the phase
size number indicates the size of the phase or null if the [size] flag is missing
shape string specifies the shape to be applied on the phase
index number specifies the index of the phase
phases object defines the pool's phases
Returns:
Returns false to create the phase, or true to prevent creating a new phase
Type
boolean
OnCreatePhase

Remove(id)

The Remove() method removes a pool from the collection.
Parameters:
Name Type Description
id any The id parameter could be any of the following:
  • id {number}, indicates a numeric value that defines the index of the pool to request
  • id {string}, specifies a string expression that defines the identifier/key/plain-caption of the pool to request
  • id {Pool}, specifies the object reference to the pool to request for
Remove

RemoveRange(range)

The RemoveRange() method removes multiple-pools at once
Parameters:
Name Type Description
range Pool | Array.<Pool> Indicates an object of Pool type, an array [Pool] type, or exontrol.Arr.
RemoveRange

Save() → {string}

The Save() method saves the control's pools to a string representation.
Returns:
Returns the control's pool into a string representation. The format of the pools'string representation is (everything between () refers to children, and everything between [] refers to flags):
"pool1[flag=value]...[flag=value](sub-pool1[flag=value]...[flag=value],...,sub-pooln[flag=value]...[flag=value]),...,pooln[flag=value]...[flag=value](sub-pool1[flag=value]...[flag=value],...,sub-pooln[flag=value]...[flag=value])"
The pool1, sub-pool1 ... pooln defines the caption for each pool. The string representation supports the following flags:
  • [key] {string}, specifies the pool's key (Key/GetKey()/SetKey(value) methods of exontrol.Swimlane.Pool). For instance, [key=pool], specifies that the pool's key is "pool"
  • [vis]/[hid] {number}, shows or hides the pool (Visible/GetVisible()/SetVisible(value) methods of exontrol.Swimlane.Pool). For instance, [hid] or [vis=0], hides the pool, while [vis=1] shows the pool
  • [dis] {number}, enables or disables the pool (Enabled/GetEnabled()/SetEnabled(value) methods of exontrol.Swimlane.Pool). For instance, [dis] or [dis=0], disables the pool, while [dis=1] enables the pool
  • [pos] {number}, changes the pool's position (0-based) (Position/GetPosition()/SetPosition(value) methods of exontrol.Swimlane.Pool). For instance, [pos=0] indicates that the pool should be displayed first
  • [client] {string}, specifies the pool's client-rectangle as a string of "x,y,width,height" type (without quotes) (Client/GetClient()/SetClient(value) methods of exontrol.Swimlane.Pool). For instance, [client=0,0,128,128] specifies the pool's client are to [0,0,128,128]
  • [shape] {string}, defines the shape for individual pool (Shape/GetShape()/SetShape(value) methods of exontrol.Swimlane.Pool). For instance, [shape=Button] specifies that the pool is shown as a "button".
  • [cursor] {string}, defines the mouse-cursor for individual pool (Cursor/GetCursor()/SetCursor(value) methods of exontrol.Swimlane.Pool). For instance, [cursor=wait] indicates that the "wait" mouse-cursor is displayed while the cursor hovers the pool
  • [headers] {string}, defines the headers of the pool (Headers/GetHeaders()/SetHeaders(value) methods of exontrol.Swimlane.Pool). The format of the headers is:
    [headers=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 the property of the header such as:
      • [size=value], defines the size of the header, where value is a numeric value. If 0 or negative, the header is not shown
      • [shape=value], defines the shape of the header.
    For instance: [headers=left,top[size=24][shape=Button]], shows the pool's left-header with size 0, and top-header of the pool with specified size and shape.
  • [exclhead]/[inclhead] {number}, indicates whether the pool's lanes and phases excludes or includes the pool's headers (ExcludeHeaders/GetExcludeHeaders()/SetExcludeHeaders(value) methods of exontrol.Swimlane.Pool). For instance, [inclhead] or [exclhead=0], indicates that the pool's lanes and phases includes the pool's headers, while [exclhead=1] excludes the pool's headers from lanes and phases.
  • [lanes] {string}, defines the lanes of the pool (the lanes goes vertically from top to bottom side of the pool) (Lanes/GetLanes()/SetLanes(value) methods of exontrol.Swimlane.Pool). 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.
    For instance: [lanes=Lane 1[size=20],Lane 2,Lane 3,Lane 4[shape=FrameSel]], displays four-lanes where Lane 1 takes 20% from the pool, while the rest of lanes shares equaly the available space on the pool. The Lane 4 displays the FrameSel shape.
  • [phases] {string}, defines the phases of the pool (the phases goes horizontally from left to right side of the pool) (Phases/GetPhases()/SetPhases(value) methods of exontrol.Swimphase.Pool). 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.
    For instance: [phases=Phase 1[size=20],Phase 2,Phase 3,Phase 4[shape=FrameSel]], displays four-phases where Phase 1 takes 20% from the pool, while the rest of phases shares equaly the available space on the pool. The Phase 4 displays the FrameSel shape.
Type
string
Save