The view
is the most basic viewable element in an
OpenLaszlo application. Anything that is displayed on the canvas is a view
or extends the view class. A view is a rectangle, which can be visible or invisible, and which can contain other views or
display "resources" such as images,
.swf files, or other supported media. One view controls one
displayable resource. The view system is strictly hierarchical; that is, each view
has
a single parent but can have multiple children.
The following code shows one view nested inside another:
<canvas height="50" width="500"> <view width="50" height="50" bgcolor="red"> <view width="30" height="30" bgcolor="blue"/> </view> </canvas>
LzView
extends LzNode
,
which is the fundamental abstract class of LZX.
For more a gentle introduction to views please see the Laszlo tutorials, particularly Laszlo Basics and Understanding Views. For a more rigorous explanation of views see theDeveloper's Guide, particularly the views chapter.
Known Direct Subclasses: autocompletecombobox, basecomponent, basedatepickerday, basedatepickerweek, basedragimage, baseform, baseslidertrack, basetooltip, basetrackgroup, basevalidator, basezoomarea, borderinput, colorpot, colorrow, datacolumn, dataseries, DebugObject, fisheye, fisheye_item, hbox, hsplitpane, image, linkdialog, canvas (LzCanvas), text (LzText), menuarrow, opttree, richtexteditor, richtexttoolbar, rtmpstatus, shadowbox, simpleinputtext, ulink, valuepoints, vbox, videoview
Static Methods (2)
Initial Attributes (3)
Initial Attributes are given as attributes in LZX but are not generally available as properties in JavaScript.
onmouseupoutside
: Sent when the mouse button comes up outside a
view This event is only sent by views which are clickable
after it went down over the view. This event is only sent by views which
are clickable
onmousedragin
: Sent when the mouse button went down over the view
and the button is still down when mouse rolls back inside the view.
This event is only sent by views which are clickable
onmousedragout
: Sent when the mouse button went down over the view
and the button is still down when mouse rolls outside the view.
This event is only sent by views which are clickable
Properties (39)
simplelayout
is used. If the value of this attribute is a single
id, it is used as the axis attribute of a simplelayout.
Examples: axis: x
, class: constantlayout
;
axis: y
; axis: x; spacing: 5
.
resource
tag, a URL, or a pathname. If the value is a URL,
the resource is requested when the view is displayed. If it's a
pathname, the file named by the pathname is compiled into the
application, and attached to this view.
visible="a && b"
, if
a
is null, the value returned by the constraint expression will
be null -- not false.
Setters (29)
Setters for virtual properties, to be used with setAttribute. A setter may or may not have a corresponding getter method; consult the Methods list in this section.
fontstyle
and fontsize
too) these
properties cascade down the view hierarchy until a new value is
specified. When the font attributes are modified at runtime,
using JavaScript, the font is changed for the view itself, not
for any of its subviews.
Methods (68)
o
. The dictionary has
the following possible keys:
o.ra: percentage alpha for red component (-100 to 100);
o.rb: offset for red component (-255 to 255);
o.ga: percentage alpha for green component (-100 to 100);
o.gb: offset for green component (-255 to 255);
o.ba: percentage alpha for blue component (-100 to 100);
o.bb: offset for blue component (-255 to 255);
o.aa: percentage overall alpha (-100 to 100);
o.ab: overall offset (-255 to 255);
Events (41)
Copyright © 2002-2007 Laszlo Systems, Inc. All Rights Reserved. Unauthorized use, duplication or distribution is strictly prohibited. This is the proprietary information of Laszlo Systems, Inc. Use is subject to license terms.