PERGOLA LOGO

pergola.Panel

System events: YES.

User events and functions: YES.

Example.

Listed: class properties/methods; prototype properties and methods; instance properties. Prototype properties and methods inherited by the Class superclass are not listed.

class

panels

Array. Stores panels' references.

prototype

PROPERTIES

parent

pergola.user.

type

"dialog" – string; allowed values: "basic"; "dialog".

x

Defined in pergola.presentationAttributes – number (user space units).

y

Defined in pergola.presentationAttributes – number (user space units).

width

Defined in pergola.presentationAttributes – number (user space units).

height

Defined in pergola.presentationAttributes – number (user space units).

fill

Defined in pergola.presentationAttributes – string.

"fill-opacity"

1 – string or number.

"stroke-opacity"

1 – string or number.

stroke

Defined in pergola.presentationAttributes – string.

margin

Defined in pergola.presentationAttributes – number (user space units).

hasFooter

Defined in pergola.presentationAttributes – boolean (user space units); determines whether this should have a visible footer. Note: the footerGroup is built in any case for panels of type "dialog".

footerFill

Defined in pergola.presentationAttributes – string.

footerHeight

Defined in pergola.presentationAttributes – number (user space units).

filter

Defined in pergola.presentationAttributes – string (URI).

validated

true – boolean; when a panel is not validated, following an illegal entry or no selection, for example, the ok button will not close the panel.

preemptive

false – boolean; when a preemptive panel is open, most system functionalities are disabled.

isOpen

false – boolean.

isTop

false – boolean.

METHODS

move

Reference to pergola.Panel.superClass.moveByTranslation() method.

open()

Invokes this bringToFront(); sets this isOpen.

init(object)

Call this method to initialize a dialog panel with user and fn properties specified in object; a typical use case is with system dialogs pergola.colorpicker and pergola.findDialog. Invokes this open().

update(object)

object defines the title string and ok string properties. Invoke this method to change this topBar's title and this ok button's text. Use case is a multipurpose panel like the pergola.fileDialog panel (file open or save as).

bringToFront()

Appends this container to its layer (system layers). You don't normally need to invoke this method explicitly.

warn(evt)

Shows preemptive visual warning.

getCandidate()

Sets the isTop property to true for the last element in panels. You don't normally need to invoke this method explicitly.

close(evt)

Collapses this container; sets this isOpen to false; invokes this getCandidate.

release(evt)

The pergola.Dragarea release() method invokes the release() method of the activator object if such method is defined for private release processing.

footerPath()

Returns the "d" attribute for this bar.

resize(object)

object defines the required width and height number (user space units) properties, and optional x number, y number, ok object (x,y) and cancel object (x,y) properties. Invoke this method to resize the top bar if you need to resize a panel programmatically.

handleEvent(evt)

build(object)

this inherits the properties specified in object. Prototype properties specified in object are overridden. Creates elements. Returns this.

instance

name

String. If not passed to the constructor, gets a generated XML name (Class).

id

String. The return value of this name.toXML(). This container ID. Used as prefix where other elements' IDs are attributed.

owner

Designates the owner object.

user

The current user object. Applies to system dialogs pergola.colorpicker and pergola.findDialog, or any user defined dialog with similar sharing functionality. The best practice is to specify this property in the call to the init method.

container

<g> element.

topBar

If this type is "dialog", pergola.TopBar instance.

frame

pergola.Frame instance.

closeBtn

If this type is "dialog", pergola.CommandButton instance.

footerGroup

If this type is "dialog", <g> element.

If this type is "dialog" and this hasFooter, <path> element.

ok

If this okButton object property is specified in the initialization object, DialogButton instance. The okButton object may define the text string, x number, y number, and marginRight number properties; if text is not defined the default value is "OK".

cancel

If this cancelButton object is specified in the initialization object, new DialogButton. The cancelButton object may define the text string, x number, y number, and marginRight number properties; if text is not defined the default value is "Cancel".

layout

If specified, an initialization object for the pergola.Layout class (contains must not be specified).

contains()

If specified, node or function (layout must not be specified).

fn

If specified, callback function invoked by implied event on OK button, which also invokes callback functions defined for panel's embedded components.