ScrollBarManager
Store the ScrollBarModel
to manage.
The exemple beside show how a AbstractScrollBarManager
can
manage many ScrollBarModel
:
var sc1:ScrollBar = ScrollBar.create(this.content1, this.mask1, ScrollType.VERTICAL);
var sc2:ScrollBar = ScrollBar.create(this.content2, this.mask2, ScrollType.VERTICAL);
//2 ways to adapt a manager to many scrollbar :
var scb1:ScrollClickButton = sc1.getUpButton(this.upButton);
scb1.addScrollBarModel(sc2.getModel());
var scb2:ScrollClickButton = new ScrollClickButton(this.upButton, 4);
scb2.addScrollBarModel(sc1.getModel());
scb2.addScrollBarModel(sc2.getModel());
This process allows you to manage a single ScrollBarModel
that can be used by many ScrollBar
.
public function setEnabled(value:Boolean):Void
Set if the AbstractScrollBarManager
is enabled or not.
This method simply set a Boolean
to the specified value. The
purpose of this method is to be overriden into the subclasses.
value | true to enable the AbstractScrollBarManager , false otherwise.
|
public function isEnabled(Void):Boolean
Get if the AbstractScrollBarManager
is enabled or not.
true
if the AbstractScrollBarManager
is enabled, false
otherwise.
public function addScrollBarModel(scr:ScrollBarModel):Void
Add a ScrollBarModel
to manage.
scr | The ScrollBarModel to add.
|
addScrollBarModel() in ch.component.scrollbar.ScrollBarManager
public function removeScrollBarModel(scr:ScrollBarModel):Void
Remove a ScrollBarModel
.
scr | The ScrollBarModel to remove.
|
removeScrollBarModel() in ch.component.scrollbar.ScrollBarManager
public function getScrollBarModels(Void):Array
Get the ScrollBarModel
to manage.
An Array
of ScrollBarModel
.
public function scroll(value:Number):Void
Scroll all the managed ScrollBar
with the
specified value.
The source object provided by this method to the ch.component.scrollbar.ScrollBarModel.scroll() method is the current instance.
Note that this method works even if the AbstractScrollBarManager
is disabled.
value | The pixel to scroll. |
public function adjust(ratio:Number):Void
Adjust the all the ScrollBar
within the specified ratio.
The source object provided by this method to the ch.component.scrollbar.ScrollBarModel.adjust() method is the current instance.
Note that this method works even if the AbstractScrollBarManager
is disabled.
ratio | A Number between 0 and 1 inclusive.
|