Name

swatchview — A simple space-filling colored view.

Synopsis

LZX: swatchview
JavaScript: lz.swatchview
Type: Class
Access: public
Topic: Components.Base Components
Declared in: lps/components/base/swatchview.lzx

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

Superclass Chain

node (LzNode) » view (LzView) » swatchview

Known Subclasses

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" />
private var ctransform;
fgcolor
<attribute name="fgcolor" />
public var 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" />
  <attribute name=" ctransform " value="null" />
  <attribute name=" fgcolor " />
  <method name=" construct " args="parent, args" />
  <method name=" setBGColor " args="c" />
  <method name=" setColor " args="c" />
  <method name=" setColorTransform " args="o" />
</class>

JavaScript Synopsis

public lz.swatchview extends  LzView  {
  public read-only var color ;
  private var ctransform ;
  public var fgcolor ;
  prototype private function construct (parent, args);
  prototype public function setBGColor (c : Number);
  prototype private function setColor (c);
  prototype public function setColorTransform (o : Object);
}