The unique identifier for this control.
True if the panel can be dragged else false.
This is true if the control can respond to UI events else false.
Use enable() and disable() to enable and disable it.
This is true if the control background is opaque else false.
Use opaque() and transparent() display / hide the background.
This is true if the control is visible else false.
Use hide() and show() to set visibility.
The type name for this control.
(type name = class name without the Cvs prefix)
Add a child to this control using its relative position [rx, ry]. If rx and ry are not provided then it uses the values set in the child.
is the actual control or its id
Optionalrx: numberOptionalry: numberthis control
Execute one or more configuration methods on this control.
The parameter is a user defined object where each field is the name of a configuration method and its value is the method's parameter(s). Multiple parameters should be in an array and use 'undefined' if the method expects no parameters.
This object will change the color scheme, text size and alignment, it will also make sure it is visible.
{ scheme : 'red', textSize : 12, textAlign: ['left', 'top'], show : undefined }
If the field name does not exist or not a valid function of this
control it will be silently ignored.
There is no error checking on the parameters, it is up to the user to ensure they are valid for the control method.
the configuration object
this control
Panel position can be constrained horizontally and vertically so that it fits within the outside the display area.
this control
Get or set the corner radii used for this control.
To set the radii the parameters must be one of the following
If no parameter is passed or does not match one of the above then an array of the currently used radii values.
valid radii combination
an array of the currently used radii values
Disables this control.
Optionalcascade: booleanif true disable child controls
this control
Horizontal and vertical movement can be restricted based on the actual parameters. If either parameter is true then then the panel is considered 'draggable'.
allow horizontal movement if true
allow vertical movement if true
this control
Enables this control.
Optionalcascade: booleanif true enable child controls
this control
Make this control invisible.
Optionalcascade: booleanif true hide any children
this control
Move this control relative to current position.
horizontal distance
vertical distance
this control
Move this control to an absolute position.
horizontal position
vertical position
this control
Makes the controls background opaque. The actual color depends on the controls color scheme.
The second parameter, alpha, is optional and controls the level of opaqueness from 0 - transparent to 255 - fully opaque (default value).
alpha value for controls background color.
this control
Remove a child control from this one so that it stays in same screen position.
the control to remove or its id
this control
If the name of a valid color scheme is provided then it will use it to display the control, non-existant scheme names will be ignored. In both cases this control is returned.
If there is no parameter it returns the name of the current color scheme used by this control.
Optionalname: stringthe color scheme name e.g. 'blue'
Optionalcascade: booleanif true propogate scheme to all child controls.
this control or the control's color scheme
This sets the event handler to be used when this control fires an event. The parameter can take one of three forms:
the function to handle this control's events.
this control
An alternative to the enable / disable methods.
true / false
Optionalcascade: booleantrue apply to all children
this control
An alternative to the show / hide methods.
true / false
Optionalcascade: booleanif true hide children
this control
Make this control visible.
Optionalcascade: booleanif true then show any children
this control
A draggable rectangular panel that can be used to hold other controls.
On creation the panel -
If the background is transparent then the panel cannot be dragged. Panel movement in the display can be restricted with the
draggable()andconstrain()methods.It is recommended that the panel width and height should not exceed that of the display area (i.e. canvas).