Pakiet | spark.layouts |
Klasa | public class VerticalLayout |
Dziedziczenie | VerticalLayout LayoutBase OnDemandEventDispatcher Object |
Podklasy | FormLayout |
Wersja języka: | ActionScript 3.0 |
Wersja produktu: | Flex 4 |
Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
The vertical position of the elements is determined by arranging them in a vertical sequence, top to bottom, taking into account the padding before the first element and the gaps between the elements.
The horizontal position of the elements is determined by the layout's
horizontalAlign
property.
During the execution of the measure()
method,
the default size of the container is calculated by
accumulating the preferred sizes of the elements, including gaps and padding.
When requestedRowCount
is set, only the space for that many elements
is measured, starting from the first element.
During the execution of the updateDisplayList()
method,
the height of each element is calculated
according to the following rules, listed in their respective order of
precedence (element's minimum height and maximum height are always respected):
- If
variableRowHeight
isfalse
, then set the element's height to the value of therowHeight
property. - If the element's
percentHeight
is set, then calculate the element's height by distributing the available container height between all elements with apercentHeight
setting. The available container height is equal to the container height minus the gaps, the padding and the space occupied by the rest of the elements. The element'sprecentHeight
property is ignored when the layout is virtualized. - Set the element's height to its preferred height.
The width of each element is calculated according to the following rules, listed in their respective order of precedence (element's minimum width and maximum width are always respected):
- If
horizontalAlign
is"justify"
, then set the element's width to the container width. - If
horizontalAlign
is"contentJustify"
, then set the element's width to the maximum between the container's width and all elements' preferred width. - If the element's
percentWidth
is set, then calculate the element's width as a percentage of the container's width. - Set the element's width to its preferred width.
The <s:VerticalLayout>
tag inherits all of the tag
attributes of its superclass and adds the following tag attributes:
<s:VerticalLayout Properties gap="6" horizontalAlign="left" paddingBottom="0" paddingLeft="0" paddingRight="0" paddingTop="0" requestedMaxRowCount="-1" requestedMinRowCount="-1" requestedRowCount="-1" rowHeight="calculated" variableRowHeight="true" verticalAlign="top" />
Właściwość | Zdefiniowane przez | ||
---|---|---|---|
clipAndEnableScrolling : Boolean
If true, specifies to clip the children to the boundaries of the viewport. | LayoutBase | ||
constructor : Object
Odwołanie do obiektu klasy lub funkcji konstruktora, dotyczące danej instancji obiektu. | Object | ||
dropIndicator : DisplayObject
The DisplayObject that this layout uses for
the drop indicator during a drag-and-drop operation. | LayoutBase | ||
firstIndexInView : int [tylko do odczytu]
The index of the first layout element that is part of the
layout and within the layout target's scroll rectangle, or -1
if nothing has been displayed yet. | VerticalLayout | ||
gap : int
The vertical space between layout elements, in pixels. | VerticalLayout | ||
horizontalAlign : String
The horizontal alignment of layout elements. | VerticalLayout | ||
horizontalScrollPosition : Number
The x coordinate of the origin of the viewport in the component's coordinate system,
where the default value is (0,0) corresponding to the upper-left corner of the component. | LayoutBase | ||
lastIndexInView : int [tylko do odczytu]
The index of the last row that's part of the layout and within
the container's scroll rectangle, or -1 if nothing has been displayed yet. | VerticalLayout | ||
paddingBottom : Number
Number of pixels between the container's bottom edge
and the bottom edge of the last layout element. | VerticalLayout | ||
paddingLeft : Number
The minimum number of pixels between the container's left edge and
the left edge of the layout element. | VerticalLayout | ||
paddingRight : Number
The minimum number of pixels between the container's right edge and
the right edge of the layout element. | VerticalLayout | ||
paddingTop : Number
Number of pixels between the container's top edge
and the top edge of the first layout element. | VerticalLayout | ||
requestedMaxRowCount : int
The measured height of this layout is large enough to display
at most requestedMaxRowCount layout elements. | VerticalLayout | ||
requestedMinRowCount : int
The measured height of this layout is large enough to display
at least requestedMinRowCount layout elements. | VerticalLayout | ||
requestedRowCount : int
The measured size of this layout is tall enough to display
the first requestedRowCount layout elements. | VerticalLayout | ||
rowCount : int [tylko do odczytu]
The current number of visible elements. | VerticalLayout | ||
rowHeight : Number
If variableRowHeight is false, then
this property specifies the actual height of each child, in pixels. | VerticalLayout | ||
target : GroupBase
The GroupBase container whose elements are measured, sized and positioned
by this layout. | LayoutBase | ||
typicalLayoutElement : ILayoutElement
Used by layouts when fixed row/column sizes are requested but
a specific size isn't specified. | LayoutBase | ||
useVirtualLayout : Boolean
A container can hold any number of children. | LayoutBase | ||
variableRowHeight : Boolean
Specifies whether layout elements are allocated their
preferred height. | VerticalLayout | ||
verticalAlign : String
The vertical alignment of the content relative to the container's height. | VerticalLayout | ||
verticalScrollPosition : Number
The y coordinate of the origin of the viewport in the component's coordinate system,
where the default value is (0,0) corresponding to the upper-left corner of the component. | LayoutBase |
Metoda | Zdefiniowane przez | ||
---|---|---|---|
Constructor. | VerticalLayout | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with an EventDispatcher object so that the listener
receives notification of an event. | OnDemandEventDispatcher | ||
Calculates the drop location in the data provider of the drop target for
the specified dragEvent. | LayoutBase | ||
When useVirtualLayout is true,
this method can be used by the layout target
to clear cached layout information when the target changes. | LayoutBase | ||
Dispatches an event into the event flow. | OnDemandEventDispatcher | ||
Called by the target after a layout element
has been added and before the target's size and display list are
validated. | LayoutBase | ||
This method must is called by the target after a layout element
has been removed and before the target's size and display list are
validated. | LayoutBase | ||
Returns 1.0 if the specified index is completely in view, 0.0 if
it's not, or a value between 0.0 and 1.0 that represents the percentage
of the if the index that is partially in view. | VerticalLayout | ||
Returns the specified element's layout bounds as a Rectangle or null
if the index is invalid, the corresponding element is null,
includeInLayout=false,
or if this layout's target property is null. | LayoutBase | ||
Returns the change to the horizontal scroll position to handle
different scrolling options. | LayoutBase | ||
getNavigationDestinationIndex(currentIndex:int, navigationUnit:uint, arrowKeysWrapFocus:Boolean):int
Delegation method that determines which item
to navigate to based on the current item in focus
and user input in terms of NavigationUnit. | LayoutBase | ||
Computes the verticalScrollPosition and
horizontalScrollPosition deltas needed to
scroll the element at the specified index into view. | LayoutBase | ||
Returns the change to the vertical scroll position to handle
different scrolling options. | LayoutBase | ||
Checks whether the EventDispatcher object has any listeners registered for a specific type
of event. | OnDemandEventDispatcher | ||
Wskazuje, czy dla obiektu zdefiniowano określoną właściwość. | Object | ||
Hides the previously shown drop indicator,
created by the showDropIndicator() method,
removes it from the display list and also stops the drag scrolling. | LayoutBase | ||
Wskazuje, czy instancja klasy Object należy do łańcucha prototypów obiektu określonego jako parametr. | Object | ||
Measures the target's default size based on its content, and optionally
measures the target's default minimum size. | LayoutBase | ||
Wskazuje, czy określona właściwość istnieje i jest przeliczalna. | Object | ||
Removes a listener from the EventDispatcher object. | OnDemandEventDispatcher | ||
Ustawia dostępność właściwości dynamicznej używanej w pętlach. | Object | ||
Sizes, positions and parents the drop indicator based on the specified
drop location. | LayoutBase | ||
Zwraca ciąg reprezentujący obiekt — sformatowany zgodnie z konwencjami właściwymi dla ustawień regionalnych. | Object | ||
Zwraca ciąg reprezentujący określony obiekt. | Object | ||
Sizes and positions the target's elements. | LayoutBase | ||
Called by the target at the end of its updateDisplayList
to have the layout update its scrollRect. | LayoutBase | ||
Zwraca pierwotną wartość dla określonego obiektu. | Object | ||
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type. | OnDemandEventDispatcher |
firstIndexInView | właściwość |
firstIndexInView:int
[tylko do odczytu] Wersja języka: | ActionScript 3.0 |
Wersja produktu: | Flex 4 |
Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
The index of the first layout element that is part of the layout and within the layout target's scroll rectangle, or -1 if nothing has been displayed yet.
"Part of the layout" means that the element is non-null
and that its includeInLayout
property is true
.
Note that the layout element may only be partially in view.
Ta właściwość może być używana jako źródło dla tworzenia powiązań danych. Jeśli ta właściwość zostanie zmodyfikowana, zostanie wywołane zdarzenie indexInViewChanged
.
Implementacja
public function get firstIndexInView():int
Powiązane elementy interfejsu API
gap | właściwość |
gap:int
Wersja języka: | ActionScript 3.0 |
Wersja produktu: | Flex 4 |
Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
The vertical space between layout elements, in pixels. Note that the gap is only applied between layout elements, so if there's just one element, the gap has no effect on the layout.
Wartością domyślną jest 6.
Implementacja
public function get gap():int
public function set gap(value:int):void
horizontalAlign | właściwość |
horizontalAlign:String
Wersja języka: | ActionScript 3.0 |
Wersja produktu: | Flex 4 |
Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
The horizontal alignment of layout elements.
If the value is "left"
, "right"
, or "center"
then the
layout element is aligned relative to the container's contentWidth
property.
If the value is "contentJustify"
, then the layout element's actual
width is set to the contentWidth
of the container.
The contentWidth
of the container is the width of the largest layout element.
If all layout elements are smaller than the width of the container,
then set the width of all layout elements to the width of the container.
If the value is "justify"
then the layout element's actual width
is set to the container's width.
This property does not affect the layout's measured size.
Wartością domyślną jest "left".
Implementacja
public function get horizontalAlign():String
public function set horizontalAlign(value:String):void
lastIndexInView | właściwość |
lastIndexInView:int
[tylko do odczytu] Wersja języka: | ActionScript 3.0 |
Wersja produktu: | Flex 4 |
Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
The index of the last row that's part of the layout and within the container's scroll rectangle, or -1 if nothing has been displayed yet.
"Part of the layout" means that the child is non-null
and that its includeInLayout
property is true
.
Note that the row may only be partially in view.
Ta właściwość może być używana jako źródło dla tworzenia powiązań danych. Jeśli ta właściwość zostanie zmodyfikowana, zostanie wywołane zdarzenie indexInViewChanged
.
Implementacja
public function get lastIndexInView():int
Powiązane elementy interfejsu API
fractionOfElementInView
paddingBottom | właściwość |
paddingBottom:Number
Wersja języka: | ActionScript 3.0 |
Wersja produktu: | Flex 4 |
Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
Number of pixels between the container's bottom edge and the bottom edge of the last layout element.
Wartością domyślną jest 0.
Implementacja
public function get paddingBottom():Number
public function set paddingBottom(value:Number):void
paddingLeft | właściwość |
paddingLeft:Number
Wersja języka: | ActionScript 3.0 |
Wersja produktu: | Flex 4 |
Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
The minimum number of pixels between the container's left edge and the left edge of the layout element.
Wartością domyślną jest 0.
Implementacja
public function get paddingLeft():Number
public function set paddingLeft(value:Number):void
paddingRight | właściwość |
paddingRight:Number
Wersja języka: | ActionScript 3.0 |
Wersja produktu: | Flex 4 |
Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
The minimum number of pixels between the container's right edge and the right edge of the layout element.
Wartością domyślną jest 0.
Implementacja
public function get paddingRight():Number
public function set paddingRight(value:Number):void
paddingTop | właściwość |
paddingTop:Number
Wersja języka: | ActionScript 3.0 |
Wersja produktu: | Flex 4 |
Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
Number of pixels between the container's top edge and the top edge of the first layout element.
Wartością domyślną jest 0.
Implementacja
public function get paddingTop():Number
public function set paddingTop(value:Number):void
requestedMaxRowCount | właściwość |
requestedMaxRowCount:int
Wersja języka: | ActionScript 3.0 |
Wersja produktu: | Flex 4.5 |
Wersje środowiska wykonawczego: | Flash Player 10, AIR 2.5 |
The measured height of this layout is large enough to display
at most requestedMaxRowCount
layout elements.
If requestedRowCount
is set, then
this property has no effect.
If the actual size of the container has been explicitly set, then this property has no effect.
Wartością domyślną jest -1.
Implementacja
public function get requestedMaxRowCount():int
public function set requestedMaxRowCount(value:int):void
Powiązane elementy interfejsu API
requestedMinRowCount | właściwość |
requestedMinRowCount:int
Wersja języka: | ActionScript 3.0 |
Wersja produktu: | Flex 4.5 |
Wersje środowiska wykonawczego: | Flash Player 10, AIR 2.5 |
The measured height of this layout is large enough to display
at least requestedMinRowCount
layout elements.
If requestedRowCount
is set, then
this property has no effect.
If the actual size of the container has been explicitly set, then this property has no effect.
Wartością domyślną jest -1.
Implementacja
public function get requestedMinRowCount():int
public function set requestedMinRowCount(value:int):void
Powiązane elementy interfejsu API
requestedRowCount | właściwość |
requestedRowCount:int
Wersja języka: | ActionScript 3.0 |
Wersja produktu: | Flex 4 |
Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
The measured size of this layout is tall enough to display
the first requestedRowCount
layout elements.
If requestedRowCount
is -1, then the measured
size will be big enough for all of the layout elements.
If the actual size of the container has been explicitly set, then this property has no effect.
Wartością domyślną jest -1.
Implementacja
public function get requestedRowCount():int
public function set requestedRowCount(value:int):void
Powiązane elementy interfejsu API
rowCount | właściwość |
rowCount:int
[tylko do odczytu] Wersja języka: | ActionScript 3.0 |
Wersja produktu: | Flex 4 |
Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
The current number of visible elements.
Wartością domyślną jest -1.
Ta właściwość może być używana jako źródło dla tworzenia powiązań danych. Jeśli ta właściwość zostanie zmodyfikowana, zostanie wywołane zdarzenie propertyChange
.
Implementacja
public function get rowCount():int
rowHeight | właściwość |
rowHeight:Number
Wersja języka: | ActionScript 3.0 |
Wersja produktu: | Flex 4 |
Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
If variableRowHeight
is false
, then
this property specifies the actual height of each child, in pixels.
If variableRowHeight
is true
,
the default, then this property has no effect.
The default value of this property is the preferred height
of the typicalLayoutElement
.
Implementacja
public function get rowHeight():Number
public function set rowHeight(value:Number):void
variableRowHeight | właściwość |
variableRowHeight:Boolean
Wersja języka: | ActionScript 3.0 |
Wersja produktu: | Flex 4 |
Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
Specifies whether layout elements are allocated their
preferred height.
Setting this property to false
specifies fixed height rows.
If false
, the actual height of each layout element is
the value of rowHeight
.
Setting this property to false
causes the layout to ignore
the layout elements' percentHeight
property.
Wartością domyślną jest true.
Implementacja
public function get variableRowHeight():Boolean
public function set variableRowHeight(value:Boolean):void
verticalAlign | właściwość |
verticalAlign:String
Wersja języka: | ActionScript 3.0 |
Wersja produktu: | Flex 4 |
Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
The vertical alignment of the content relative to the container's height.
If the value is "bottom"
, "middle"
,
or "top"
then the layout elements are aligned relative
to the container's contentHeight
property.
This property has no effect when clipAndEnableScrolling
is true
and the contentHeight
is greater than the container's height.
This property does not affect the layout's measured size.
Wartością domyślną jest "top".
Implementacja
public function get verticalAlign():String
public function set verticalAlign(value:String):void
VerticalLayout | () | Konstruktor |
public function VerticalLayout()
Wersja języka: | ActionScript 3.0 |
Wersja produktu: | Flex 4 |
Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
Constructor.
fractionOfElementInView | () | metoda |
public function fractionOfElementInView(index:int):Number
Wersja języka: | ActionScript 3.0 |
Wersja produktu: | Flex 4 |
Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
Returns 1.0 if the specified index is completely in view, 0.0 if it's not, or a value between 0.0 and 1.0 that represents the percentage of the if the index that is partially in view.
An index is "in view" if the corresponding non-null layout element is
within the vertical limits of the container's scrollRect
and included in the layout.
If the specified index is partially within the view, the returned value is the percentage of the corresponding layout element that's visible.
Parametry
index:int — The index of the row.
|
Number — The percentage of the specified element that's in view.
Returns 0.0 if the specified index is invalid or if it corresponds to
null element, or a ILayoutElement for which
the includeInLayout property is false .
|
Tue Jun 12 2018, 12:06 PM Z