Paket | spark.layouts |
Sınıf | public class HorizontalLayout |
Miras Alma | HorizontalLayout LayoutBase OnDemandEventDispatcher Object |
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 4 |
Çalışma Zamanı Sürümleri: | Flash Player 10, AIR 1.5 |
The horizontal position of the elements is determined by arranging them in a horizontal sequence, left to right, taking into account the padding before the first element and the gaps between the elements.
The vertical position of the elements is determined by the layout's
verticalAlign
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 the requestedColumnCount
property is set to a value other than -1,
only the space for that many elements
is measured, starting from the first element.
During the execution of the updateDisplayList()
method,
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
variableColumnWidth
isfalse
, then set the element's width to the value of thecolumnWidth
property. - If the element's
percentWidth
is set, then calculate the element's width by distributing the available container width between all elements withpercentWidth
setting. The available container width is equal to the container width minus the gaps, the padding and the space occupied by the rest of the elements. The element'sprecentWidth
property is ignored when the layout is virtualized. - Set the element's width to its preferred width.
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 the
verticalAlign
property is"justify"
, then set the element's height to the container height. - If the
verticalAlign
property is"contentJustify"
, then set the element's height to the maximum between the container's height and all elements' preferred height. - If the element's
percentHeight
property is set, then calculate the element's height as a percentage of the container's height. - Set the element's height to its preferred height.
The <s:HorizontalLayout>
tag inherits all of the tag
attributes of its superclass and adds the following tag attributes:
<s:HorizontalLayout Properties columnWidth="calculated" gap="6" paddingBottom="0" paddingLeft="0" paddingRight="0" paddingTop="0" requestedColumnCount="-1" requestedMaxColumnCount="-1" requestedMinColumnCount="-1" variableColumnWidth="true" verticalAlign="top" />
Özellik | Tanımlayan: | ||
---|---|---|---|
clipAndEnableScrolling : Boolean
If true, specifies to clip the children to the boundaries of the viewport. | LayoutBase | ||
columnCount : int [salt okunur]
Returns the current number of elements in view. | HorizontalLayout | ||
columnWidth : Number
If the variableColumnWidth property is false,
then this property specifies the actual width of each layout element, in pixels. | HorizontalLayout | ||
constructor : Object
Belirli bir nesne örneği için sınıf nesnesine veya yapıcı işlevine bir başvuru. | Object | ||
dropIndicator : DisplayObject
The DisplayObject that this layout uses for
the drop indicator during a drag-and-drop operation. | LayoutBase | ||
firstIndexInView : int [salt okunur]
The index of the first column that is part of the layout and within
the layout target's scroll rectangle, or -1 if nothing has been displayed yet. | HorizontalLayout | ||
gap : int
The horizontal space between layout elements, in pixels. | HorizontalLayout | ||
horizontalAlign : String
The horizontal alignment of the content relative to the container's width. | HorizontalLayout | ||
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 [salt okunur]
The index of the last column that is part of the layout and within
the layout target's scroll rectangle, or -1 if nothing has been displayed yet. | HorizontalLayout | ||
paddingBottom : Number
The minimum number of pixels between the container's bottom edge and
the bottom of all the container's layout elements. | HorizontalLayout | ||
paddingLeft : Number
Number of pixels between the container's left edge
and the left edge of the first layout element. | HorizontalLayout | ||
paddingRight : Number
Number of pixels between the container's right edge
and the right edge of the last layout element. | HorizontalLayout | ||
paddingTop : Number
The minimum number of pixels between the container's top edge and
the top of all the container's layout elements. | HorizontalLayout | ||
requestedColumnCount : int
The measured size of this layout is wide enough to display
the first requestedColumnCount layout elements. | HorizontalLayout | ||
requestedMaxColumnCount : int
The measured width of this layout is large enough to display
at most requestedMaxColumnCount layout elements. | HorizontalLayout | ||
requestedMinColumnCount : int
The measured width of this layout is large enough to display
at least requestedMinColumnCount layout elements. | HorizontalLayout | ||
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 | ||
variableColumnWidth : Boolean
If true, specifies that layout elements are to be allocated their
preferred width. | HorizontalLayout | ||
verticalAlign : String
The vertical alignment of layout elements. | HorizontalLayout | ||
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 |
Yöntem | Tanımlayan: | ||
---|---|---|---|
Constructor. | HorizontalLayout | ||
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. | HorizontalLayout | ||
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 | ||
Bir nesnenin belirli bir özelliğinin tanımlı olup olmadığını gösterir. | 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 | ||
Object sınıfının bir örneğinin parametre olarak belirtilen nesnenin prototip zincirinde olup olmadığını gösterir. | Object | ||
Measures the target's default size based on its content, and optionally
measures the target's default minimum size. | LayoutBase | ||
Belirtilen özelliğin bulunup bulunmadığını ve numaralandırılabilir olup olmadığını gösterir. | Object | ||
Removes a listener from the EventDispatcher object. | OnDemandEventDispatcher | ||
Dinamik bir özelliğin döngü işlemlerinde kullanılabilirliğini ayarlar. | Object | ||
Sizes, positions and parents the drop indicator based on the specified
drop location. | LayoutBase | ||
Bu nesnenin, yerel ayara özel kurallara göre biçimlendirilmiş dize temsilini döndürür. | Object | ||
Belirtilen nesnenin dize olarak temsil edilen halini döndürür. | 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 | ||
Belirtilen nesnenin temel değerini döndürür. | Object | ||
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type. | OnDemandEventDispatcher |
columnCount | özellik |
columnCount:int
[salt okunur] Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 4 |
Çalışma Zamanı Sürümleri: | Flash Player 10, AIR 1.5 |
Returns the current number of elements in view.
Varsayılan değer şudur -1.
Bu özellik veri ciltleme kaynağı olarak kullanılabilir. Bu özellik değiştirildiğinde, propertyChange
olayını gönderir.
Uygulama
public function get columnCount():int
columnWidth | özellik |
columnWidth:Number
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 4 |
Çalışma Zamanı Sürümleri: | Flash Player 10, AIR 1.5 |
If the variableColumnWidth
property is false
,
then this property specifies the actual width of each layout element, in pixels.
If the variableColumnWidth
property is true
,
the default, then this property has no effect.
The default value of this property is the preferred width
of the item specified by the typicalLayoutElement
property.
Uygulama
public function get columnWidth():Number
public function set columnWidth(value:Number):void
firstIndexInView | özellik |
firstIndexInView:int
[salt okunur] Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 4 |
Çalışma Zamanı Sürümleri: | Flash Player 10, AIR 1.5 |
The index of the first column that is part of the layout and within the layout target's scroll rectangle, or -1 if nothing has been displayed yet. Note that the column may only be partially in view.
Bu özellik veri ciltleme kaynağı olarak kullanılabilir. Bu özellik değiştirildiğinde, indexInViewChanged
olayını gönderir.
Uygulama
public function get firstIndexInView():int
İlgili API Öğeleri
fractionOfElementInView
gap | özellik |
gap:int
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 4 |
Çalışma Zamanı Sürümleri: | Flash Player 10, AIR 1.5 |
The horizontal 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.
Varsayılan değer şudur 6.
Uygulama
public function get gap():int
public function set gap(value:int):void
horizontalAlign | özellik |
horizontalAlign:String
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 4 |
Çalışma Zamanı Sürümleri: | Flash Player 10, AIR 1.5 |
The horizontal alignment of the content relative to the container's width.
If the value is "left"
, "right"
, or "center"
then the
layout element is aligned relative to the container's contentWidth
property.
This property has no effect when clipAndEnableScrolling
is true
and the contentWidth
is greater than the container's width.
This property does not affect the layout's measured size.
Varsayılan değer şudur "left".
Uygulama
public function get horizontalAlign():String
public function set horizontalAlign(value:String):void
lastIndexInView | özellik |
lastIndexInView:int
[salt okunur] Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 4 |
Çalışma Zamanı Sürümleri: | Flash Player 10, AIR 1.5 |
The index of the last column that is part of the layout and within the layout target's scroll rectangle, or -1 if nothing has been displayed yet. Note that the column may only be partially in view.
Bu özellik veri ciltleme kaynağı olarak kullanılabilir. Bu özellik değiştirildiğinde, indexInViewChanged
olayını gönderir.
Uygulama
public function get lastIndexInView():int
İlgili API Öğeleri
fractionOfElementInView
paddingBottom | özellik |
paddingBottom:Number
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 4 |
Çalışma Zamanı Sürümleri: | Flash Player 10, AIR 1.5 |
The minimum number of pixels between the container's bottom edge and the bottom of all the container's layout elements.
Varsayılan değer şudur 0.
Uygulama
public function get paddingBottom():Number
public function set paddingBottom(value:Number):void
paddingLeft | özellik |
paddingLeft:Number
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 4 |
Çalışma Zamanı Sürümleri: | Flash Player 10, AIR 1.5 |
Number of pixels between the container's left edge and the left edge of the first layout element.
Varsayılan değer şudur 0.
Uygulama
public function get paddingLeft():Number
public function set paddingLeft(value:Number):void
paddingRight | özellik |
paddingRight:Number
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 4 |
Çalışma Zamanı Sürümleri: | Flash Player 10, AIR 1.5 |
Number of pixels between the container's right edge and the right edge of the last layout element.
Varsayılan değer şudur 0.
Uygulama
public function get paddingRight():Number
public function set paddingRight(value:Number):void
paddingTop | özellik |
paddingTop:Number
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 4 |
Çalışma Zamanı Sürümleri: | Flash Player 10, AIR 1.5 |
The minimum number of pixels between the container's top edge and the top of all the container's layout elements.
Varsayılan değer şudur 0.
Uygulama
public function get paddingTop():Number
public function set paddingTop(value:Number):void
requestedColumnCount | özellik |
requestedColumnCount:int
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 4 |
Çalışma Zamanı Sürümleri: | Flash Player 10, AIR 1.5 |
The measured size of this layout is wide enough to display
the first requestedColumnCount
layout elements.
If requestedColumnCount
is -1, then the measured
size will be big enough for all of the layout elements.
If the actual size of the container using this layout has been explicitly set, then this property has no effect.
Varsayılan değer şudur -1.
Uygulama
public function get requestedColumnCount():int
public function set requestedColumnCount(value:int):void
İlgili API Öğeleri
requestedMaxColumnCount | özellik |
requestedMaxColumnCount:int
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 4.5 |
Çalışma Zamanı Sürümleri: | Flash Player 10, AIR 2.5 |
The measured width of this layout is large enough to display
at most requestedMaxColumnCount
layout elements.
If requestedColumnCount
is set, then
this property has no effect.
If the actual size of the container using this layout has been explicitly set, then this property has no effect.
Varsayılan değer şudur -1.
Uygulama
public function get requestedMaxColumnCount():int
public function set requestedMaxColumnCount(value:int):void
İlgili API Öğeleri
requestedMinColumnCount | özellik |
requestedMinColumnCount:int
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 4.5 |
Çalışma Zamanı Sürümleri: | Flash Player 10, AIR 2.5 |
The measured width of this layout is large enough to display
at least requestedMinColumnCount
layout elements.
If requestedColumnCount
is set, then
this property has no effect.
If the actual size of the container using this layout has been explicitly set, then this property has no effect.
Varsayılan değer şudur -1.
Uygulama
public function get requestedMinColumnCount():int
public function set requestedMinColumnCount(value:int):void
İlgili API Öğeleri
variableColumnWidth | özellik |
variableColumnWidth:Boolean
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 4 |
Çalışma Zamanı Sürümleri: | Flash Player 10, AIR 1.5 |
If true
, specifies that layout elements are to be allocated their
preferred width.
Setting this property to false
specifies fixed width columns.
The actual width of each layout element is
the value of the columnWidth
property, and the layout ignores
a layout elements' percentWidth
property.
Varsayılan değer şudur true.
Uygulama
public function get variableColumnWidth():Boolean
public function set variableColumnWidth(value:Boolean):void
verticalAlign | özellik |
verticalAlign:String
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 4 |
Çalışma Zamanı Sürümleri: | Flash Player 10, AIR 1.5 |
The vertical alignment of layout elements.
If the value is "bottom"
, "middle"
,
or "top"
then the layout elements are aligned relative
to the container's contentHeight
property.
If the value is "contentJustify"
then the actual
height of the layout element is set to
the container's contentHeight
property.
The content height of the container is the height of the largest layout element.
If all layout elements are smaller than the height of the container,
then set the height of all the layout elements to the height of the container.
If the value is "justify"
then the actual height
of the layout elements is set to the container's height.
If the value is "baseline"
then the elements are positioned
such that their text is aligned to the maximum of the elements' text ascent.
Varsayılan değer şudur "top".
Uygulama
public function get verticalAlign():String
public function set verticalAlign(value:String):void
HorizontalLayout | () | Yapıcı |
public function HorizontalLayout()
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 4 |
Çalışma Zamanı Sürümleri: | Flash Player 10, AIR 1.5 |
Constructor.
fractionOfElementInView | () | yöntem |
public function fractionOfElementInView(index:int):Number
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 4 |
Çalışma Zamanı Sürümleri: | 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 horizontal 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.
Parametreler
index:int — The index of the column.
|
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, 01:09 PM Z