Main Page | Packages | Class Tree | Index | Help

xp.controls

class ScrollPanel

MovieClip
  |
  +--xp.system.UIControl
        |
        +--xp.controls.Frame
              |
              +--xp.controls.ScrollFrame
                    |
                    +--xp.controls.ScrollPanel


class ScrollPanel
extends ScrollFrame

A content control that contains a single piece of scrollable content.

Extends ScrollFrame to provide pixel based scroll support You load content by setting the source property to the linkageId of a library object or the url of an external swf or jpg
A progress event can be subscribed to to track the load process
If the content isn't going to contain focusable or mouse aware controls i.e. its just a jpg or plain clip, then you can activate automatic scroll support.
There are several methods of auto scrolling.
Whilst the mouse is over the ScrollPanle:
MouseWheel - scrolls vertically unless you hold the SHIFT key down in which case it scrolls horizontaly.
EdgeSense - If you place the mouse over the boundaries of the content, it will scroll repeatedly by largeScroll increments, holding SHIFT down scrolls in smallScroll increments.
Whilst the ScrollPanel has focus:
KeyBoard - When a ScrollPanel instance has focus, you can use the following keys to control it:
KeyDescription
Down ArrowContent moves up one vertical line scroll.
EndContent moves to the bottom of the scroll pane.
Left ArrowContent moves right one horizontal line scroll.
HomeContent moves to the top of the scroll pane.
Page DownContent moves up one vertical page scroll.
Page UpContent moves down one vertical page scroll.
Right ArrowContent moves left one horizontal line scroll.
Up ArrowContent moves down one vertical line scroll.

Event summary for the ScrollPanel class
The following table lists events of the ScrollPanel class.

EventTypeDescription
xp.events.ProgressEventprogressTriggered while content is loading.


Author:
ProWin Computers Ltd. - Rob Edgar

Version:
3.0.0.000

See also:


Field Summary

public
autoScroll: Boolean
Controls whether the content is automatically when the mouse is over the border areas.

public static
classInfo: Object
A static class information object

public
edgeSense
Controls the depth of the autoScroll area. The default is 30.

public
hasFocusableContent: Boolean
Determines whether the content is focusable or not

public
styleClass: String
The name of the style class this instance will use.

public
tabStop: Boolean


Fields inherited from class xp.controls.ScrollFrame

classInfo, styleClass

Fields inherited from class xp.controls.Frame

classInfo, hasExternalContent, hasExternalImage, hideImageWhileLoading, isContentLoaded, isContentLoading, preloadMessage

Fields inherited from class xp.system.UIControl

__layout, allowDrop, autoLayout, bindingDefaultValue, bindingFormatter, bindingPath, bindingSource, bindingType, bindingValidator, border, causesValidation, classInfo, clickOnENTER, clickOnSPACE, container, context, data, disableAcceptButton, disableCancelButton, enableBGMouseEvents, enableDblClickEvent, enableKeyDownEvents, enableKeyEvents, enableKeyUpEvents, enableMouseWheelEvents, formatterOptions, horizontalAlignment, index, isBinding, itemId, logEnabled, parent, parentContainer, parentForm, percentageHeight, percentageWidth, styleClass, tabIndex, tabStop, tooltip, tree, verticalAlignment

Property Summary

public
contentHeight: Number (read-only)
The actual height in pixels of the content

public
contentWidth: Number (read-only)
The actual width in pixels of the content

public
viewportHeight: Number (read-only)
The actual height in pixels of the viewable window

public
viewportWidth: Number (read-only)
The actual width in pixels of the viewable window

Properties inherited from class xp.controls.ScrollFrame

contentHeight, contentWidth, hScrollPolicy, largeScroll, smallScroll, viewportHeight, viewportWidth, vScrollPolicy

Properties inherited from class xp.controls.Frame

alignPreloader, autoload, content, nocache, preloadId, source

Properties inherited from class xp.system.UIControl

alpha, autosize, background, backgroundVisible, bindings, borderBrush, borderRadius, borderShadow, borderStyle, borderThickness, bottom, dataSource, enableMouseEvents, focusManager, height, id, isEnabled, isFocused, isMouseOver, isPressed, isSelected, isValid, layout, left, margin, maxHeight, maxWidth, measuredHeight, measuredMinHeight, measuredMinWidth, measuredWidth, minHeight, minWidth, padding, readOnly, resources, right, styleName, top, triggers, visible, width, x, y

