Name
swatchview — A simple space-filling colored view.
Description
A simple view that is filled with a single color.
Either 'fgcolor' and 'bgcolor' may be used to set the color of the view.
By default it fills the space of the parent with white.
Unlike with other views, setColorTransform will affect the bgcolor of the view.
swatchview is a simple view that is filled with a single color.
Either 'fgcolor' and 'bgcolor' may be used to set the color of the view.
By default it fills the space of the parent with white
Details
Properties (3)
-
color
-
<attribute name="color" value="0xffffff" />
public read-only var color;
this is the color that was set (by setting 'bgcolor' or 'fgcolor' ),
bgcolor may be different if setColorTransform has been called
-
ctransform
-
<attribute name="ctransform" value="null" />
-
fgcolor
-
<attribute name="fgcolor" />
setting the fgcolor attribute is equivalent to setting bgcolor
Methods (4)
-
construct()
-
<method name="construct" args="parent, args" />
private function construct(parent, args);
-
setBGColor()
-
<method name="setBGColor" args="c" />
public function setBGColor(c : Number);
sets the bgcolor with the color transform applied
-
setColor()
-
<method name="setColor" args="c" />
private function setColor(c);
-
setColorTransform()
-
<method name="setColorTransform" args="o" />
public function setColorTransform(o : Object);
affects the bgcolor, unlike in regular views where only the
resource and subviews are affected by the color transform
LZX Synopsis
<class name="
lz.swatchview" extends="
LzView
">
<attribute name="
color
" value="
0xffffff" />
<method name="
construct
" args="
parent,
args" />
</class>
JavaScript Synopsis
public
lz.swatchview extends
LzView
{
public read-only var
color
;
prototype private function
construct
(
parent,
args);
prototype public function
setBGColor
(
c : Number);
prototype private function
setColor
(
c);
}