Constructor

public
ScrollPanel ( )
Constructor - This should not be called directly.


Method Summary

public
doAutoScroll ( )
Scroll the content if the mouse is over the edge of the content area

public
getClass ( ): Function
Returns a reference to the components static class

public static
newInstance ( owner, instanceId, depth, initObj )
Creates a new Instance of this class

public
onSetFocus ( ): Void
SetFocus handler.Called when you get focus. If focus is actualy set to some internal TextField that TextField must call onSetFocus when it gets focus.

Methods inherited from class xp.controls.ScrollFrame

getClass, newInstance, setScrollContentHPos, setScrollContentVPos

Methods inherited from class xp.controls.Frame

drawComponent, getClass, loadContent

Methods inherited from class xp.system.UIControl

addBinding, addBindings, addEventListener, addPropertyTrigger, applyStyle, beginDeferUpdate, canUpdate, centerContent, checkState, containsFocus, destroy, destroyObject, drawFocus, endDeferUpdate, findFocusFromObject, findFocusInChildren, getBinding, getBounds, getCenter, getClass, getFocus, getFocusManager, getFocusRect, getLocation, getPropertyValue, getSize, getStateName, getTrigger, globalToLocalPoint, invalidate, invalidateLayout, invalidateSize, invalidateSizeAndLayout, invalidChild, isChild, isMouseDirectlyOver, isParent, localToGlobalPoint, localToLocalPoint, measure, mouseWheel, move, onChildFocus, onKillFocus, onSetFocus, processEnterKey, processEscapeKey, processTabKey, redraw, refresh, removeEventListener, routeEvent, setBounds, setFocus, setLocation, setPropertyValue, setSize, setValueChanged, update, validate



Field Documentation

autoScroll

public var autoScroll: Boolean
Controls whether the content is automatically when the mouse is over the border areas.

classInfo

public static var classInfo: Object
A static class information object

Every class has an associated classInfo object that holds the version and other static information. The classInfo can be accessed either directly by referencing the static class or by calling getClass() on any class instance.

edgeSense

public var edgeSense
Controls the depth of the autoScroll area. The default is 30.

hasFocusableContent

public var hasFocusableContent: Boolean
Determines whether the content is focusable or not

If the content is not focusable kbd and mouse auto scrolling is enabled, otherwise it is disabled.
If the content of the scrollPanel contains input controls this must be set to true for them to function properly.

styleClass

public var styleClass: String
The name of the style class this instance will use.

tabStop

public var tabStop: Boolean

Property Documentation

contentHeight

public contentHeight: Number (read-only)
The actual height in pixels of the content

Overrides:

contentWidth

public contentWidth: Number (read-only)
The actual width in pixels of the content

Overrides:

viewportHeight

public viewportHeight: Number (read-only)
The actual height in pixels of the viewable window

Overrides:

viewportWidth

public viewportWidth: Number (read-only)
The actual width in pixels of the viewable window

Overrides:


Constructor Documentation

ScrollPanel

public function ScrollPanel()
Constructor - This should not be called directly.

If you want to dynamically create a new instance of a control use its static newInstance method


Method Documentation

doAutoScroll

public function doAutoScroll()
Scroll the content if the mouse is over the edge of the content area

If the mouse is moved over the border area of the content the content will scroll in the relevant direction.
Holding the SHIFT ket down scroll in smallScroll increment other wise in LargeScroll increments.

getClass

public function getClass(): Function
Returns a reference to the components static class

Overrides:

newInstance

public static function newInstance(owner,
 instanceId,
 depth,
 initObj)
Creates a new Instance of this class

Creates an instance of a component at runtime. You need to use the import statement and specify the class package name before calling this method. In addition, the component must be in the FLA file’s library.

Overrides:

Parameters:
owner
A reference to the movie clip or object that will contains the new Instance.
instanceId
A string indicating the instance name of the new instance.(optional)
depth
A number indicating the depth of the new instance.(optional)
initObj
An object containing initialization properties for the new instance.(optional)
Returns:
A object that is an instance of the specified class.

onSetFocus

public function onSetFocus(): Void
SetFocus handler.Called when you get focus. If focus is actualy set to some internal TextField that TextField must call onSetFocus when it gets focus.

Overrides:


The documentation was generated from the following file:


Generated on 10/30/2005 9:34:02 PM by AS2Doc